]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig
Add missing developer page
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Developer / howto_app.html.twig
index 1aece1d91609e3f6abc74dcf072f894250668b65..acbc2c889d257b7a8da94cca3608c440ad01e1a1 100644 (file)
@@ -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() }}
-    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/_global/css/prism.css') }}">
+    <link rel="stylesheet" href="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/themes/prism-dark.min.css') }}">
 {% endblock %}
 
 {% block content %}
         <div class="card-panel settings">
 
             <div class="row">
-                <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p>
-                <p>You need a token to communicate between your 3rd application and wallabag API.</p>
-                <p>To create this token, you need <a href="{{ path('developer_create_client') }}">to create a new client</a>.</p>
-                <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p>
+                <p>{{ 'developer.howto.description.paragraph_1'|trans|raw }}</p>
+                <p>{{ 'developer.howto.description.paragraph_2'|trans }}</p>
+                <p>{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}</p>
+                <p>{{ 'developer.howto.description.paragraph_4'|trans }}</p>
                 <p>
                     <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \
     grant_type=password \
@@ -25,7 +25,7 @@
     username=yourUsername \
     password=yourPassw0rd</code></pre>
                 </p>
-                <p>The API will return a response like this:</p>
+                <p>{{ 'developer.howto.description.paragraph_5'|trans }}</p>
                 <p>
                     <pre><code class="language-bash">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"
 }</code></pre>
                 </p>
-                <p>The access_token is useful to do a call to the API endpoint. For example:</p>
+                <p>{{ 'developer.howto.description.paragraph_6'|trans }}</p>
                 <p>
                     <pre><code class="language-bash">http GET http://v2.wallabag.org/api/entries.json \
     "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"</code></pre>
                 </p>
-                <p>This call will return all the entries for your user.</p>
-                <p>If you want to see all the API endpoints, you can have a look <a href="{{ path('nelmio_api_doc_index') }}">to our API documentation</a>.</p>
-                <p><a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a></p>
+                <p>{{ 'developer.howto.description.paragraph_7'|trans }}</p>
+                <p>{{ 'developer.howto.description.paragraph_8'|trans({'%link%': path('nelmio_api_doc_index')})|raw }}</p>
+                <p><a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{{ 'developer.howto.back'|trans }}</a></p>
             </div>
 
         </div>
     </div>
 </div>
-<script src="{{ asset('bundles/wallabagcore/themes/_global/js/prism.js') }}"></script>
+<script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/prism.min.js') }}"></script>
+<script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/components/prism-bash.min.js') }}"></script>
 {% endblock %}