« Api gouv » : différence entre les versions
Aucun résumé des modifications |
|||
| (8 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 35 : | Ligne 35 : | ||
=== adresse.data.gouv.fr === | === adresse.data.gouv.fr === | ||
{{# | {{#ifanon: | ||
| | |||
==== Démo Requete 0 ==== | ==== Démo Requete 0 ==== | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl -s "https://api-adresse.data.gouv.fr/search/?q=8+rue+du+chateau&city=conde+sur+suippe&postcode=02190&autocomplete=0" | jq '.features[0].geometry.coordinates' | curl -s "https://api-adresse.data.gouv.fr/search/?q=8+rue+du+chateau&city=conde+sur+suippe&postcode=02190&autocomplete=0" | jq '.features[0].geometry.coordinates' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
[ | [ | ||
| Ligne 46 : | Ligne 48 : | ||
] | ] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
test google maps: | |||
test google maps: <br /> | |||
[https://www.google.fr/maps/place/49.417098,3.951548 google.fr/maps/place/49.417098,3.951548] | [https://www.google.fr/maps/place/49.417098,3.951548 google.fr/maps/place/49.417098,3.951548] | ||
---- | ---- | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl -s "https://api-adresse.data.gouv.fr/reverse/?lon=3.951548&lat=49.417098" | jq '.features[0]' | curl -s "https://api-adresse.data.gouv.fr/reverse/?lon=3.951548&lat=49.417098" | jq '.features[0]' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
==== Démo Requete 1 ==== | ==== Démo Requete 1 ==== | ||
| Ligne 374 : | Ligne 379 : | ||
echo "Recherche terminée." >&2 | echo "Recherche terminée." >&2 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Exemple ==== | ==== Exemple ==== | ||
| Ligne 422 : | Ligne 428 : | ||
./ecole.sh -c Reims -t lycee -o 10 -l 1 -f more | ./ecole.sh -c Reims -t lycee -o 10 -l 1 -f more | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<pre> | |||
Résultat: | Résultat: | ||
Recherche des établissements à 'Reims' | Recherche des établissements à 'Reims' | ||
Filtre : type 'lycee' | Filtre : type 'lycee' | ||
| Ligne 429 : | Ligne 435 : | ||
Décalage des résultats : 10 | Décalage des résultats : 10 | ||
Nombre de résultats par page : 1 | Nombre de résultats par page : 1 | ||
</ | </pre> | ||
<syntaxhighlight lang="json" copy> | <syntaxhighlight lang="json" copy> | ||
| Ligne 448 : | Ligne 454 : | ||
] | ] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <pre> | ||
Nombre de résultats affichés: 1 | Nombre de résultats affichés: 1 | ||
Prochain offset possible: 11 | Prochain offset possible: 11 | ||
Recherche terminée. | Recherche terminée. | ||
</ | </pre> | ||
[[category:Divers]] [[category:api]] | [[category:Divers]] [[category:api]] | ||