« Bash api » : différence entre les versions
Apparence
| Ligne 58 : | Ligne 58 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[category:api]] | [[category:api]] | ||
Version du 29 mai 2025 à 01:06
Météo
Par défaut (3 jours).
curl wttr.in/paris
Résumé ultra-condensé : Paris: 🌦 +17°C.
curl "wttr.in/paris?format=3&lang=fr"
Données brutes (JSON)
curl "wttr.in/paris?format=j1&lang=fr"
Météo actuelle
curl "wttr.in/paris?0&lang=fr"
Affiche les nuits (pour + de détails).
curl "wttr.in/paris?n&lang=fr"
Affiche en français
curl "wttr.in/paris?lang=fr&v2"
Affiche les phases de la Lune
curl wttr.in/Moon
Affiche une adresse précise avec les coordonnées GPS
curl "wttr.in/48.8566,2.3522"
Affiche un graphique détaillé
curl "wttr.in/48.8566,2.3522?format=v2"
openstreetmap
Recherche localisation
curl "https://nominatim.openstreetmap.org/search?q=Eiffel+Tower&format=json" | jq
Devises
Exchange Rates
curl "https://api.exchangerate-api.com/v4/latest/EUR" | jq '.rates.USD'