Struct forecast::ApiClient
[−]
[src]
pub struct ApiClient<'a> { /* fields omitted */ }
The ApiClient is a thin wrapper around a reqwest::Client
which
sends requests to the Forecast and Time Machine APIs.
Methods
impl<'a> ApiClient<'a>
[src]
fn new(client: &'a Client) -> ApiClient<'a>
Construct a new ApiClient.
fn get_forecast(self, request: ForecastRequest) -> ApiResult<Response>
Send a Forecast API request, returns the corresponding Response.
Errors
This function is a thin wrapper around
reqwest::Client.get(..)
, so it will return an error under the
same conditions in which reqwest would.
fn get_time_machine(self, request: TimeMachineRequest) -> ApiResult<Response>
Send a Time Machine API request, returns the corresponding Response.
Errors
This function is a thin wrapper around
reqwest::Client.get(..)
, so it will return an error under the
same conditions in which reqwest would.