# 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'
  # -- Version de la configuration du service
  version:
    numero: '6'
    date: '2023-11-26'
  # -- URL de base des requêtes et des icones (éventuellement)
  endpoint_requete: 'https://api.openweathermap.org/data/2.5/'
  endpoint_icone: 'http://openweathermap.org/img/w'
  lieu_formats: [ 'latitude_longitude', 'city_id', 'ville_pays' ]
  # -- Activité: par défaut à true, donc à laisser en commentaire. A mettre à false si on veut déprécier le service
  actif: true
  # -- Liens vers les crédits et titre de la page (pour les affichages / modèles)
  #    Le logo, si il existe, est chargé automatiquement à partir du chemin /services/images/<id>.png
  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'
  # -- Configuration des jeux d'icones utilisables
  icones:
    origines: [ 'api', 'local', 'weather' ]
    themes_api: [ 'n2x', 'n1x', 'o1x' ]
    transcodages:
      200: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      201: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      202: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      210: { local: [ '11d', '11n' ], weather: [ '4', '4' ], wmo: [ ] }
      211: { local: [ '11d', '11n' ], weather: [ '4', '4' ], wmo: [ ] }
      212: { local: [ '11d', '11n' ], weather: [ '4', '4' ], wmo: [ ] }
      221: { local: [ '11d', '11n' ], weather: [ '4', '4' ], wmo: [ ] }
      230: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      231: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      232: { local: [ '11d', '11n' ], weather: [ '3', '3' ], wmo: [ ] }
      300: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      301: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      302: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      310: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      311: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      312: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      313: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      314: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      321: { local: [ '09d', '09n' ], weather: [ '9', '9' ], wmo: [ ] }
      500: { local: [ '10d', '10n' ], weather: [ '12', '12' ], wmo: [ ] }
      501: { local: [ '10d', '10n' ], weather: [ '12', '12' ], wmo: [ ] }
      502: { local: [ '10d', '10n' ], weather: [ '40', '40' ], wmo: [ ] }
      503: { local: [ '10d', '10n' ], weather: [ '40', '40' ], wmo: [ ] }
      504: { local: [ '10d', '10n' ], weather: [ '40', '40' ], wmo: [ ] }
      511: { local: [ '13d', '13n' ], weather: [ '10', '10' ], wmo: [ ] }
      520: { local: [ '09d', '09n' ], weather: [ '11', '11' ], wmo: [ ] }
      521: { local: [ '09d', '09n' ], weather: [ '11', '11' ], wmo: [ ] }
      522: { local: [ '09d', '09n' ], weather: [ '11', '11' ], wmo: [ ] }
      531: { local: [ '09d', '09n' ], weather: [ '11', '11' ], wmo: [ ] }
      600: { local: [ '13d', '13n' ], weather: [ '14', '14' ], wmo: [ ] }
      601: { local: [ '13d', '13n' ], weather: [ '16', '16' ], wmo: [ ] }
      602: { local: [ '13d', '13n' ], weather: [ '42', '42' ], wmo: [ ] }
      611: { local: [ '13d', '13n' ], weather: [ '18', '18' ], wmo: [ ] }
      612: { local: [ '13d', '13n' ], weather: [ '18', '18' ], wmo: [ ] }
      613: { local: [ '13d', '13n' ], weather: [ '18', '18' ], wmo: [ ] }
      615: { local: [ '13d', '13n' ], weather: [ '5', '5' ], wmo: [ ] }
      616: { local: [ '13d', '13n' ], weather: [ '5', '5' ], wmo: [ ] }
      620: { local: [ '13d', '13n' ], weather: [ '14', '14' ], wmo: [ ] }
      621: { local: [ '13d', '13n' ], weather: [ '16', '16' ], wmo: [ ] }
      622: { local: [ '13d', '13n' ], weather: [ '16', '16' ], wmo: [ ] }
      701: { local: [ '50d', '50n' ], weather: [ '21', '21' ], wmo: [ ] }
      711: { local: [ '50d', '50n' ], weather: [ '22', '22' ], wmo: [ ] }
      721: { local: [ '50d', '50n' ], weather: [ '21', '21' ], wmo: [ ] }
      731: { local: [ '50d', '50n' ], weather: [ '19', '19' ], wmo: [ ] }
      741: { local: [ '50d', '50n' ], weather: [ '20', '20' ], wmo: [ ] }
      751: { local: [ '50d', '50n' ], weather: [ '19', '19' ], wmo: [ ] }
      761: { local: [ '50d', '50n' ], weather: [ '19', '19' ], wmo: [ ] }
      762: { local: [ '50d', '50n' ], weather: [ '19', '19' ], wmo: [ ] }
      771: { local: [ '50d', '50n' ], weather: [ '24', '24' ], wmo: [ ] }
      781: { local: [ '50d', '50n' ], weather: [ '0', '0' ], wmo: [ ] }
      800: { local: [ '01d', '01n' ], weather: [ '32', '31' ], wmo: [ ] }
      801: { local: [ '02d', '02n' ], weather: [ '34', '33' ], wmo: [ ] }
      802: { local: [ '03d', '03n' ], weather: [ '34', '33' ], wmo: [ ] }
      803: { local: [ '04d', '04n' ], weather: [ '28', '27' ], wmo: [ ] }
      804: { local: [ '04d', '04n' ], weather: [ '26', '26' ], wmo: [ ] }
  # 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']
    rafale_vent:
      cle: ['wind', 'gust']
    angle_vent:
      cle: ['wind', 'deg']
    direction_vent:
      cle: [ ]
      calcul: true
    precipitation:
      cle: [ ]
    humidite:
      cle: ['main', 'humidity']
    point_rosee:
      cle: [ ]
      calcul: true
    pression:
      cle: ['main', 'pressure']
    tendance_pression:
      cle: [ ]
    visibilite:
      cle: ['visibility']
    nebulosite:
      cle: ['clouds', 'all']
    indice_uv:
      cle: [ ]
    risque_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: [ ]
    code:
      cle: [ ]
      calcul: true
    icone:
      cle: [ ]
      calcul: true
    resume:
      cle: [ ]
      calcul: true
    periode:
      cle: [ ]
      calcul: true

# 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']
    rafale_vent:
      cle: ['gust']
    angle_vent:
      cle: ['deg']
    direction_vent:
      cle: [ ]
      calcul: true
    risque_precipitation:
      cle: [ ]
    precipitation:
      cle: ['rain']
    humidite:
      cle: ['humidity']
    point_rosee:
      cle: [ ]
    pression:
      cle: ['pressure']
    visibilite:
      cle: [ ]
    nebulosite:
      cle: ['clouds']
    indice_uv:
      cle: [ ]
    risque_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: [ ]
    code:
      cle: [ ]
      calcul: true
    icone:
      cle: [ ]
      calcul: true
    resume:
      cle: [ ]
      calcul: true
    periode:
      cle: [ ]
      calcul: true

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