Module spacetraders::client [−][src]
Expand description
The client module wraps the interactions between the client and the server
Structs
Client | A SpaceTraders client that is associated to a specific username |
SpaceTradersClient | SpaceTradersClient wraps the actual reqwest client and adds rate-limiting support |
SpaceTradersClientRequest | SpaceTradersClientRequest wraps all the parameters sent to the spacetraders client |
SpaceTradersClientResponse | SpaceTradersClientRequest wraps all the parameters received from the spacetraders API |
Functions
claim_username | Claim a username and get a token |
get_game_status | Get the status of the game API. |
get_http_client | Get a rate-limited http client that is safe to use across threads and won’t break rate-limiting |
get_http_client_with_hook | Get a rate-limited http client, with post receive hook, that is safe to use across threads and won’t break rate-limiting |
get_my_ip_address | Get the users current ip address |
Type Definitions
HttpClient | HttpClient is a thread-safe rate-limited space traders client |
PostRequestHook | Allow the user to tie into the request lifecycle and do things with the request, responses, and/or error coming back |