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 | api |
| 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 | api |
| 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 | api |
| Fleet | get /my/ships/{shipSymbol}/nav | Get Ship Nav | api |
| 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 | api |
| Fleet | post /my/ships/{shipSymbol}/scan/waypoints | Scan Waypoints | api |
| Fleet | post /my/ships/{shipSymbol}/scan/ships | Scan Ships | api |
| 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: 48/48
Completed Objects: Agent Chart ConnectedSystem Contract Cooldown Extraction Faction JumpGate Market ScannedShip ScannedSystem ScannedWaypoint Ship ShipCondition -> int Shipyard Survey System TradeSymbol Waypoint
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spacetraders_sdk-2.3.1.7.tar.gz.
File metadata
- Download URL: spacetraders_sdk-2.3.1.7.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4561f1a5cafb6b19bdeda785843158ccfc5f8599c6693378a27ab9454cc6537b
|
|
| MD5 |
b2ef92622d0599ac5af94d040397ec3d
|
|
| BLAKE2b-256 |
2927a9328a28f049c7e3dbfa6351b988000829a1d897e9ca9c69f9fbe20c1d5e
|
File details
Details for the file spacetraders_sdk-2.3.1.7-py3-none-any.whl.
File metadata
- Download URL: spacetraders_sdk-2.3.1.7-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65243c17b2cfd5d8c8696f6e0442e18c26770d08e28c247f18737167a6af365
|
|
| MD5 |
2e8e2e57675091e783b051fc1df7e972
|
|
| BLAKE2b-256 |
a86f30fb200e9546c4d0d6aa9f9ce0c061df9cf47206205d6eb1fdcc175a8d8a
|