mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +00:00
Update API documentation with cURL examples
This commit is contained in:
parent
7d5b4631d0
commit
1c90663b79
2 changed files with 29 additions and 5 deletions
|
@ -69,7 +69,7 @@ You'll have this in return:
|
|||
|
||||
We'll work with the ``access_token`` value in our next calls.
|
||||
|
||||
Curl example:
|
||||
cURL example:
|
||||
|
||||
::
|
||||
|
||||
|
@ -126,7 +126,7 @@ returns:
|
|||
|
||||
The ``items`` array is empty.
|
||||
|
||||
Curl example:
|
||||
cURL example:
|
||||
|
||||
::
|
||||
|
||||
|
@ -186,7 +186,7 @@ returns
|
|||
|
||||
Now, if you execute the previous command (see **Get existing entries**), you'll have data.
|
||||
|
||||
Curl example:
|
||||
cURL example:
|
||||
|
||||
::
|
||||
|
||||
|
@ -245,7 +245,7 @@ returns
|
|||
|
||||
And if you want to list the existing entries (see **Get existing entries**), the array is empty.
|
||||
|
||||
Curl example:
|
||||
cURL example:
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -69,6 +69,12 @@ Vous obtiendrez :
|
|||
|
||||
Nous allons utiliser la valeur de ``access_token`` dans nos prochains appels.
|
||||
|
||||
Exemple cURL :
|
||||
|
||||
::
|
||||
|
||||
curl -s "https://localhost:8000/oauth/v2/token?grant_type=password&client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc&client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4&username=wallabag&password=wallabag"
|
||||
|
||||
Récupérer les articles existants
|
||||
--------------------------------
|
||||
|
||||
|
@ -120,6 +126,12 @@ retournera :
|
|||
|
||||
Le tableau ``items`` est vide.
|
||||
|
||||
Exemple cURL :
|
||||
|
||||
::
|
||||
|
||||
curl --get "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA"
|
||||
|
||||
Créer votre premier article
|
||||
---------------------------
|
||||
|
||||
|
@ -174,6 +186,12 @@ retournera :
|
|||
|
||||
Maintenant, si vous exécutez la précédente commande (voir **Récupérer les articles existants**), vous obtiendrez quelque chose.
|
||||
|
||||
Exemple cURL :
|
||||
|
||||
::
|
||||
|
||||
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"
|
||||
|
||||
Supprimer un article
|
||||
--------------------
|
||||
|
||||
|
@ -227,6 +245,12 @@ retournera :
|
|||
|
||||
Et si vous voulez voir la liste des articles existants (voir **Récupérer les articles existants**), le tableau sera vide.
|
||||
|
||||
Exemple cURL :
|
||||
|
||||
::
|
||||
|
||||
curl --request DELETE "https://localhost:8000/api/entries/1.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA"
|
||||
|
||||
Autres méthodes
|
||||
---------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue