X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fmaterial%2FDeveloper%2Fhowto_app.html.twig;h=acbc2c889d257b7a8da94cca3608c440ad01e1a1;hb=fb479be3a0af95bba45c13b11e1f85bb9c753d25;hp=84e49ede7f46c7acb2749ba7d487cfd6659329b2;hpb=2766668b59249e00e8c9077063bae17fe9cb5ec6;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig index 84e49ede..acbc2c88 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}How to create my first application{% endtrans %}{% endblock %} +{% block title %}{{ 'developer.howto.page_title'|trans }}{% endblock %} {% block css %} {{ parent() }} @@ -13,10 +13,10 @@
-

The following commands make use of the HTTPie library. Make sure it is installed on your system before using it.

-

You need a token to communicate between your 3rd application and wallabag API.

-

To create this token, you need to create a new client.

-

Now, create your token (replace client_id, client_secret, username and password with the good values):

+

{{ 'developer.howto.description.paragraph_1'|trans|raw }}

+

{{ 'developer.howto.description.paragraph_2'|trans }}

+

{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}

+

{{ 'developer.howto.description.paragraph_4'|trans }}

http POST http://v2.wallabag.org/oauth/v2/token \
     grant_type=password \
@@ -25,7 +25,7 @@
     username=yourUsername \
     password=yourPassw0rd

-

The API will return a response like this:

+

{{ 'developer.howto.description.paragraph_5'|trans }}

HTTP/1.1 200 OK
 Cache-Control: no-store, private
@@ -45,14 +45,14 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
     "token_type": "bearer"
 }

-

The access_token is useful to do a call to the API endpoint. For example:

+

{{ 'developer.howto.description.paragraph_6'|trans }}

http GET http://v2.wallabag.org/api/entries.json \
     "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"

-

This call will return all the entries for your user.

-

If you want to see all the API endpoints, you can have a look to our API documentation.

-

{% trans %}Back{% endtrans %}

+

{{ 'developer.howto.description.paragraph_7'|trans }}

+

{{ 'developer.howto.description.paragraph_8'|trans({'%link%': path('nelmio_api_doc_index')})|raw }}

+

{{ 'developer.howto.back'|trans }}