Rust API client for openapi

SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe.

The API is documented using OpenAPI. You can send your first request right here in your browser to check the status of the game server.

json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", }

Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community.

We have a Discord channel where you can share your projects, ask questions, and get help from other players.

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

Installation

Put the package under your project folder in a directory named openapi and add the following to Cargo.toml under [dependencies]:

openapi = { path = "./openapi" }

Documentation for API Endpoints

All URIs are relative to https://api.spacetraders.io/v2

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AgentsApi | getmyagent | GET /my/agent | Get Agent ContractsApi | acceptcontract | POST /my/contracts/{contractId}/accept | Accept Contract *ContractsApi* | delivercontract | POST /my/contracts/{contractId}/deliver | Deliver Cargo to Contract ContractsApi | fulfillcontract | POST /my/contracts/{contractId}/fulfill | Fulfill Contract *ContractsApi* | getcontract | GET /my/contracts/{contractId} | Get Contract ContractsApi | getcontracts | GET /my/contracts | List Contracts *DefaultApi* | getstatus | GET / | Get Status DefaultApi | register | POST /register | Register New Agent FactionsApi | getfaction | GET /factions/{factionSymbol} | Get Faction *FactionsApi* | getfactions | GET /factions | List Factions FleetApi | createchart | POST /my/ships/{shipSymbol}/chart | Create Chart *FleetApi* | createshipshipscan | POST /my/ships/{shipSymbol}/scan/ships | Scan Ships FleetApi | createshipsystemscan | POST /my/ships/{shipSymbol}/scan/systems | Scan Systems *FleetApi* | createshipwaypointscan | POST /my/ships/{shipSymbol}/scan/waypoints | Scan Waypoints FleetApi | createsurvey | POST /my/ships/{shipSymbol}/survey | Create Survey *FleetApi* | dockship | POST /my/ships/{shipSymbol}/dock | Dock Ship FleetApi | extractresources | POST /my/ships/{shipSymbol}/extract | Extract Resources *FleetApi* | getmounts | GET /my/ships/{shipSymbol}/mounts | Get Mounts FleetApi | getmyship | GET /my/ships/{shipSymbol} | Get Ship FleetApi | getmyshipcargo | GET /my/ships/{shipSymbol}/cargo | Get Ship Cargo *FleetApi* | getmyships | GET /my/ships | List Ships *FleetApi* | getshipcooldown | GET /my/ships/{shipSymbol}/cooldown | Get Ship Cooldown *FleetApi* | getshipnav | GET /my/ships/{shipSymbol}/nav | Get Ship Nav *FleetApi* | installmount | POST /my/ships/{shipSymbol}/mounts/install | Install Mount FleetApi | jettison | POST /my/ships/{shipSymbol}/jettison | Jettison Cargo FleetApi | jumpship | POST /my/ships/{shipSymbol}/jump | Jump Ship *FleetApi* | navigateship | POST /my/ships/{shipSymbol}/navigate | Navigate Ship FleetApi | negotiatecontract | POST /my/ships/{shipSymbol}/negotiate/contract | Negotiate Contract *FleetApi* | orbitship | POST /my/ships/{shipSymbol}/orbit | Orbit Ship FleetApi | patchshipnav | PATCH /my/ships/{shipSymbol}/nav | Patch Ship Nav FleetApi | purchasecargo | POST /my/ships/{shipSymbol}/purchase | Purchase Cargo *FleetApi* | purchaseship | POST /my/ships | Purchase Ship FleetApi | refuelship | POST /my/ships/{shipSymbol}/refuel | Refuel Ship *FleetApi* | removemount | POST /my/ships/{shipSymbol}/mounts/remove | Remove Mount FleetApi | sellcargo | POST /my/ships/{shipSymbol}/sell | Sell Cargo *FleetApi* | shiprefine | POST /my/ships/{shipSymbol}/refine | Ship Refine FleetApi | transfercargo | POST /my/ships/{shipSymbol}/transfer | Transfer Cargo *FleetApi* | warpship | POST /my/ships/{shipSymbol}/warp | Warp Ship SystemsApi | getjumpgate | GET /systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate | Get Jump Gate SystemsApi | getmarket | GET /systems/{systemSymbol}/waypoints/{waypointSymbol}/market | Get Market *SystemsApi* | getshipyard | GET /systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard | Get Shipyard SystemsApi | getsystem | GET /systems/{systemSymbol} | Get System *SystemsApi* | getsystemwaypoints | GET /systems/{systemSymbol}/waypoints | List Waypoints in System *SystemsApi* | getsystems | GET /systems | List Systems SystemsApi | get_waypoint | GET /systems/{systemSymbol}/waypoints/{waypointSymbol} | Get Waypoint

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

joel@spacetraders.io