# YAML de configuration du service Weatherbit.io (weatherbit)
# -----------------------------------------------------------------------------------------------
# Il est composé de 5 blocs, à savoir :
# - service    : la configuration du service lui-même, son titre, son id, ses caractéristiques...
# - infos      : la configuration du mash-up pour les informations sur le lieu de la météo
# - conditions : la configuration du mash-up pour les conditions temps réel
# - previsions : la configuration du mash-up pour les prévisions
# - erreurs    : la configuration du mash-up pour les erreurs fournies par le service
#
# Si un champ vaut la valeur par défaut il est possible de l'omettre.
# -----------------------------------------------------------------------------------------------

# Bloc service : caractéristiques du service
# ------------------------------------------
service:
  nom: 'Weatherbit.io'
  #actif: true
  endpoint_requete: 'https://api.weatherbit.io/v2.0/'
  endpoint_icone: 'https://www.weatherbit.io/static/img/icons/'
  credits:
    titre: 'Weatherbit API'
    lien: 'https://www.weatherbit.io/'
  termes:
    titre: 'Terms of Service'
    lien: 'https://www.weatherbit.io/terms'
  enregistrement:
    titre: 'Sign up for the Weatherbit API!'
    lien: 'https://www.weatherbit.io/account/create'
    #taille_cle: 32
  offres:
    titre: 'Weather API - Pricing'
    lien: 'https://www.weatherbit.io/pricing'
    #gratuite: true
    limites: { day: 500, second: 1 }
  langues:
    codes_spip: ['ar', 'az', 'be', 'bg', 'bs', 'ca', 'da', 'de', 'el', 'en', 'es', 'et', 'fi', 'fr', 'hr', 'hu', 'id', 'is', 'it', 'lt', 'nb', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'tr', 'zh', 'zh_tw']
    codes_non_spip: { cz: 'cs', iw: 'he', kw: '' }
    defaut: 'en'
  transcodage_weather:
    200: [4, 4]
    201: [4, 4]
    202: [3, 3]
    230: [4, 4]
    231: [4, 4]
    232: [3, 3]
    233: [3, 3]
    300: [9, 9]
    301: [9, 9]
    302: [9, 9]
    500: [11, 11]
    501: [40, 40]
    502: [12, 12]
    511: [10, 10]
    520: [11, 11]
    521: [40, 40]
    522: [12, 12]
    600: [13, 13]
    601: [14, 14]
    602: [16, 16]
    610: [5, 5]
    611: [18, 18]
    612: [18, 18]
    621: [14, 14]
    622: [16, 16]
    623: [13, 13]
    700: [21, 21]
    711: [22, 22]
    721: [21, 21]
    731: [19, 19]
    741: [20, 20]
    751: [19, 19]
    800: [32, 31]
    801: [30, 29]
    802: [26, 26]
    803: [28, 27]
    804: [28, 27]
  defauts:
    #inscription: ''
    #unite: 'm'
    #condition: 'weatherbit'
    theme: ''
    theme_local: 'original'
    #theme_weather: 'sticker'

# Bloc Infos (mashup des information géographiques)
# -------------------------------------------------
infos:
  #periode_maj: 2592000
  #format_flux: 'json'
  cle_base: ['data', 0]
  donnees:
    ville:
      cle: ['city_name']
    pays:
      cle: [ ]
    pays_iso2:
      cle: ['country_code']
    region:
      cle: [ ]
    longitude:
      cle: ['lon']
    latitude:
      cle: ['lat']

# Bloc Conditions (mashup des conditions temps réel)
# --------------------------------------------------
conditions:
  periode_maj: 10800
  #format_flux: 'json'
  cle_base: [ 'data', 0 ]
  donnees:
    derniere_maj:
      cle: ['ob_time']
    station:
      cle: [ ]
    temperature_reelle:
      cle: ['temp']
    temperature_ressentie:
      cle: ['app_temp']
    vitesse_vent:
      cle: ['wind_spd']
    angle_vent:
      cle: ['wind_dir']
    direction_vent:
      cle: [ ]
    precipitation:
      cle: ['precip']
    humidite:
      cle: ['rh']
    point_rosee:
      cle: ['dewpt']
    pression:
      cle: ['pres']
    tendance_pression:
      cle: [ ]
    visibilite:
      cle: ['vis']
    nebulosite:
      cle: ['clouds']
    indice_uv:
      cle: ['uv']
    code_meteo:
      cle: ['weather', 'code']
    icon_meteo:
      cle: ['weather', 'icon']
    desc_meteo:
      cle: ['weather', 'description']
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: ['pod']

# Bloc Prévisions (mashup des prévisions)
# ---------------------------------------
previsions:
  #periode_maj: 14400
  #format_flux: 'json'
  periodicites:
    24: { max_jours: 16 }
    3: { max_jours: 5 }
    1: { max_jours: 5 }
  periodicite_defaut: 24
  cle_base: ['data']
  cle_heure: [ ]
  structure_heure: false
  donnees:
    date:
      cle: ['valid_date']
    heure:
      cle: [ ]
    lever_soleil:
      cle: [ ]
    coucher_soleil:
      cle: [ ]
    temperature:
      cle: ['temp']
    temperature_max:
      cle: ['max_temp']
    temperature_min:
      cle: ['min_temp']
    vitesse_vent:
      cle: ['wind_spd']
    angle_vent:
      cle: ['wind_dir']
    direction_vent:
      cle: ['wind_cdir']
    risque_precipitation:
      cle: ['pop']
    precipitation:
      cle: ['precip']
    humidite:
      cle: ['rh']
    point_rosee:
      cle: ['dewpt']
    pression:
      cle: ['pres']
    visibilite:
      cle: ['vis']
    nebulosite:
      cle: ['clouds']
    indice_uv:
      cle: ['uv']
    code_meteo:
      cle: ['weather', 'code']
    icon_meteo:
      cle: ['weather', 'icon']
    desc_meteo:
      cle: ['weather', 'description']
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ ]

erreurs:
  cle_base: [ ]
  donnees:
    code:
      cle: [ ]
    message:
      cle: [error]
