# 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'
  #actif: true
  endpoint_requete: 'https://api.worldweatheronline.com/premium/v1/weather.ashx'
  endpoint_icone: ''
  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'
  transcodage_weather:
    113: [ 32, 31 ]
    116: [ 30, 29 ]
    119: [ 26, 26 ]
    122: [ 28, 27 ]
    143: [ 21, 21 ]
    176: [ 39, 45 ]
    179: [ 41, 46 ]
    182: [ 18, 18 ]
    185: [ 18, 18 ]
    200: [ 47, 47 ]
    227: [ 15, 15 ]
    230: [ 43, 43 ]
    248: [ 20, 20 ]
    260: [ 20, 20 ]
    263: [ 9, 9 ]
    266: [ 9, 9 ]
    281: [ 8, 8 ]
    284: [ 8, 8 ]
    293: [ 12, 12 ]
    296: [ 12, 12 ]
    299: [ 11, 11 ]
    302: [ 40, 40 ]
    305: [ 11, 11 ]
    308: [ 40, 40 ]
    311: [ 10, 10 ]
    314: [ 10, 10 ]
    317: [ 18, 18 ]
    320: [ 18, 18 ]
    323: [ 14, 14 ]
    326: [ 14, 14 ]
    329: [ 16, 16 ]
    332: [ 16, 16 ]
    335: [ 41, 46 ]
    338: [ 42, 42 ]
    350: [ 18, 18 ]
    353: [ 9, 9 ]
    356: [ 11, 11 ]
    359: [ 40, 40 ]
    362: [ 18, 18 ]
    365: [ 18, 18 ]
    368: [ 14, 14 ]
    371: [ 42, 42 ]
    374: [ 18, 18 ]
    377: [ 18, 18 ]
    386: [ 38, 47 ]
    389: [ 38, 47 ]
    392: [ 38, 47 ]
    395: [ 38, 47 ]
  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' }
    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: [ ]
    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: [ ]
    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: [ ]

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' }
    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' ]
    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: [ ]

# Bloc Erreurs (mashup des erreurs du service)
# --------------------------------------------
erreurs:
  cle_base: [ 'data', 'error', 0]
  donnees:
    code:
      cle: [ ]
    message:
      cle: [ 'msg' ]
