2 releases

0.1.1 Mar 8, 2020
0.1.0 Sep 3, 2019

#18 in #forecast

WTFPL license

60KB
531 lines

Accuweather crate

Build Status Crates.io

This crate provides a client to accuweather forecast and current condition api. At the moment there is only three functions to interact with the api.

Example

extern crate accuweather;

let api_key = "abcdefg".to_string();
let client = accuweather::Accuweather::new(api_key, Some(12345), None);
// get next 12 hours of hourly forecasts
let hourly_forecasts = client.get_hourly_forecasts(12);

let daily_forecasts = client.get_daily_forecasts(5);
let conditions = client.get_current_conditions();

lib.rs:

Accuweather a crate to interact with accuweather api

This crate provides a client to accuweather forecast and current conditions api. At the moment there is only three functions to interact with the api

Example

extern crate accuweather;
#[cfg(doctest)]
let _mocks = tests::set_mocks();
let api_key = "abcdefg".to_string();
let client = accuweather::Accuweather::new(api_key, Some(12345), None);
// get next 12 hours of hourly forecasts
let hourly_forecasts = client.get_hourly_forecasts(12);

let daily_forecasts = client.get_daily_forecasts(5);
let conditions = client.get_current_conditions();

Dependencies

~24MB
~493K SLoC