]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added some curl examples 1945/head
authorDirk Deimeke <dirk@deimeke.net>
Tue, 19 Apr 2016 06:00:07 +0000 (08:00 +0200)
committerDirk Deimeke <dirk@deimeke.net>
Tue, 19 Apr 2016 06:00:07 +0000 (08:00 +0200)
docs/en/developer/api.rst

index ac00d3a449847b61803c210b9f2b4ef9aae7eb94..38f0377c35e835c5d225350e2e21bcce02383e53 100644 (file)
@@ -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
 -------------