« Bash api » : différence entre les versions
Aucun résumé des modifications |
|||
| (13 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 7 : | Ligne 7 : | ||
==== Résumé ultra-condensé : Paris: 🌦 +17°C. ==== | ==== Résumé ultra-condensé : Paris: 🌦 +17°C. ==== | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl "wttr.in/ | curl "wttr.in/Paris?&format=3&lang=fr" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Données brutes (JSON) ==== | ==== Données brutes (JSON) ==== | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl "wttr.in/ | curl "wttr.in/Paris?&format=j1&lang=fr" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 22 : | Ligne 22 : | ||
==== Affiche les nuits (pour + de détails). ==== | ==== Affiche les nuits (pour + de détails). ==== | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl "wttr.in/ | curl "wttr.in/Paris?&n&lang=fr" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 45 : | Ligne 45 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== open-meteo.com ==== | |||
<syntaxhighlight lang="bash" copy> | |||
curl -s "https://api.open-meteo.com/v1/forecast?latitude=48.85&longitude=2.35¤t_weather=true" | jq '.current_weather' | |||
</syntaxhighlight> | |||
=== | === Localisation === | ||
Recherche | Recherche openstreetmap | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl "https://nominatim.openstreetmap.org/search?q=Eiffel+Tower&format=json" | jq | curl "https://nominatim.openstreetmap.org/search?q=Eiffel+Tower&format=json" | jq | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Devises === | |||
Exchange Rates | Exchange Rates | ||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
| Ligne 58 : | Ligne 62 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === JokeAPI === | ||
Blagues | |||
<syntaxhighlight lang="bash" copy> | <syntaxhighlight lang="bash" copy> | ||
curl | curl "https://v2.jokeapi.dev/joke/Any?lang=fr" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[category:api]] | |||
[[Catégorie:Tools]] [[category:api]] | |||