openweather
Simple Weather Retrieval Module for http://openweathermap.org/
Version
1.0.4
Installation
$ npm i --save openweather
Usage
Obtain api "key" from http://openweathermap.org/ after registration. It is called "APPID". You may load it as an environment variable or include it as an optional parameter.
var openWeather = ; // Returns data from open weather using desired // coordinates, city name, or zip code from a object or city name: openWeather; // Example coordinate object:"latitude": 37 "longitude": -122 // Example city object. Country is optional "city": "San Francisco" "country": "ca" // Example zip code object "zip": "94115" // Example data from result includes temperature // in Kelvins, Fahrenheit, and Celsius: "lon": -12312 "lat": 4925 "city": "Vancouver" "country": "CA" "sunset": 1467433243 "sunrise": 1467375137 "humidity": 68 "pressure": 1019 "icon": "http://openweathermap.org/img/w/04d.png" "weather": "Clouds" "weatherDes": "broken clouds" "windSpeed": 36 "avgTempK": 29307 "minTempK": 28915 "maxTempK": 29648 "avgTempC": 1992 "minTempC": 16 "maxTempC": 2333 "avgTempF": 6786 "minTempF": 608 "maxTempF": 7399 };
License
MIT