« Api gouv » : différence entre les versions
| Ligne 36 : | Ligne 36 : | ||
{{#ifuser: | {{#ifuser: | ||
{{#ifanon: | |||
| <!-- rien pour les anonymes --> | |||
| | |||
==== 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 50 : | ||
] | ] | ||
</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 ==== | ||