# YAML d'initialisation de la configuration du service World Weather Online (wwo)
# -----------------------------------------------------------------------------------------------
# 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: 'World Weather Online'
  # -- 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.worldweatheronline.com/premium/v1/weather.ashx'
  endpoint_icone: ''
  lieu_formats: [ 'latitude_longitude', 'ville_pays', 'adresse_ip' ]
  # -- 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: 'Free local weather content provider'
    lien: 'https://www.worldweatheronline.com/developer/'
  termes:
    titre: 'API Terms and Conditions'
    lien: 'https://www.worldweatheronline.com/developer/api/api-t-and-c.aspx'
  enregistrement:
    titre: 'Signup'
    lien: 'https://www.worldweatheronline.com/developer/signup.aspx'
    #taille_cle: 32
  offres:
    titre: 'Pricing'
    lien: 'https://www.worldweatheronline.com/developer/api/pricing2.aspx'
    gratuite: false
    limites: { day: 2000 }
  langues:
    codes_spip: [ 'ar', 'bg', 'bn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fi', 'fr', 'hi', 'hu', 'it', 'ja', 'jv', 'ko', 'mr', 'nl', 'pa', 'pl', 'pt', 'ro', 'ru', 'si', 'sk', 'sr', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'vi', 'zh', 'zh_tw', 'zu' ]
    codes_non_spip: { zh_cmn: '', zh_wuu: '', zh_hsn: '', zh_yue: '' }
    defaut: 'en'
  # -- Configuration des jeux d'icones utilisables
  icones:
    origines: [ 'api', 'local', 'weather' ]
    transcodages:
      113: { local: [ '113d', '113n' ], weather: [ '32', '31' ], wmo: [ ] }
      116: { local: [ '116d', '116n' ], weather: [ '30', '29' ], wmo: [ ] }
      119: { local: [ '119d', '119n' ], weather: [ '28', '27' ], wmo: [ ] }
      122: { local: [ '122d', '122n' ], weather: [ '26', '26' ], wmo: [ ] }
      143: { local: [ '143d', '143n' ], weather: [ '21', '21' ], wmo: [ ] }
      176: { local: [ '176d', '176n' ], weather: [ '12', '12' ], wmo: [ ] }
      179: { local: [ '179d', '179n' ], weather: [ '16', '16' ], wmo: [ ] }
      182: { local: [ '182d', '182n' ], weather: [ '18', '18' ], wmo: [ ] }
      185: { local: [ '185d', '185n' ], weather: [ '8', '8' ], wmo: [ ] }
      200: { local: [ '200d', '200n' ], weather: [ '38', '38' ], wmo: [ ] }
      227: { local: [ '227d', '227n' ], weather: [ '15', '15' ], wmo: [ ] }
      230: { local: [ '230d', '230n' ], weather: [ '43', '43' ], wmo: [ ] }
      248: { local: [ '248d', '248n' ], weather: [ '20', '20' ], wmo: [ ] }
      260: { local: [ '260d', '260n' ], weather: [ '20', '20' ], wmo: [ ] }
      263: { local: [ '263d', '263n' ], weather: [ '9', '9' ], wmo: [ ] }
      266: { local: [ '266d', '266n' ], weather: [ '9', '9' ], wmo: [ ] }
      281: { local: [ '281d', '281n' ], weather: [ '8', '8' ], wmo: [ ] }
      284: { local: [ '284d', '284n' ], weather: [ '8', '8' ], wmo: [ ] }
      293: { local: [ '293d', '293n' ], weather: [ '12', '12' ], wmo: [ ] }
      296: { local: [ '296d', '296n' ], weather: [ '12', '12' ], wmo: [ ] }
      299: { local: [ '299d', '299n' ], weather: [ '12', '12' ], wmo: [ ] }
      302: { local: [ '302d', '302n' ], weather: [ '12', '12' ], wmo: [ ] }
      305: { local: [ '305d', '305n' ], weather: [ '40', '40' ], wmo: [ ] }
      308: { local: [ '308d', '308n' ], weather: [ '40', '40' ], wmo: [ ] }
      311: { local: [ '311d', '311n' ], weather: [ '10', '10' ], wmo: [ ] }
      314: { local: [ '314d', '314n' ], weather: [ '10', '10' ], wmo: [ ] }
      317: { local: [ '317d', '317n' ], weather: [ '18', '18' ], wmo: [ ] }
      320: { local: [ '320d', '320n' ], weather: [ '18', '18' ], wmo: [ ] }
      323: { local: [ '323d', '323n' ], weather: [ '14', '14' ], wmo: [ ] }
      326: { local: [ '326d', '326n' ], weather: [ '14', '14' ], wmo: [ ] }
      329: { local: [ '329d', '329n' ], weather: [ '16', '16' ], wmo: [ ] }
      332: { local: [ '332d', '332n' ], weather: [ '16', '16' ], wmo: [ ] }
      335: { local: [ '335d', '335n' ], weather: [ '42', '42' ], wmo: [ ] }
      338: { local: [ '338d', '338n' ], weather: [ '42', '42' ], wmo: [ ] }
      350: { local: [ '350d', '350n' ], weather: [ '10', '10' ], wmo: [ ] }
      353: { local: [ '353d', '353n' ], weather: [ '11', '11' ], wmo: [ ] }
      356: { local: [ '356d', '356n' ], weather: [ '11', '11' ], wmo: [ ] }
      359: { local: [ '359d', '359n' ], weather: [ '40', '40' ], wmo: [ ] }
      362: { local: [ '362d', '362n' ], weather: [ '18', '18' ], wmo: [ ] }
      365: { local: [ '365d', '365n' ], weather: [ '18', '18' ], wmo: [ ] }
      368: { local: [ '368d', '368n' ], weather: [ '14', '14' ], wmo: [ ] }
      371: { local: [ '371d', '371n' ], weather: [ '42', '42' ], wmo: [ ] }
      374: { local: [ '374d', '374n' ], weather: [ '10', '10' ], wmo: [ ] }
      377: { local: [ '377d', '377n' ], weather: [ '10', '10' ], wmo: [ ] }
      386: { local: [ '386d', '386n' ], weather: [ '39', '45' ], wmo: [ ] }
      389: { local: [ '389d', '389n' ], weather: [ '39', '45' ], wmo: [ ] }
      392: { local: [ '392d', '392n' ], weather: [ '41', '46' ], wmo: [ ] }
      395: { local: [ '395d', '395n' ], weather: [ '41', '46' ], wmo: [ ] }
  defauts:
    #inscription: ''
    #unite: 'm'
    #condition: 'wwo'
    theme: ''
    theme_local: 'original'
    #theme_weather: 'sticker'

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

# Bloc Conditions (mashup des conditions temps réel)
# --------------------------------------------------
conditions:
  periode_maj: 10800
  #format_flux: json
  cle_base: [ 'data', 'current_condition', 0 ]
  donnees:
    derniere_maj:
      cle: [ 'localObsDateTime' ]
    station:
      cle: [ ]
    temperature_reelle:
      cle: [ 'temp_' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    temperature_ressentie:
      cle: [ 'FeelsLike' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    vitesse_vent:
      cle: [ 'windspeed' ]
      suffixe_unite: { id_cle: 0, m: 'Kmph', s: 'Miles' }
    rafale_vent:
      cle: []
    angle_vent:
      cle: [ 'winddirDegree' ]
    direction_vent:
      cle: [ 'winddir16Point' ]
    precipitation:
      cle: [ 'precip' ]
      suffixe_unite: { id_cle: 0, m: 'MM', s: 'Inches' }
    humidite:
      cle: [ 'humidity' ]
    point_rosee:
      cle: [ ]
      calcul: true
    pression:
      cle: [ 'pressure' ]
      suffixe_unite: { id_cle: 0, m: '', s: 'Inches' }
    tendance_pression:
      cle: [ ]
    visibilite:
      cle: [ 'visibility' ]
      suffixe_unite: { id_cle: 0, m: '', s: 'Miles' }
    nebulosite:
      cle: [ 'cloudcover' ]
    indice_uv:
      cle: [ ]
    risque_uv:
      cle: [ ]
    code_meteo:
      cle: [ 'weatherCode' ]
    icon_meteo:
      cle: [ 'weatherIconUrl', 0, 'value' ]
    desc_meteo:
      cle: [ 'weatherDesc', 0, 'value' ]
    trad_meteo:
      cle: [ 'lang_', 0, 'value' ]
      suffixe_langue: { id_cle: 0 }
    jour_meteo:
      cle: [ ]
    code:
      cle: [ ]
      calcul: true
    icone:
      cle: [ ]
      calcul: true
    resume:
      cle: [ ]
      calcul: true
    periode:
      cle: [ ]
      calcul: true

previsions:
  #periode_maj: 14400
  #format_flux: 'json'
  periodicites:
    24: { max_jours: 14 }
    12: { max_jours: 14 }
    3: { max_jours: 14 }
    1: { max_jours: 14 }
  periodicite_defaut: 24
  cle_base: [ 'data', 'weather']
  cle_heure: [ 'hourly' ]
  structure_heure: true
  donnees:
    date:
      cle: [ 'date' ]
    heure:
      cle: [ 'time' ]
    lever_soleil:
      cle: [ 'astronomy', 0, 'sunrise' ]
    coucher_soleil:
      cle: [ 'astronomy', 0, 'sunset' ]
    temperature:
      cle: [ 'temp' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    temperature_max:
      cle: [ 'maxtemp' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    temperature_min:
      cle: [ 'mintemp' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    vitesse_vent:
      cle: [ 'windspeed' ]
      suffixe_unite: { id_cle: 0, m: 'Kmph', s: 'Miles' }
    rafale_vent:
      cle: [ 'WindGust' ]
      suffixe_unite: { id_cle: 0, m: 'Kmph', s: 'Miles' }
    angle_vent:
      cle: [ 'winddirDegree' ]
    direction_vent:
      cle: [ 'winddir16Point' ]
    risque_precipitation:
      cle: [ 'chanceofrain' ]
    precipitation:
      cle: [ 'precip' ]
      suffixe_unite: { id_cle: 0, m: 'MM', s: 'Inches' }
    humidite:
      cle: [ 'humidity' ]
    point_rosee:
      cle: [ 'DewPoint' ]
      suffixe_unite: { id_cle: 0, m: 'C', s: 'F' }
    pression:
      cle: [ 'pressure' ]
      suffixe_unite: { id_cle: 0, m: '', s: 'Inches' }
    visibilite:
      cle: [ 'visibility' ]
      suffixe_unite: { id_cle: 0, m: '', s: 'Miles' }
    nebulosite:
      cle: [ 'cloudcover' ]
    indice_uv:
      cle: [ 'uvIndex' ]
    risque_uv:
      cle: [ ]
      calcul: true
    code_meteo:
      cle: [ 'weatherCode' ]
    icon_meteo:
      cle: [ 'weatherIconUrl', 0, 'value' ]
    desc_meteo:
      cle: [ 'weatherDesc', 0, 'value' ]
    trad_meteo:
      cle: [ 'lang_', 0, 'value' ]
      suffixe_langue: { id_cle: 0 }
    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: [ 'data', 'error', 0]
  donnees:
    code:
      cle: [ ]
    message:
      cle: [ 'msg' ]
