Skip to main content

A python sdk for the SpaceTradersAPI game

Project description

New rewrite/repaste

Work in progress... Names may change a lot...

Most endpoints are already in, but you have to handle the data yourself (for now).

TODO

  • Data Classes (Pydantic or from a db scheme directly)
  • Database
  • Sdk Statekeeping

Code

Api usage:

from spacetraders_sdk.spacetraders_api import SpaceTradersApi

st = SpaceTradersApi()
status = st.status()

Documentation for API Endpoints

Class HTTP request Description Implemented
get / Status api
post /register Register New Agent api
Agents get /my/agent Fetch your agent's details. api
Agents get /agents List all Agents. api
Agents get /agents/{agent_symbol} Get Agent. api
Contracts get /my/contracts List all of your contracts. api
Contracts get /my/contracts/{contractId} Get the details of a contract by ID. api
Contracts post /my/contracts/{contractId}/accept Accept a contract. api
Contracts post /my/contracts/{contractId}/deliver Deliver cargo on a given contract. api
Contracts post /my/contracts/{contractId}/fulfill Fulfill a contract api
Factions get /factions List all discovered factions in the game. api
Factions get /factions/{factionSymbol} View the details of a faction. api
Fleet get /my/ships Retrieve all of your ships. api
Fleet post /my/ships Purchase a ship api
Fleet get /my/ships/{shipSymbol} Retrieve the details of your ship. api
Fleet get /my/ships/{shipSymbol}/cargo Retrieve the cargo of your ship. api
Fleet post /my/ships/{shipSymbol}/orbit Orbit Ship api
Fleet post /my/ships/{shipSymbol}/refine Ship Refine
Fleet post /my/ships/{shipSymbol}/chart Create Chart api
Fleet get /my/ships/{shipSymbol}/cooldown Get Ship Cooldown api
Fleet post /my/ships/{shipSymbol}/dock Dock Ship api
Fleet post /my/ships/{shipSymbol}/survey Create Survey api
Fleet post /my/ships/{shipSymbol}/extract Extract Resources api
Fleet post /my/ships/{shipSymbol}/jettison Jettison Cargo
Fleet post /my/ships/{shipSymbol}/jump Jump Ship api
Fleet post /my/ships/{shipSymbol}/navigate Navigate Ship api
Fleet post /my/ships/{shipSymbol}/negotiate/contract Negotiate Contract api
Fleet patch /my/ships/{shipSymbol}/nav Patch Ship Nav
Fleet get /my/ships/{shipSymbol}/nav Get Ship Nav
Fleet post /my/ships/{shipSymbol}/warp Warp Ship api
Fleet post /my/ships/{shipSymbol}/sell Sell Cargo api
Fleet post /my/ships/{shipSymbol}/scan/systems Scan Systems
Fleet post /my/ships/{shipSymbol}/scan/waypoints Scan Waypoints
Fleet post /my/ships/{shipSymbol}/scan/ships Scan Ships
Fleet post /my/ships/{shipSymbol}/refuel Refuel Ship api
Fleet post /my/ships/{shipSymbol}/purchase Purchase Cargo api
Fleet post /my/ships/{shipSymbol}/transfer Transfer Cargo api
Fleet get /my/ships/{shipSymbol}/mounts Get the mounts on a ship. api
Fleet post /my/ships/{shipSymbol}/mounts Install a mount on a ship. api
Fleet post /my/ships/{shipSymbol}/mounts/remove Remove a mount from a ship. api
Systems get /systems List Systems api
Systems get /systems.json Get all systems. api
Systems get /systems/{systemSymbol} Get System api
Systems get /systems/{systemSymbol}/waypoints List Waypoints api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol} Get Waypoint api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/market Get Market api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard Get Shipyard api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate Get Jump Gate api

api: 41/48

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacetraders_sdk-2.3.1.5.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacetraders_sdk-2.3.1.5-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file spacetraders_sdk-2.3.1.5.tar.gz.

File metadata

  • Download URL: spacetraders_sdk-2.3.1.5.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Windows/10

File hashes

Hashes for spacetraders_sdk-2.3.1.5.tar.gz
Algorithm Hash digest
SHA256 eeabec397bb33ede30fe7b3dfad7ae6f5b1cea3e48508834b612ef31c8f6216f
MD5 ca605683a0600eddfd22dc057b7c18ac
BLAKE2b-256 df60f7a5130ffe679b948d5cde4055d9cd600df88a03fa5b300c530888cfc68d

See more details on using hashes here.

File details

Details for the file spacetraders_sdk-2.3.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for spacetraders_sdk-2.3.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2d61a58720d58e140e82142de1f1e9f9720bae8db2b27a9ce639f32893c4c8c1
MD5 72815d7b680d72c51208bc17f1712c95
BLAKE2b-256 9cdd2517eacb793deeb4b8917849cd39559abe2882dc164daea4e239cc227c51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page