[−][src]Function rparif::episode
pub fn episode(api_key: &str) -> Result<Vec<Episode>, RParifError>
Convenient function that allow easy to access episode
endpoint.
If multiple calls needs to be made to HTTP API, use RParifClient
Arguments
Errors
-
RParifError::RequestError when reqwest lib fails. It contains the underlying error.
-
RParifError::CallError when HTTP status is other than 2XX. It contains the URL called, the HTTP status and the body response
-
RParifError::UnexpectedDate if the date can't be parsed (see
convert_string_to_date
) -
RParifError::MissingJsonKey if missing JSON is missing
ninsee
orindice
-
RParifError::WrongJsonType if
ninsee
isn't a string orindice
is not a number or if JSON is not as expected -
RParifError::JsonError if response isn't a well formed JSON