Clean api_endpoints.html to use 4 space indents.

Tweaked a bit by tabbott.
This commit is contained in:
adnrs96 2017-02-28 09:14:31 +05:30 committed by Tim Abbott
parent 0a2c771504
commit 8e76b81a15
1 changed files with 49 additions and 43 deletions

View File

@ -3,57 +3,63 @@
{# API information page #} {# API information page #}
{% block customhead %} {% block customhead %}
{{ super() }} {{ super() }}
{{ minified_js('api')|safe }} {{ minified_js('api')|safe }}
{% endblock %} {% endblock %}
{% block portico_content %} {% block portico_content %}
<h1 class="api-page-header">API endpoints documentation</h1> <h1 class="api-page-header">API endpoints documentation</h1>
<p>In addition to our <a href="/api">pre-built API bindings for Python</a>, we also have a <a href="http://en.wikipedia.org/wiki/Representational_state_transfer">REST-ful</a> web API.</p> <p>In addition to our <a href="/api">pre-built API bindings for
Python</a>, we also have
a <a href="http://en.wikipedia.org/wiki/Representational_state_transfer">REST-ful</a>
web API.</p>
<ul class="nav nav-tabs" id="api-example-tabs"> <ul class="nav nav-tabs" id="api-example-tabs">
<li class="active"><a href="#curl" data-toggle="tab" data-class="curl">curl</a></li> <li class="active"><a href="#curl" data-toggle="tab" data-class="curl">curl</a></li>
<li><a href="#python" data-toggle="tab" data-class="python">Python</a></li> <li><a href="#python" data-toggle="tab" data-class="python">Python</a></li>
</ul> </ul>
{% autoescape off %} {% autoescape off %}
{% for blurb in content %}
<div class="api-block">
<h2 class="call">{{ blurb.call }}</h2>
<div class="endpoint"><code>{{blurb.method}} {{ blurb.endpoint }}</code></div>
<div class="api-details">
<h3>Arguments</h3>
<dl class="dl-horizontal arguments">
{% for argument in blurb.arguments %}
<dt><code>{{ argument.0 }}</code></dt>
<dd>{{ argument.1 }}</dd>
{% endfor %}
</dl>
{% for blurb in content %} <h3>Return values</h3>
<div class="api-block"> <dl class="dl-horizontal returns">
<h2 class="call">{{ blurb.call }}</h2> {% for return in blurb.returns %}
<div class="endpoint"><code>{{blurb.method}} {{ blurb.endpoint }}</code></div> <dt><code>{{ return.0 }}</code></dt>
<div class="api-details"> <dd>{{ return.1 }}</dd>
<h3>Arguments</h3> {% endfor %}
<dl class="dl-horizontal arguments"> </dl>
{% for argument in blurb.arguments %}
<dt><code>{{ argument.0 }}</code></dt> {% if blurb.example_request %}
<dd>{{ argument.1 }}</dd> <h3>Example request</h3>
{% endfor %} {% for lang, req in blurb.example_request.items() %}
</dl> <div class="example_request {{ lang }}">
<h3>Return values</h3> {{ req }}
<dl class="dl-horizontal returns"> </div>
{% for return in blurb.returns %} {% endfor %}
<dt><code>{{ return.0 }}</code></dt> {% endif %}
<dd>{{ return.1 }}</dd>
{% endfor %} {% if blurb.rendered_response %}
</dl> <h3>Example response</h3>
{% if blurb.example_request %} <div class="example_response">
<h3>Example request</h3> {{ blurb.rendered_response }}
{% for lang, req in blurb.example_request.items() %} </div>
<div class="example_request {{ lang }}"> {% endif %}
{{ req }}
</div> </div>
{% endfor %}{% endif %}
{% if blurb.rendered_response %}
<h3>Example response</h3>
<div class="example_response">
{{ blurb.rendered_response }}
</div> </div>
{% endif %} {% endfor %}
</div> {% endautoescape %}
</div>
{% endfor %}
{% endautoescape %}
{% endblock %} {% endblock %}