misc: update api atmo url to always get data (#56178)
This commit is contained in:
parent
f650cf4e92
commit
3a466d7a98
|
@ -194,8 +194,14 @@ class Command(BaseCommand):
|
|||
"additional-data": [
|
||||
{
|
||||
"key": "air2go",
|
||||
"url": "{% if q_lat or lat %}https://api.atmo-aura.fr/partenaires/v2/indice_request?longitude={% firstof q_lon lon %}&latitude={% firstof q_lat lat %}{% else %}https://api.atmo-aura.fr/api/v1/communes/69123/indices/atmo?date_calcul=now{% endif %}&"
|
||||
+ settings.ATMO_API_TOKEN,
|
||||
"url": "{% if q_lat or lat %}"
|
||||
"https://api.atmo-aura.fr/partenaires/v2/indice_request?"
|
||||
"longitude={% firstof q_lon lon %}&latitude={% firstof q_lat lat %}"
|
||||
"{% else %}"
|
||||
"{% now \"Y-m-d\" as today %}"
|
||||
"{% with today|add_days:\"-1\"|date:\"Y-m-d\" as yesterday %}"
|
||||
"https://api.atmo-aura.fr/api/v1/communes/69123/indices/atmo?date_debut_echeance={{yesterday}}"
|
||||
"{% endwith %}{% endif %}&" + settings.ATMO_API_TOKEN,
|
||||
},
|
||||
{
|
||||
"key": "definitions",
|
||||
|
|
Loading…
Reference in New Issue