A python sdk for the SpaceTradersAPI game
Project description
spacetraders-sdk-v2
Total rewrite to use no generated code Currently restructuring folders to be a package-able
Installation & Usage
pip install -r requirements.txt
py api.py
TODO
- redo all endpoints
- logging
- database connections
- error handling
- add monitoring, measure time of the requests and send them to the db aswell
- add cooldown to database
- add contracts to database
- add surveys to database
- add which ship surveyed
- add agent to database
- add extractions to database
- add transactions to database
- add new endpoints
- shipyards: transactions
- shipyardsships: requirements
- shipyards, shipyardsships with mounts etc
Generator
- implement enums
- implement jsons like ShipCondition
Documentation for API Endpoints
| Class | HTTP request | Description | Implemented |
|---|---|---|---|
| get / | Status | leaderboard db | |
| post /register | Register New Agent | statekeeping | |
| Agents | get /my/agent | Fetch your agent's details. | statekeeping |
| Agents | get /my/agent/events | last 60 seconds of events | |
| Contracts | get /my/contracts | List all of your contracts. | statekeeping |
| Contracts | get /my/contracts/{contractId} | Get the details of a contract by ID. | statekeeping |
| Contracts | post /my/contracts/{contractId}/accept | Accept a contract. | statekeeping |
| Contracts | post /my/contracts/{contractId}/deliver | Deliver cargo on a given contract. | statekeeping & db/2 |
| Contracts | post /my/contracts/{contractId}/fulfill | Fulfill a contract | statekeeping |
| Factions | get /factions | List all discovered factions in the game. | statekeeping & db |
| Factions | get /factions/{factionSymbol} | View the details of a faction. | statekeeping & db |
| Factions | get /my/factions | Get your faction reputation | |
| Fleet | get /my/ships | Retrieve all of your ships. | statekeeping & db |
| Fleet | post /my/ships | Purchase a ship | statekeeping & db/2 |
| Fleet | get /my/ships/{shipSymbol} | Retrieve the details of your ship. | statekeeping & db |
| Fleet | get /my/ships/{shipSymbol}/cargo | Retrieve the cargo of your ship. | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/orbit | Orbit Ship | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/refine | Ship Refine | |
| Fleet | post /my/ships/{shipSymbol}/chart | Create Chart | statekeeping & db |
| Fleet | get /my/ships/{shipSymbol}/cooldown | Get Ship Cooldown | statekeeping |
| Fleet | post /my/ships/{shipSymbol}/dock | Dock Ship | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/survey | Create Survey | statekeeping |
| Fleet | post /my/ships/{shipSymbol}/extract | Extract Resources | statekeeping & db/2 |
| Fleet | post /my/ships/{shipSymbol}/jettison | Jettison Cargo | |
| Fleet | post /my/ships/{shipSymbol}/jump | Jump Ship | statekeeping & db/2 |
| Fleet | post /my/ships/{shipSymbol}/navigate | Navigate Ship | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/negotiate/contract | Negotiate Contract | |
| 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 | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/sell | Sell Cargo | statekeeping & db |
| 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 | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/purchase | Purchase Cargo | statekeeping & db |
| Fleet | post /my/ships/{shipSymbol}/transfer | Transfer Cargo | statekeeping & db |
| Fleet | get /my/ships/{shipSymbol}/mounts | Get the mounts on a ship. | |
| Fleet | post /my/ships/{shipSymbol}/mounts | Install a mount on a ship. | |
| Fleet | post /my/ships/{shipSymbol}/mounts/remove | Remove a mount from a ship. | |
| Systems | get /systems | List Systems | statekeeping & db |
| Systems | get /systems.json | Get all systems. | statekeeping & db |
| Systems | get /systems/{systemSymbol} | Get System | statekeeping & db |
| Systems | get /systems/{systemSymbol}/waypoints | List Waypoints | statekeeping & db |
| Systems | get /systems/{systemSymbol}/waypoints/{waypointSymbol} | Get Waypoint | statekeeping & db |
| Systems | get /systems/{systemSymbol}/waypoints/{waypointSymbol}/market | Get Market | statekeeping & db |
| Systems | get /systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard | Get Shipyard | statekeeping & db |
| Systems | get /systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate | Get Jump Gate | statekeeping |
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
spacetraders_sdk-2.0.2.tar.gz
(10.6 kB
view details)
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.0.2.tar.gz.
File metadata
- Download URL: spacetraders_sdk-2.0.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81c4ec5bdd688511c9379d64026bb8c2767596e3af81608e4fd2d86051ae8c6d
|
|
| MD5 |
f4a844d7a071f897a4e582f51fb32fe2
|
|
| BLAKE2b-256 |
b3f785756c6aa76ec25def29093e0004eac127b3415a824449c627069b53c83a
|
File details
Details for the file spacetraders_sdk-2.0.2-py3-none-any.whl.
File metadata
- Download URL: spacetraders_sdk-2.0.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43537d1262b4313fdb64215e50d6be951fbfd1ce15784d2d98223424198d8ff8
|
|
| MD5 |
1399ca4ef9c1bcd6d0c6090f13260770
|
|
| BLAKE2b-256 |
6554b9ca9c74ec74e029338e6d243c1de26fc4eb928642d362fdb96d6cb7a74a
|