/spacetraders-sdk

Generated Swift SDK for SpaceTraders (spacetraders.io)

Primary LanguageSwift

Swift5 API client for OpenAPIClient

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.

{
  \"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.

  • API version: 2.0.0
  • Package version:
  • Build package: org.openapitools.codegen.languages.Swift5ClientCodegen

Installation

Carthage

Run carthage update

CocoaPods

Run pod install

Documentation for API Endpoints

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

Class Method HTTP request Description
AgentsAPI getMyAgent GET /my/agent My Agent Details
ContractsAPI acceptContract POST /my/contracts/{contractId}/accept Accept Contract
ContractsAPI deliverContract POST /my/contracts/{contractId}/deliver Deliver 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 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 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 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 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 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
SystemsAPI getSystems GET /systems List Systems
SystemsAPI getWaypoint GET /systems/{systemSymbol}/waypoints/{waypointSymbol} Get Waypoint

Documentation For Models

Documentation For Authorization

AgentToken

  • Type: HTTP basic authentication

Author

joel@spacetraders.io