# YAML d'initialisation de la configuration du service Accuweather (accuweather)
# -----------------------------------------------------------------------------------------------
# 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: 'AccuWeather'
  #actif: true
  endpoint_requete: 'http://dataservice.accuweather.com/'
  endpoint_icone: ''
  credits:
    titre: 'AccuWeather'
    lien: 'https://www.accuweather.com/'
  termes:
    titre: 'Terms of Use'
    lien: 'https://developer.accuweather.com/legal'
  enregistrement:
    titre: 'User Account'
    lien: 'https://developer.accuweather.com/user/register'
    #taille_cle: 32
  offres:
    titre: 'Packages'
    lien: 'https://developer.accuweather.com/packages'
    #gratuite: true
    limites: { day: 50 }
  langues:
    codes_spip: [ 'ar', 'az', 'bn', 'bs', 'bg', 'ca', 'zh', 'hr', 'cs', 'da', 'nl', 'en', 'es', 'et', 'fa', 'fi', 'fr', 'de', 'el', 'gu', 'he', 'hi', 'hu', 'is', 'id', 'it', 'ja', 'kn', 'kk', 'ko', 'lv', 'lt', 'mk', 'ms', 'mr', 'nb', 'pl', 'pt', 'pa', 'ro', 'ru', 'sr', 'sk', 'sl', 'sw', 'sv', 'tl', 'ta', 'te', 'th', 'tr', 'uk', 'ur', 'uz', 'vi' ]
    codes_non_spip: { fil: '', zh-tw: 'zh_tw' }
    defaut: 'en'
  transcodage_weather:
    1: [ 32, 32 ]
    2: [ 34, 34 ]
    3: [ 30, 30 ]
    4: [ 30, 30 ]
    5: [ 21, 21 ]
    6: [ 28, 28 ]
    7: [ 26, 26 ]
    8: [ 28, 27 ]
    11: [ 20, 20 ]
    12: [ 11, 11 ]
    13: [ 39, 39 ]
    14: [ 39, 39 ]
    15: [ 4, 4 ]
    16: [ 38, 38 ]
    17: [ 37, 37 ]
    18: [ 12, 12 ]
    19: [ 13, 13 ]
    20: [ 41, 41 ]
    21: [ 41, 41 ]
    22: [ 16, 16 ]
    23: [ 41, 41 ]
    24: [ 17, 17 ]
    25: [ 18, 18 ]
    26: [ 10, 10 ]
    29: [ 5, 5 ]
    30: [ 36, 36 ]
    31: [ 25, 25 ]
    32: [ 24, 24 ]
    33: [ 31, 31 ]
    34: [ 33, 33 ]
    35: [ 29, 29 ]
    36: [ 29, 29 ]
    37: [ 21, 21 ]
    38: [ 27, 27 ]
    39: [ 45, 45 ]
    40: [ 45, 45 ]
    41: [ 47, 47 ]
    42: [ 47, 47 ]
    43: [ 46, 46 ]
    44: [ 46, 46 ]
  defauts:
    #inscription: ''
    #unite: 'm'
    #condition: 'accuweather'
    theme: ''
    theme_local: 'original'
    #theme_weather: 'sticker'

# Bloc Infos (mashup des information géographiques)
# -------------------------------------------------
infos:
  #periode_maj: 2592000
  #format_flux: 'json'
  cle_base: [ ]
  donnees:
    ville:
      cle: [ 'LocalizedName' ]
    pays:
      cle: [ 'Country', 'LocalizedName' ]
    pays_iso2:
      cle: [ 'Country', 'ID' ]
    region:
      cle: [ 'Region', 'LocalizedName' ]
    longitude:
      cle: [ 'GeoPosition', 'Longitude' ]
    latitude:
      cle: [ 'GeoPosition', 'Latitude' ]

# Bloc Conditions (mashup des conditions temps réel)
# --------------------------------------------------
conditions:
  #periode_maj: 7200
  #format_flux: 'json'
  cle_base: [ 0 ]
  donnees:
    derniere_maj:
      cle: [ 'LocalObservationDateTime' ]
    station:
      cle: [ 'LocalSource', 'Name']
    temperature_reelle:
      cle: [ 'Temperature', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    temperature_ressentie:
      cle: [ 'ApparentTemperature', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    vitesse_vent:
      cle: [ 'Wind', 'Speed', '', 'Value' ]
      suffixe_unite: { id_cle: 2, m: 'Metric', s: 'Imperial' }
    angle_vent:
      cle: [ 'Wind', 'Direction', 'Degrees' ]
    direction_vent:
      cle: [ 'Wind', 'Direction', 'English' ]
    precipitation:
      cle: [ 'Precip1hr', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    humidite:
      cle: [ 'RelativeHumidity' ]
    point_rosee:
      cle: [ 'DewPoint', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    pression:
      cle: [ 'Pressure', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    tendance_pression:
      cle: [ 'PressureTendency', 'Code' ]
    visibilite:
      cle: [ 'Visibility', '', 'Value' ]
      suffixe_unite: { id_cle: 1, m: 'Metric', s: 'Imperial' }
    nebulosite:
      cle: [ 'CloudCover' ]
    indice_uv:
      cle: [ 'UVIndex' ]
    code_meteo:
      cle: [ 'WeatherIcon' ]
    icon_meteo:
      cle: [ ]
    desc_meteo:
      cle: [ 'WeatherText' ]
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ 'IsDayTime' ]

# Bloc Prévisions (mashup des prévisions)
# ---------------------------------------
previsions:
  #periode_maj: 14400
  #format_flux: 'json'
  periodicites:
    12: { max_jours: 5 }
  periodicite_defaut: 12
  cle_base: [ 'DailyForecasts' ]
  # La clé heure est construite (fonction accuweather_flux2service) car elle n'est pas conforme à ce qui est attendu par le mash-up
  cle_heure: [ 'Hourly' ]
  structure_heure: true
  donnees:
    date:
      cle: [ 'Date' ]
    heure:
      cle: [ ]
    lever_soleil:
      cle: [ 'Sun', 'Rise' ]
    coucher_soleil:
      cle: [ 'Sun', 'Set' ]
    temperature:
      cle: [ ]
    temperature_max:
      cle: [ 'Temperature', 'Maximum', 'Value' ]
    temperature_min:
      cle: [ 'Temperature', 'Minimum', 'Value' ]
    vitesse_vent:
      cle: [ 'Wind', 'Speed', 'Value' ]
    angle_vent:
      cle: [ 'Wind', 'Direction', 'Degrees' ]
    direction_vent:
      cle: [ 'Wind', 'Direction', 'English' ]
    risque_precipitation:
      cle: [ 'PrecipitationProbability' ]
    precipitation:
      cle: [ 'TotalLiquid', 'Value' ]
    humidite:
      cle: [ ]
    point_rosee:
      cle: [ ]
    pression:
      cle: [ ]
    visibilite:
      cle: [ ]
    nebulosite:
      cle: [ 'CloudCover' ]
    indice_uv:
      cle: [ ]
    code_meteo:
      cle: [ 'Icon' ]
    icon_meteo:
      cle: [ ]
    desc_meteo:
      cle: [ 'IconPhrase' ]
    trad_meteo:
      cle: [ ]
    jour_meteo:
      cle: [ ]

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