X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=docs%2Fen%2Fdeveloper%2Fapi.rst;h=0e1a3f0cc2824506b61e091989be6f4656961157;hb=3cfbe3c7e8f857571470f28ac7bbea430ca17a57;hp=ac00d3a449847b61803c210b9f2b4ef9aae7eb94;hpb=c802181126b41ecbc45e501c5426a6aa8b907d84;p=github%2Fwallabag%2Fwallabag.git diff --git a/docs/en/developer/api.rst b/docs/en/developer/api.rst index ac00d3a4..0e1a3f0c 100644 --- a/docs/en/developer/api.rst +++ b/docs/en/developer/api.rst @@ -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,24 @@ 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 resources +--------------- + +Some applications use our API. Here is a non-exhaustive list of them: + +- `Python API for wallabag +`__ by FoxMaSk, for his project `Trigger Happy +`__.