1.2.0 • Published 8 years ago

mozaik-ext-weather v1.2.0

Weekly downloads
70
License
MIT
Repository
github
Last release
8 years ago

Mozaïk weather widgets

License Travis CI NPM version Dependencies Coverage Status widget count

Weather Client Configuration

In order to use the Mozaïk weather widgets, you must configure its client.

parameters

keyenv keyrequireddescription
tokenWEATHER_API_TOKENyesopenweathermap 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

clock

parameters

keyrequireddescription
cityyes The city you want to display weather for.
countryyesThe country you want to display weather for.
langnoLang used to display weather info. Defaults to en.
limitnoLimit 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
}