SpaceMongers (SpaceMongers v0.1.0) View Source
Simple API wrapper for spacetraders.io
Most functions in this module require a SpaceMongers.ApiClient
instance. More detailed information on
which endpoints are available is at https://api.spacetraders.io/
All function calls here are automatically rate-limited to avoid overloading the servers and getting your user banned. Right now the rate limiting is quite agressive so expect SpaceMongers to become more efficient in the future.
Link to this section Summary
Functions
Lists available trades for a particular location
Purchases a particular good at the location where your ship is located
Purchases a loan of a certain type
Purchase a ship. Takes a location, and the type of ship.
Start a flight plan for a particular ship. Takes a ship_id and a destination
Get the user tied to the provided ApiClient
Gets the list of all available loans to purchase
Gets information about a particular location.
Gets the locations within a particular system. If system is not passed, it is assumed to be "OE"
.
Takes an optional parameter for type
such as "PLANET"
or "ASTEROID"
Get the ships tied to the provided ApiClient
Sells a particular good at the location of your ship
Shows all available ships for purchase. Takes an optional class
parameter.
Get the status of the spacetraders.io servers
Shows all known systems.
Get an existing flight plan via its id
Link to this section Types
Specs
client() :: SpaceMongers.ApiClient.t()
Specs
options() :: [{:include_full_response, boolean()}]
Specs
response() :: {:ok | :error, any()} | {:ok | :error, any(), SpaceMongers.FullResponse.t()}
Link to this section Functions
Specs
Lists available trades for a particular location
GET /game/locations/:location/marketplace
Specs
Purchases a particular good at the location where your ship is located
POST /users/:username/purchase-orders
Specs
Purchases a loan of a certain type
POST /users/:username/loans
Specs
Purchase a ship. Takes a location, and the type of ship.
Note that type
is different than class
. type
is like ZA-MK-II
while class
is like MK-II
POST /users/:username/ships
Specs
Start a flight plan for a particular ship. Takes a ship_id and a destination
POST /users/:username/flight-plans
Specs
Get the user tied to the provided ApiClient
GET /users/:username
Specs
Gets the list of all available loans to purchase
GET /game/loans
Specs
Gets information about a particular location.
GET /game/locations/:symbol
locations(client, location_type \\ nil, system \\ "OE", opts \\ [])
View SourceSpecs
Gets the locations within a particular system. If system is not passed, it is assumed to be "OE"
.
Takes an optional parameter for type
such as "PLANET"
or "ASTEROID"
GET /game/systems/:system/locations
Specs
Get the ships tied to the provided ApiClient
GET /users/:username/ships
Specs
Sells a particular good at the location of your ship
POST /users/:username/sell-orders
Specs
Shows all available ships for purchase. Takes an optional class
parameter.
GET /game/ships
Specs
Get the status of the spacetraders.io servers
GET /game/status
Specs
Shows all known systems.
GET /game/systems
Specs
Get an existing flight plan via its id
GET /users/:username/flight-plans/:id