mozaik-ext-weather
v1.2.0 weather meteo mozaik widget extension dashboard
Mozaïk weather widgets
Weather Client Configuration
In order to use the Mozaïk weather widgets, you must configure its client.
parameters
key | env key | required | description |
---|---|---|---|
token |
WEATHER_API_TOKEN | yes | openweathermap api token |
using config.js
{
//…
api: {
weather: {
token: 'secret_api_token'
}
}
}
using environment variable
Simply set WEATHER_API_TOKEN env variable, using .env
or manually.
Weather — Weather
Show weather for given city/country
parameters
key | required | description |
---|---|---|
city |
yes | The city you want to display weather for. |
country |
yes | The country you want to display weather for. |
lang |
no | Lang used to display weather info. Defaults to en . |
limit |
no | Limit displayed days. Defaults to 3 . |
usage
{
type: 'weather.weather',
city: 'Paris',
country: 'FR',
lang: 'fr',
limit: 2,
columns: 1, rows: 1,
x: 0, y: 0
},
{
type: 'weather.weather',
city: 'Tokyo',
country: 'JP',
lang: 'en',
limit: 3,
columns: 1, rows: 1,
x: 1, y: 0
},
{
type: 'weather.weather',
city: 'Barcelona',
country: 'ES',
lang: 'es',
limit: 4,
columns: 1, rows: 1,
x: 2, y: 0
}
npm i mozaik-ext-weather
Metadata
- MIT
- >=0.12.x
- Raphaël Benitte
- released 4/4/2016