openweather 0.0.1

A rust crate wrapping openweather's API into a simple easy to use interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate openweather;

use openweather::LocationSpecifier;
static API_KEY: &str = "YOUR_API_KEY_HERE";

fn main() 
{
    let loc = LocationSpecifier::CityAndCountryName{city:"Minneapolis", country:"USA"};
    let weather = openweather::get_current_weather(loc, API_KEY).unwrap();
    println!("Right now in Minneapolis, MN it is {}K", weather.main.temp);
}