X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docs%2Fen%2Fdeveloper%2Fapi.rst;h=074da1a7d8198f469036e5400415f2f3febc2dbc;hb=8148675cb7ef8081fee0b14307deb869abf0f6e3;hp=ac00d3a449847b61803c210b9f2b4ef9aae7eb94;hpb=015e4284f0628750e5d2ce1de27fafe964286562;p=github%2Fwallabag%2Fwallabag.git diff --git a/docs/en/developer/api.rst b/docs/en/developer/api.rst index ac00d3a4..074da1a7 100644 --- a/docs/en/developer/api.rst +++ b/docs/en/developer/api.rst @@ -8,7 +8,7 @@ Requirements * wallabag freshly (or not) installed on http://localhost:8000 * ``httpie`` installed on your computer (`see project website `__). Note that you can also adapt the commands using curl or wget. -* all the API methods are documented here http://localhost:8000/api/doc +* all the API methods are documented here http://localhost:8000/api/doc (on your instance) and `on our example instance `_ Creating a new API client ------------------------- @@ -69,6 +69,12 @@ You'll have this in return: We'll work with the ``access_token`` value in our next calls. +cURL example: + +:: + + curl -s "https://localhost:8000/oauth/v2/token?grant_type=password&client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc&client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4&username=wallabag&password=wallabag" + Getting existing entries ------------------------ @@ -120,6 +126,12 @@ returns: The ``items`` array is empty. +cURL example: + +:: + + curl --get "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + Adding your first entry ----------------------- @@ -174,6 +186,12 @@ returns Now, if you execute the previous command (see **Get existing entries**), you'll have data. +cURL example: + +:: + + 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" + Deleting an entry ----------------- @@ -227,9 +245,26 @@ returns And if you want to list the existing entries (see **Get existing entries**), the array is empty. +cURL example: + +:: + + curl --request DELETE "https://localhost:8000/api/entries/1.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + Other methods ------------- We won't write samples for each API method. Have a look on the listing here: http://localhost:8000/api/doc to know each method. + +Third party resources +--------------- + +Some applications or libraries use our API. Here is a non-exhaustive list of them: + +- `Java wrapper for the wallabag API `_ by Dmitriy Bogdanov. +- `.NET library for the wallabag v2 API `_ by Julian Oster. +- `Python API for wallabag `_ by FoxMaSk, for his project `Trigger Happy `_. +- `A plugin `_ designed for `Tiny Tiny RSS `_ that makes use of the wallabag v2 API. By Josh Panter. +- `Golang wrapper for the wallabag API `_ by Strubbl, for his projects `wallabag-stats graph `_ and the command line tool `wallabag-add-article `_.