diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-04-20 10:10:46 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-04-20 10:10:46 +0200 |
commit | 868e76af10db74921a3e760cb4e709cc328ff4ad (patch) | |
tree | bc175c7472df0b5aac8a903b2dbfd2c99a147528 /docs/en | |
parent | f88530de68ca11fbfcac4c703576e10f1a981694 (diff) | |
parent | 938a16c0f6d68da3cffc53916b4529d100216e3a (diff) | |
download | wallabag-868e76af10db74921a3e760cb4e709cc328ff4ad.tar.gz wallabag-868e76af10db74921a3e760cb4e709cc328ff4ad.tar.zst wallabag-868e76af10db74921a3e760cb4e709cc328ff4ad.zip |
Merge pull request #1945 from ddeimeke/master
Added some curl examples
Diffstat (limited to 'docs/en')
-rw-r--r-- | docs/en/developer/api.rst | 24 |
1 files changed, 24 insertions, 0 deletions
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: | |||
69 | 69 | ||
70 | We'll work with the ``access_token`` value in our next calls. | 70 | We'll work with the ``access_token`` value in our next calls. |
71 | 71 | ||
72 | Curl example: | ||
73 | |||
74 | :: | ||
75 | |||
76 | curl -s "https://localhost:8000/oauth/v2/token?grant_type=password&client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc&client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4&username=wallabag&password=wallabag" | ||
77 | |||
72 | Getting existing entries | 78 | Getting existing entries |
73 | ------------------------ | 79 | ------------------------ |
74 | 80 | ||
@@ -120,6 +126,12 @@ returns: | |||
120 | 126 | ||
121 | The ``items`` array is empty. | 127 | The ``items`` array is empty. |
122 | 128 | ||
129 | Curl example: | ||
130 | |||
131 | :: | ||
132 | |||
133 | curl --get "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" | ||
134 | |||
123 | Adding your first entry | 135 | Adding your first entry |
124 | ----------------------- | 136 | ----------------------- |
125 | 137 | ||
@@ -174,6 +186,12 @@ returns | |||
174 | 186 | ||
175 | Now, if you execute the previous command (see **Get existing entries**), you'll have data. | 187 | Now, if you execute the previous command (see **Get existing entries**), you'll have data. |
176 | 188 | ||
189 | Curl example: | ||
190 | |||
191 | :: | ||
192 | |||
193 | 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" | ||
194 | |||
177 | Deleting an entry | 195 | Deleting an entry |
178 | ----------------- | 196 | ----------------- |
179 | 197 | ||
@@ -227,6 +245,12 @@ returns | |||
227 | 245 | ||
228 | And if you want to list the existing entries (see **Get existing entries**), the array is empty. | 246 | And if you want to list the existing entries (see **Get existing entries**), the array is empty. |
229 | 247 | ||
248 | Curl example: | ||
249 | |||
250 | :: | ||
251 | |||
252 | curl --request DELETE "https://localhost:8000/api/entries/1.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" | ||
253 | |||
230 | Other methods | 254 | Other methods |
231 | ------------- | 255 | ------------- |
232 | 256 | ||