# YAML de configuration du service OpenWeather (owm)
# -----------------------------------------------------------------------------------------------
# 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: 'OpenWeather'
  #actif: true
  endpoint_requete: 'https://api.openweathermap.org/data/2.5/'
  endpoint_icone: 'http://openweathermap.org/img/w'
  credits:
    #titre:
    lien: 'http://openweathermap.org/'
  termes:
    titre: 'Licences'
    lien: 'https://openweathermap.org/full-price#licenses'
  enregistrement:
    titre: 'Create New Account'
    lien: 'https://home.openweathermap.org/users/sign_up'
    #taille_cle: 32
  offres:
    titre: 'Pricing'
    lien: 'https://openweathermap.org/price'
    #gratuite: true
    limites: { month: 1000000, minute: 60 }
  langues:
    codes_spip: ['af', 'ar', 'az', 'bg', 'ca', 'da', 'de', 'el', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'gl', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'lt', 'mk', 'nl', 'no', 'pl', 'pt', 'pt_br', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi', 'zh_tw', 'zu']
    codes_non_spip: { al: '', cz: 'cs', kr: 'ko', la: 'lv', zh_cn: 'zh' }
    defaut: 'en'
  transcodage_weather:
    200: [4, 4]
    201: [4, 4]
    202: [3, 3]
    210: [37, 37]
    211: [37, 37]
    212: [38, 38]
    221: [38, 38]
    230: [4, 4]
    231: [4, 4]
    232: [3, 3]
    300: [9, 9]
    301: [9, 9]
    302: [9, 9]
    310: [9, 9]
    311: [9, 9]
    312: [9, 9]
    313: [9, 9]
    314: [9, 9]
    321: [9, 9]
    500: [11, 11]
    501: [40, 40]
    502: [12, 12]
    503: [12, 12]
    504: [12, 12]
    511: [10, 10]
    520: [11, 11]
    521: [40, 40]
    522: [12, 12]
    531: [12, 12]
    600: [13, 13]
    601: [14, 14]
    602: [16, 16]
    611: [18, 18]
    612: [18, 18]
    613: [18, 18]
    615: [5, 5]
    616: [5, 5]
    620: [13, 13]
    621: [14, 14]
    622: [16, 16]
    701: [21, 21]
    711: [22, 22]
    721: [21, 21]
    731: [19, 19]
    741: [20, 20]
    751: [19, 19]
    761: [19, 19]
    762: [19, 19]
    771: [24, 24]
    781: [0, 0]
    800: [32, 31]
    801: [30, 29]
    802: [26, 26]
    803: [28, 27]
    804: [28, 27]
  # Valeurs par défauts des paramètres modifiables du service (formulaire de configuration)
  defauts:
    #inscription: ''
    #unite: 'm'
    #condition: 'owm'
    theme: 'n2x'
    theme_local: 'n2x'
    #theme_weather: 'sticker'

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

# Bloc Conditions (mashup des conditions temps réel)
# --------------------------------------------------
conditions:
  #periode_maj: 7200
  #format_flux: 'json'
  cle_base: [ ]
  donnees:
    derniere_maj:
      cle: ['dt']
    station:
      cle: [ ]
    temperature_reelle:
      cle: ['main', 'temp']
    temperature_ressentie:
      cle: ['main', 'feels_like']
    vitesse_vent:
      cle: ['wind', 'speed']
    angle_vent:
      cle: ['wind', 'deg']
    direction_vent:
      cle: [ ]
    precipitation:
      cle: [ ]
    humidite:
      cle: ['main', 'humidity']
    point_rosee:
      cle: [ ]
    pression:
      cle: ['main', 'pressure']
    tendance_pression:
      cle: [ ]
    visibilite:
      cle: ['visibility']
    nebulosite:
      cle: ['clouds', 'all']
    indice_uv:
      cle: [ ]
    code_meteo:
      cle: ['weather', 0, 'id']
    icon_meteo:
      cle: ['weather', 0, 'icon']
    desc_meteo:
      cle: ['weather', 0, 'description']
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ ]

# Bloc Prévisions (mashup des prévisions)
# ---------------------------------------
previsions:
  #periode_maj: 14400
  #format_flux: 'json'
  periodicites:
    24: { max_jours: 16 }
  periodicite_defaut: 24
  cle_base: ['list']
  cle_heure: [ ]
  structure_heure: false
  donnees:
    date:
      cle: ['dt']
    heure:
      cle: [ ]
    lever_soleil:
      cle: [ ]
    coucher_soleil:
      cle: [ ]
    temperature:
      cle: ['temp', 'day']
    temperature_max:
      cle: ['temp', 'max']
    temperature_min:
      cle: ['temp', 'min']
    vitesse_vent:
      cle: ['speed']
    angle_vent:
      cle: ['deg']
    direction_vent:
      cle: [ ]
    risque_precipitation:
      cle: [ ]
    precipitation:
      cle: ['rain']
    humidite:
      cle: ['humidity']
    point_rosee:
      cle: [ ]
    pression:
      cle: ['pressure']
    visibilite:
      cle: [ ]
    nebulosite:
      cle: ['clouds']
    indice_uv:
      cle: [ ]
    code_meteo:
      cle: ['weather', 0, 'id']
    icon_meteo:
      cle: ['weather', 0, 'icon']
    desc_meteo:
      cle: ['weather', 0, 'description']
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ ]

# Bloc Erreurs (mashup des erreurs du service)
# --------------------------------------------
erreurs:
  cle_base: [ ]
  donnees:
    code:
      cle: ['cod']
    message:
      cle: ['message']
