# YAML d'initialisation de la configuration du service WeatherAPI (weatherapi)
# -----------------------------------------------------------------------------------------------
# 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: 'WeatherAPI'
  #actif: true
  endpoint_requete: 'https://api.weatherapi.com/v1'
  endpoint_icone: ''
  credits:
    titre: 'WeatherAPI.com'
    lien: 'https://www.weatherapi.com/'
  termes:
    titre: 'Terms and Conditions'
    lien: 'https://www.weatherapi.com/terms.aspx'
  enregistrement:
    titre: 'Sign Up'
    lien: 'https://www.weatherapi.com/signup.aspx'
    taille_cle: 30
  offres:
    titre: 'Pricing - WeatherAPI.com'
    lien: 'https://www.weatherapi.com/pricing.aspx'
    #gratuite: true
    limites: { month: 1000000 }
  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_hsn: '', zh_wuu: '', zh_yue: '' }
    defaut: 'en'
  transcodage_weather:
    113: [32, 31]
    116: [ 30, 29 ]
    119: [ 28, 27 ]
    122: [ 26, 26 ]
    143: [ 20, 20 ]
    176: [ 40, 49 ]
    179: [ 16, 16 ]
    182: [ 18, 18 ]
    185: [ 10, 10 ]
    200: [ 38, 47 ]
    227: [ 15, 15 ]
    230: [ 16, 16 ]
    248: [ 20, 20 ]
    260: [ 20, 20 ]
    263: [ 9, 9 ]
    266: [ 9, 9 ]
    281: [ 9, 9 ]
    284: [ 10, 10 ]
    293: [ 9, 9 ]
    296: [ 9, 9 ]
    299: [ 39, 45 ]
    302: [ 11, 11 ]
    305: [ 39, 45 ]
    308: [ 40, 40 ]
    311: [ 8, 8 ]
    314: [ 8, 8 ]
    317: [ 18, 18 ]
    320: [ 18, 18 ]
    323: [ 13, 13 ]
    326: [ 13, 13 ]
    329: [ 14, 14 ]
    332: [ 14, 14 ]
    335: [ 16, 16 ]
    338: [ 16, 16 ]
    350: [ 18, 18 ]
    353: [ 9, 9 ]
    356: [ 11, 11 ]
    359: [ 11, 11 ]
    362: [ 6, 6 ]
    365: [ 6, 6 ]
    368: [ 13, 13 ]
    371: [ 14, 14 ]
    374: [ 6, 6 ]
    377: [ 6, 6 ]
    386: [ 37, 47 ]
    389: [ 38, 47 ]
    392: [ 41, 46 ]
    395: [ 41, 46 ]
  defauts:
    #inscription: ''
    #unite: 'm'
    #condition: 'weatherapi'
    theme: ''
    theme_local: 'original'
    #theme_weather: 'sticker'

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

# Bloc Conditions (mashup des conditions temps réel)
# --------------------------------------------------
conditions:
  periode_maj: 10800
  #format_flux: 'json'
  cle_base: [ 'current' ]
  donnees:
    derniere_maj:
      cle: [ 'last_updated' ]
    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: [ 'wind_' ]
      suffixe_unite: { id_cle: 0, m: 'kph', s: 'mph' }
    angle_vent:
      cle: [ 'wind_degree' ]
    direction_vent:
      cle: [ 'wind_dir' ]
    precipitation:
      cle: [ 'precip_' ]
      suffixe_unite: { id_cle: 0, m: 'mm', s: 'in' }
    humidite:
      cle: [ 'humidity' ]
    point_rosee:
      cle: [ ]
    pression:
      cle: [ 'pressure_' ]
      suffixe_unite: { id_cle: 0, m: 'mb', s: 'in' }
    tendance_pression:
      cle: [ ]
    visibilite:
      cle: [ 'vis_' ]
      suffixe_unite: { id_cle: 0, m: 'km', s: 'miles' }
    nebulosite:
      cle: [ 'cloud' ]
    indice_uv:
      cle: [ 'uv' ]
    code_meteo:
      cle: [ 'condition', 'code' ]
    icon_meteo:
      cle: [ 'condition', 'icon' ]
    desc_meteo:
      cle: [ 'condition', 'text' ]
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ 'is_day' ]

# Bloc Prévisions (mashup des prévisions)
# ---------------------------------------
previsions:
  #periode_maj: 14400
  #format_flux: 'json'
  periodicites:
    24: { max_jours: 3 }
  periodicite_defaut: 24
  cle_base: [ 'forecast', 'forecastday' ]
  cle_heure: [ ]
  structure_heure: false
  donnees:
    date:
      cle: [ 'date' ]
    heure:
      cle: [ ]
    lever_soleil:
      cle: [ 'astro', 'sunrise' ]
    coucher_soleil:
      cle: [ 'astro', 'sunset' ]
    temperature:
      cle: [ 'day', 'avgtemp_' ]
      suffixe_unite: { id_cle: 1, m: 'c', s: 'f' }
    temperature_max:
      cle: [ 'day', 'maxtemp_' ]
      suffixe_unite: { id_cle: 1, m: 'c', s: 'f' }
    temperature_min:
      cle: [ 'day', 'mintemp_' ]
      suffixe_unite: { id_cle: 1, m: 'c', s: 'f' }
    vitesse_vent:
      cle: [ 'day', 'maxwind_' ]
      suffixe_unite: { id_cle: 1, m: 'kph', s: 'mph' }
    angle_vent:
      cle: [ ]
    direction_vent:
      cle: [ ]
    risque_precipitation:
      cle: [ ]
    precipitation:
      cle: [ 'day', 'totalprecip_' ]
      suffixe_unite: { id_cle: 1, m: 'mm', s: 'in' }
    humidite:
      cle: [ 'day', 'avghumidity' ]
    point_rosee:
      cle: [ ]
    pression:
      cle: [ ]
    visibilite:
      cle: [ 'day', 'avgvis_' ]
      suffixe_unite: { id_cle: 1, m: 'km', s: 'miles' }
    nebulosite:
      cle: [ ]
    indice_uv:
      cle: [ 'day', 'uv' ]
    code_meteo:
      cle: [ 'day', 'condition', 'code' ]
    icon_meteo:
      cle: [ 'day', 'condition', 'icon' ]
    desc_meteo:
      cle: [ 'day', 'condition', 'text' ]
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ ]

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