Struct foxhole_api::Client [−][src]
pub struct Client { /* fields omitted */ }Expand description
Client for fetching data from the war API.
This client contains an HTTP client, and only one instance should be needed per process.
Implementations
Retrieves information about the current war.
This endpoint retrieves information about the current war, and returns it deserialized as
WarDataResponse.
Retrieves all map names.
This endpoint retrieves all map names currently present, and returns them deserialized as
MapNameResponse.
pub async fn map_data_static(
&self,
map_name: String
) -> Result<MapDataResponse, Box<dyn Error>>
pub async fn map_data_static(
&self,
map_name: String
) -> Result<MapDataResponse, Box<dyn Error>>
Retrieves all static map data.
This endpoint retrieves all map data that will never change over the course of a war. This includes map text labels and resource node locations.
pub async fn map_data_dynamic(
&self,
map_name: String
) -> Result<MapDataResponse, Box<dyn Error>>
pub async fn map_data_dynamic(
&self,
map_name: String
) -> Result<MapDataResponse, Box<dyn Error>>
Retrieves all dynamic map data.
This endpoint retrieves all map daa that could change over the course of a war. This includes relic bases, and town halls that could change team ownership. Private data, such as player built fortifications, is not available.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more