2015-11-15 17:49:22 +01:00
|
|
|
{% import 'tables.tmpl' as tables -%}
|
|
|
|
|
|
2015-06-01 13:03:42 +02:00
|
|
|
``{{endpoint.method}} {{endpoint.path}}``
|
|
|
|
|
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
|
2015-09-08 17:27:20 +02:00
|
|
|
{% if "alias_for_path" in endpoint -%}
|
|
|
|
|
``{{endpoint.path}}`` is an alias for `{{endpoint.alias_for_path}}`_.
|
|
|
|
|
|
|
|
|
|
.. _`{{endpoint.alias_for_path}}`: #{{endpoint.alias_link}}
|
|
|
|
|
{% else -%}
|
2015-06-01 13:03:42 +02:00
|
|
|
|
|
|
|
|
{{endpoint.desc | wrap(80)}}
|
2015-06-01 15:34:13 +02:00
|
|
|
|
2015-06-01 15:20:24 +02:00
|
|
|
{{":Rate-limited: Yes." if endpoint.rate_limited else "" }}
|
|
|
|
|
{{":Requires auth: Yes." if endpoint.requires_auth else "" }}
|
2015-06-01 15:34:13 +02:00
|
|
|
|
2015-06-01 13:03:42 +02:00
|
|
|
Request format:
|
2015-11-11 12:39:40 +01:00
|
|
|
{% if (endpoint.req_param_by_loc | length) %}
|
2015-11-15 17:49:22 +01:00
|
|
|
{{ tables.split_paramtable(endpoint.req_param_by_loc) }}
|
2015-11-11 12:39:40 +01:00
|
|
|
{% else %}
|
|
|
|
|
`No parameters`
|
|
|
|
|
{% endif %}
|
2015-06-01 13:03:42 +02:00
|
|
|
|
2015-06-02 13:03:10 +02:00
|
|
|
{% if endpoint.res_tables|length > 0 -%}
|
2015-06-01 16:54:16 +02:00
|
|
|
Response format:
|
|
|
|
|
|
2015-06-02 13:03:10 +02:00
|
|
|
{% for table in endpoint.res_tables -%}
|
|
|
|
|
{{"``"+table.title+"``" if table.title else "" }}
|
|
|
|
|
|
2015-11-15 17:49:22 +01:00
|
|
|
{{ tables.paramtable(table.rows) }}
|
2015-06-02 13:03:10 +02:00
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif -%}
|
2015-06-01 16:54:16 +02:00
|
|
|
|
2015-10-26 18:25:33 +01:00
|
|
|
Example request:
|
|
|
|
|
|
|
|
|
|
.. code:: http
|
2015-06-01 15:20:24 +02:00
|
|
|
|
|
|
|
|
{{endpoint.example.req | indent_block(2)}}
|
|
|
|
|
|
2015-09-07 18:14:36 +02:00
|
|
|
{% if endpoint.example.responses|length > 0 -%}
|
|
|
|
|
Response{{"s" if endpoint.example.responses|length > 1 else "" }}:
|
2015-06-01 15:20:24 +02:00
|
|
|
|
2015-09-07 18:14:36 +02:00
|
|
|
{% endif -%}
|
|
|
|
|
|
|
|
|
|
{% for res in endpoint.example.responses -%}
|
|
|
|
|
|
|
|
|
|
**Status code {{res["code"]}}:**
|
|
|
|
|
|
|
|
|
|
{{res["description"]}}
|
|
|
|
|
|
2015-09-18 18:26:10 +02:00
|
|
|
Example
|
|
|
|
|
|
|
|
|
|
.. code:: json
|
2015-09-07 18:14:36 +02:00
|
|
|
|
|
|
|
|
{{res["example"] | indent_block(2)}}
|
|
|
|
|
|
|
|
|
|
{% endfor %}
|
2015-09-08 17:27:20 +02:00
|
|
|
{% endif -%}
|