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=c21f2924f39c99fbfb6ee2e0918726e9de2c5e27;hp=497bb3085fe6add288084cb433cdeb022a9d88aa;hpb=abc329453be6381bcf4d1b0dfd9f698312ed3b16;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 497bb308..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,10 +1,10 @@ {% 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() }} - + {% endblock %} {% block content %} @@ -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,18 +45,19 @@ 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.
- +{{ 'developer.howto.description.paragraph_7'|trans }}
+{{ 'developer.howto.description.paragraph_8'|trans({'%link%': path('nelmio_api_doc_index')})|raw }}
+