X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docs%2Ffr%2Fdeveloper%2Fapi.rst;h=738c8f0420ceabb363dc13c0bbdccbe18960d7c3;hb=a40b2b7ee4f5aec502c4ddc755ed7d15f9b7a756;hp=9c8e25a9cd7424fb79050566e1ece6643243b664;hpb=c802181126b41ecbc45e501c5426a6aa8b907d84;p=github%2Fwallabag%2Fwallabag.git diff --git a/docs/fr/developer/api.rst b/docs/fr/developer/api.rst index 9c8e25a9..738c8f04 100644 --- a/docs/fr/developer/api.rst +++ b/docs/fr/developer/api.rst @@ -7,7 +7,7 @@ Pré-requis ---------- * wallabag fraichement installé et disponible à http://localhost:8000 -* ``httpie`` installé sur votre ordinateur (`voir le site du projet `__). Vous pouvez également adapter les commandes en utilisant curl ou wget. +* ``httpie`` installé sur votre ordinateur (`voir le site du projet `__). Vous pouvez également adapter les commandes en utilisant curl ou wget. * toutes les méthodes de l'API documentées ici http://localhost:8000/api/doc Créer un nouveau client d'API @@ -69,6 +69,12 @@ Vous obtiendrez : Nous allons utiliser la valeur de ``access_token`` dans nos prochains appels. +Exemple cURL : + +:: + + curl -s "https://localhost:8000/oauth/v2/token?grant_type=password&client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc&client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4&username=wallabag&password=wallabag" + Récupérer les articles existants -------------------------------- @@ -120,6 +126,12 @@ retournera : Le tableau ``items`` est vide. +Exemple cURL : + +:: + + curl --get "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + Créer votre premier article --------------------------- @@ -174,6 +186,12 @@ retournera : Maintenant, si vous exécutez la précédente commande (voir **Récupérer les articles existants**), vous obtiendrez quelque chose. +Exemple cURL : + +:: + + curl "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA&url=http://www.numerama.com/tech/160115-le-pocket-libre-wallabag-fait-le-plein-de-fonctionnalites.html" + Supprimer un article -------------------- @@ -227,9 +245,26 @@ retournera : Et si vous voulez voir la liste des articles existants (voir **Récupérer les articles existants**), le tableau sera vide. +Exemple cURL : + +:: + + curl --request DELETE "https://localhost:8000/api/entries/1.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + Autres méthodes --------------- Nous n'écrirons pas d'exemples pour toutes les méthodes de l'API. Jetez un œil à la liste complète ici http://localhost:8000/api/doc pour connaitre chaque méthode. + +Ressources tierces +------------------ + +Certaines applications ou bibliothèques utilisent notre API. En voici une liste non exhaustive : + +- `Java wrapper for the wallabag API `_ par Strubbl. +- `.NET library for the wallabag v2 API `_ par Julian Oster. +- `Python API for wallabag `_ par FoxMaSk, pour son projet `Trigger Happy `_. +- `Un plugin `_ conçu pour `Tiny Tiny RSS `_ qui utilise l'API wallabag v2. Par Josh Panter. +- `Golang wrapper for the wallabag API `_ par Strubbl, pour son projet `wallabag-stats graphe`_.