Get Weather Forecasts from OpenWeatherMap.
Full details on all API methods that are available at https://openweathermap.org/api.
Name | Type | Description | |
---|---|---|---|
apiKey |
string
|
Obtain an OpenWeatherMap |
|
units |
string
|
|
Optional |
const OpenWeatherMap = require('vendor/OpenWeatherMap.js');
const client = new OpenWeatherMap(Secret.get('openweathermap-key'));
const forecast = client.getForecast(latitude, longitude);
Void
Gets a 16-day forecast.
Name | Type | Description | |
---|---|---|---|
latitude |
float
|
||
longitude |
float
|
Make an OpenWeatherMap API call.
Name | Type | Description | |
---|---|---|---|
method |
string
|
The OpenWeatherMap API method to call. Example: |
|
params |
object
|
Additional parameters to send. Example |
Void
Construct OpenWeatherMap authentication
Name | Type | Description | |
---|---|---|---|
apiKey |
string
|
Obtain an OpenWeatherMap |
|
units |
string
|
|
Optional |
Void
{"cod":"200","message":0.0032,
"city":{"id":1851632,"name":"Shuzenji",
"coord":{"lon":138.933334,"lat":34.966671},
"country":"JP"
"timezone": 32400},
"cnt":10,
"list":[{
"dt":1406080800,
"temp":{
"day":297.77,
"min":293.52,
"max":297.77,
"night":293.52,
"eve":297.77,
"morn":297.77},
"pressure":925.04,
"humidity":76,
"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],}
]}