From 938a16c0f6d68da3cffc53916b4529d100216e3a Mon Sep 17 00:00:00 2001 From: Dirk Deimeke Date: Tue, 19 Apr 2016 08:00:07 +0200 Subject: Added some curl examples --- docs/en/developer/api.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs/en/developer') diff --git a/docs/en/developer/api.rst b/docs/en/developer/api.rst index ac00d3a4..38f0377c 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,6 +245,12 @@ 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 ------------- -- cgit v1.2.3