# 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'
  # -- 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.weatherapi.com/v1'
  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: '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'
  # -- Configuration des jeux d'icones utilisables
  icones:
    origines: [ 'api', 'local', 'weather' ]
    transcodages:
      1000: { local: [ '113d', '113n' ], weather: [ '32', '31' ], wmo: [ ] }
      1003: { local: [ '116d', '116n' ], weather: [ '30', '29' ], wmo: [ ] }
      1006: { local: [ '119d', '119n' ], weather: [ '28', '27' ], wmo: [ ] }
      1009: { local: [ '122d', '122n' ], weather: [ '26', '26' ], wmo: [ ] }
      1030: { local: [ '143d', '143n' ], weather: [ '21', '21' ], wmo: [ ] }
      1063: { local: [ '176d', '176n' ], weather: [ '12', '12' ], wmo: [ ] }
      1066: { local: [ '179d', '179n' ], weather: [ '16', '16' ], wmo: [ ] }
      1069: { local: [ '182d', '182n' ], weather: [ '18', '18' ], wmo: [ ] }
      1072: { local: [ '185d', '185n' ], weather: [ '8', '8' ], wmo: [ ] }
      1087: { local: [ '200d', '200n' ], weather: [ '38', '38' ], wmo: [ ] }
      1114: { local: [ '227d', '227n' ], weather: [ '15', '15' ], wmo: [ ] }
      1117: { local: [ '230d', '230n' ], weather: [ '43', '43' ], wmo: [ ] }
      1135: { local: [ '248d', '248n' ], weather: [ '20', '20' ], wmo: [ ] }
      1147: { local: [ '260d', '260n' ], weather: [ '20', '20' ], wmo: [ ] }
      1150: { local: [ '263d', '263n' ], weather: [ '9', '9' ], wmo: [ ] }
      1153: { local: [ '266d', '266n' ], weather: [ '9', '9' ], wmo: [ ] }
      1168: { local: [ '281d', '281n' ], weather: [ '8', '8' ], wmo: [ ] }
      1171: { local: [ '284d', '284n' ], weather: [ '8', '8' ], wmo: [ ] }
      1180: { local: [ '293d', '293n' ], weather: [ '12', '12' ], wmo: [ ] }
      1183: { local: [ '296d', '296n' ], weather: [ '12', '12' ], wmo: [ ] }
      1186: { local: [ '299d', '299n' ], weather: [ '12', '12' ], wmo: [ ] }
      1189: { local: [ '302d', '302n' ], weather: [ '12', '12' ], wmo: [ ] }
      1192: { local: [ '305d', '305n' ], weather: [ '40', '40' ], wmo: [ ] }
      1195: { local: [ '308d', '308n' ], weather: [ '40', '40' ], wmo: [ ] }
      1198: { local: [ '311d', '311n' ], weather: [ '10', '10' ], wmo: [ ] }
      1201: { local: [ '314d', '314n' ], weather: [ '10', '10' ], wmo: [ ] }
      1204: { local: [ '317d', '317n' ], weather: [ '18', '18' ], wmo: [ ] }
      1207: { local: [ '320d', '320n' ], weather: [ '18', '18' ], wmo: [ ] }
      1210: { local: [ '323d', '323n' ], weather: [ '14', '14' ], wmo: [ ] }
      1213: { local: [ '326d', '326n' ], weather: [ '14', '14' ], wmo: [ ] }
      1216: { local: [ '329d', '329n' ], weather: [ '16', '16' ], wmo: [ ] }
      1219: { local: [ '332d', '332n' ], weather: [ '16', '16' ], wmo: [ ] }
      1222: { local: [ '335d', '335n' ], weather: [ '42', '42' ], wmo: [ ] }
      1225: { local: [ '338d', '338n' ], weather: [ '42', '42' ], wmo: [ ] }
      1237: { local: [ '350d', '350n' ], weather: [ '10', '10' ], wmo: [ ] }
      1240: { local: [ '353d', '353n' ], weather: [ '11', '11' ], wmo: [ ] }
      1243: { local: [ '356d', '356n' ], weather: [ '11', '11' ], wmo: [ ] }
      1246: { local: [ '359d', '359n' ], weather: [ '40', '40' ], wmo: [ ] }
      1249: { local: [ '362d', '362n' ], weather: [ '18', '18' ], wmo: [ ] }
      1252: { local: [ '365d', '365n' ], weather: [ '18', '18' ], wmo: [ ] }
      1255: { local: [ '368d', '368n' ], weather: [ '14', '14' ], wmo: [ ] }
      1258: { local: [ '371d', '371n' ], weather: [ '42', '42' ], wmo: [ ] }
      1261: { local: [ '374d', '374n' ], weather: [ '10', '10' ], wmo: [ ] }
      1264: { local: [ '377d', '377n' ], weather: [ '10', '10' ], wmo: [ ] }
      1273: { local: [ '386d', '386n' ], weather: [ '39', '45' ], wmo: [ ] }
      1276: { local: [ '389d', '389n' ], weather: [ '39', '45' ], wmo: [ ] }
      1279: { local: [ '392d', '392n' ], weather: [ '41', '46' ], wmo: [ ] }
      1282: { local: [ '395d', '395n' ], weather: [ '41', '46' ], wmo: [ ] }
  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' }
    rafale_vent:
      cle: [ 'gust_' ]
      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: [ ]
      calcul: true
    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' ]
    risque_uv:
      cle: [ ]
      calcul: true
    code_meteo:
      cle: [ 'condition', 'code' ]
    icon_meteo:
      cle: [ 'condition', 'icon' ]
    desc_meteo:
      cle: [ 'condition', 'text' ]
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ 'is_day' ]
    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: 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' }
    rafale_vent:
      cle: []
    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' ]
    risque_uv:
      cle: [ ]
      calcul: true
    code_meteo:
      cle: [ 'day', 'condition', 'code' ]
    icon_meteo:
      cle: [ 'day', 'condition', 'icon' ]
    desc_meteo:
      cle: [ 'day', 'condition', 'text' ]
    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: [ 'error' ]
  donnees:
    code:
      cle: [ 'code' ]
    message:
      cle: [ 'message' ]
