wunderground-api
Install
$ npm install wunderground-api --save
Use
var Wunderground = ;var client = 'your api key here' 'Washington' 'DC';
All parameters are optional at the point of init, you can change them later by adding in an object
var Wunderground = ;var client = ;
Examples
var Wunderground = ;var client = 'your api key here' 'Washington' 'DC'; client; client;
No config at the point of init
var Wunderground = ;var client = ;var opts = key:'your api key here' city:'Washington' state: 'DC' client; client;
Half init, opts will always overwrite init
var Wunderground = ;var client = 'your api key here';var opts = city:'Washington' state: 'DC' client; client;
Config Api
WundergroundClient(apiKey, city, state)
Init a new Wunderground client for API use, all params optional at init and can be overwritten
Params:
-
String apiKey - the Wunderground api key
-
String city - city for weather data
-
String state - state for weather data
Opts
Optional object passed into API
Props
- String key - wunderground key
- String city - city
- String state - state
API
conditions(opts, callback)
Gets conditions for a specific location
Params:
- Object opts - optional object that bypasses initting a client
- Function callback - returns err, data
forecast(opts, callback)
Gets forecast for a specific location
Params:
- Object opts - optional object that bypasses initting a client
- Function callback - returns err, data
forecast10day(opts, callback)
Gets forecast 10 days in advance for a specific location
Params:
- Object opts - optional object that bypasses initting a client
- Function callback - returns err, data
hourly(opts, callback)
Gets hourly conditions for a specific location
Params:
- Object opts - optional object that bypasses initting a client
- Function callback - returns err, data
hourly10day(opts, callback)
Gets hourly conditions 10 days in advance for a specific location
Params:
- Object opts - optional object that bypasses initting a client
- Function callback - returns err, data