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-12-10 15:47:14 +01:00
|
|
|
{% if "deprecated" in endpoint and endpoint.deprecated -%}
|
|
|
|
|
.. WARNING::
|
|
|
|
|
This API is deprecated and will be removed from a future release.
|
|
|
|
|
|
|
|
|
|
{% endif -%}
|
2015-06-01 13:03:42 +02:00
|
|
|
|
2016-07-08 12:57:40 +02:00
|
|
|
{{endpoint.desc}}
|
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) }}
|
2016-01-07 23:46:22 +01:00
|
|
|
{% if (endpoint.req_body_tables) %}
|
2016-01-07 23:04:30 +01:00
|
|
|
{% for table in endpoint.req_body_tables -%}
|
|
|
|
|
{{"``"+table.title+"``" if table.title else "" }}
|
|
|
|
|
{{ tables.paramtable(table.rows) }}
|
|
|
|
|
{% endfor -%}
|
|
|
|
|
{% endif -%}
|
2016-01-07 23:46:22 +01:00
|
|
|
|
2015-11-11 12:39:40 +01:00
|
|
|
{% else %}
|
|
|
|
|
`No parameters`
|
|
|
|
|
{% endif %}
|
2015-06-01 13:03:42 +02:00
|
|
|
|
2017-11-03 17:31:41 +01:00
|
|
|
{% if endpoint.res_headers is not none -%}
|
2016-10-13 18:11:18 +02:00
|
|
|
Response headers:
|
|
|
|
|
|
2017-11-03 17:31:41 +01:00
|
|
|
{{ tables.paramtable(endpoint.res_headers.rows) }}
|
2016-10-13 18:11:18 +02:00
|
|
|
{% endif -%}
|
|
|
|
|
|
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)}}
|
|
|
|
|
|
2016-05-06 16:42:31 +02:00
|
|
|
{% if endpoint.responses|length > 0 -%}
|
|
|
|
|
Response{{"s" if endpoint.responses|length > 1 else "" }}:
|
2015-06-01 15:20:24 +02:00
|
|
|
|
2015-09-07 18:14:36 +02:00
|
|
|
{% endif -%}
|
|
|
|
|
|
2016-05-06 16:42:31 +02:00
|
|
|
{% for res in endpoint.responses -%}
|
2015-09-07 18:14:36 +02:00
|
|
|
|
|
|
|
|
**Status code {{res["code"]}}:**
|
|
|
|
|
|
|
|
|
|
{{res["description"]}}
|
|
|
|
|
|
2016-05-06 16:42:31 +02:00
|
|
|
{% if res["example"] -%}
|
|
|
|
|
|
2015-09-18 18:26:10 +02:00
|
|
|
Example
|
|
|
|
|
|
|
|
|
|
.. code:: json
|
2015-09-07 18:14:36 +02:00
|
|
|
|
|
|
|
|
{{res["example"] | indent_block(2)}}
|
|
|
|
|
|
2016-05-06 16:42:31 +02:00
|
|
|
{% endif -%}
|
2016-01-13 16:55:51 +01:00
|
|
|
|
2016-05-06 16:42:31 +02:00
|
|
|
{% endfor %}
|