2013-09-05 19:04:17 +02:00
|
|
|
<li class="{{ data.method|lower }} operation" id="{{ data.id }}">
|
|
|
|
<a class="heading toggler{% if data.deprecated %} deprecated{% endif %}" href="#{{ data.id }}">
|
|
|
|
<h3>
|
|
|
|
<span class="http_method">
|
|
|
|
<i>{{ data.method|upper }}</i>
|
|
|
|
</span>
|
2013-03-18 08:40:03 +01:00
|
|
|
|
2013-09-05 19:04:17 +02:00
|
|
|
{% if data.deprecated %}
|
|
|
|
<span class="deprecated">
|
|
|
|
<i>DEPRECATED</i>
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2012-12-10 10:21:04 -08:00
|
|
|
|
2013-09-05 19:04:17 +02:00
|
|
|
{% if data.https %}
|
|
|
|
<span class="icon lock" title="HTTPS"></span>
|
|
|
|
{% endif %}
|
|
|
|
{% if data.authentication %}
|
|
|
|
<span class="icon keys" title="Needs authentication"></span>
|
|
|
|
{% endif %}
|
2012-12-10 10:21:04 -08:00
|
|
|
|
2013-09-05 19:04:17 +02:00
|
|
|
<span class="path">
|
|
|
|
{% if data.host is defined -%}
|
|
|
|
{{ data.https ? 'https://' : 'http://' -}}
|
|
|
|
{{ data.host -}}
|
|
|
|
{% endif -%}
|
|
|
|
{{ data.uri }}
|
|
|
|
</span>
|
|
|
|
</h3>
|
|
|
|
<ul class="options">
|
|
|
|
{% if data.description is defined %}
|
|
|
|
<li>{{ data.description }}</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</a>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2013-04-11 22:03:40 +02:00
|
|
|
<div class="content" style="display: {% if displayContent is defined and displayContent == true %}display{% else %}none{% endif %};">
|
2012-07-18 13:18:26 +02:00
|
|
|
<ul class="tabs">
|
|
|
|
<li class="selected" data-pane="content">Documentation</li>
|
|
|
|
{% if enableSandbox %}
|
|
|
|
<li data-pane="sandbox">Sandbox</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="panes">
|
|
|
|
<div class="pane content selected">
|
|
|
|
{% if data.documentation is defined and data.documentation is not empty %}
|
|
|
|
<h4>Documentation</h4>
|
2012-07-20 17:38:39 +02:00
|
|
|
<div>{{ data.documentation|extra_markdown }}</div>
|
2012-07-18 13:18:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2013-08-16 19:18:05 +02:00
|
|
|
{% if data.link is defined and data.link is not empty %}
|
|
|
|
<h4>Link</h4>
|
|
|
|
<div><a href="{{ data.link }}" target="_blank">{{ data.link }}</a></div>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
{% if data.requirements is defined and data.requirements is not empty %}
|
|
|
|
<h4>Requirements</h4>
|
|
|
|
<table class="fullwidth">
|
|
|
|
<thead>
|
2012-05-24 01:22:45 +02:00
|
|
|
<tr>
|
2012-07-18 13:18:26 +02:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Requirement</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Description</th>
|
2012-05-24 01:22:45 +02:00
|
|
|
</tr>
|
2012-07-18 13:18:26 +02:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for name, infos in data.requirements %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ name }}</td>
|
|
|
|
<td>{{ infos.requirement }}</td>
|
2012-11-17 17:39:54 +01:00
|
|
|
<td>{{ infos.dataType }}</td>
|
2012-07-18 13:18:26 +02:00
|
|
|
<td>{{ infos.description }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if data.filters is defined and data.filters is not empty %}
|
|
|
|
<h4>Filters</h4>
|
|
|
|
<table class="fullwidth">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Information</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for name, infos in data.filters %}
|
2012-05-24 01:22:45 +02:00
|
|
|
<tr>
|
|
|
|
<td>{{ name }}</td>
|
2012-07-18 13:18:26 +02:00
|
|
|
<td>
|
|
|
|
<table>
|
|
|
|
{% for key, value in infos %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ key|title }}</td>
|
2012-07-20 02:02:45 +02:00
|
|
|
<td>{{ value|json_encode|replace({'\\\\': '\\'})|trim('"') }}</td>
|
2012-07-18 13:18:26 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</td>
|
2012-05-24 01:22:45 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2012-07-18 13:18:26 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if data.parameters is defined and data.parameters is not empty %}
|
|
|
|
<h4>Parameters</h4>
|
|
|
|
<table class='fullwidth'>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Parameter</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Required?</th>
|
2013-06-10 17:18:17 -07:00
|
|
|
<th>Format</th>
|
2012-07-18 13:18:26 +02:00
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2012-07-02 21:52:03 +01:00
|
|
|
{% for name, infos in data.parameters %}
|
2012-08-30 15:57:43 -04:00
|
|
|
{% if not infos.readonly %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ name }}</td>
|
|
|
|
<td>{{ infos.dataType }}</td>
|
|
|
|
<td>{{ infos.required ? 'true' : 'false' }}</td>
|
2013-06-10 17:18:17 -07:00
|
|
|
<td>{{ infos.format }}</td>
|
2012-08-30 15:57:43 -04:00
|
|
|
<td>{{ infos.description }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2012-08-28 16:43:47 -04:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if data.response is defined and data.response is not empty %}
|
|
|
|
<h4>Return</h4>
|
|
|
|
<table class='fullwidth'>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Parameter</th>
|
|
|
|
<th>Type</th>
|
2013-04-24 22:28:46 +02:00
|
|
|
<th>Versions</th>
|
2012-08-28 16:43:47 -04:00
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for name, infos in data.response %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ name }}</td>
|
|
|
|
<td>{{ infos.dataType }}</td>
|
2013-04-24 22:28:46 +02:00
|
|
|
<td>{% include 'NelmioApiDocBundle:Components:version.html.twig' with {'sinceVersion': infos.sinceVersion, 'untilVersion': infos.untilVersion} only %}</td>
|
2012-07-18 13:18:26 +02:00
|
|
|
<td>{{ infos.description }}</td>
|
|
|
|
</tr>
|
2012-07-02 21:52:03 +01:00
|
|
|
{% endfor %}
|
2012-07-18 13:18:26 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
2012-11-13 04:45:07 +00:00
|
|
|
|
2013-02-18 21:07:59 +01:00
|
|
|
{% if data.statusCodes is defined and data.statusCodes is not empty %}
|
|
|
|
<h4>Status Codes</h4>
|
|
|
|
<table class="fullwidth">
|
|
|
|
<thead>
|
2012-11-13 04:45:07 +00:00
|
|
|
<tr>
|
|
|
|
<th>Status Code</th>
|
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
2013-02-18 21:07:59 +01:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for status_code, descriptions in data.statusCodes %}
|
|
|
|
<tr>
|
|
|
|
<td><a href="http://en.wikipedia.org/wiki/HTTP_{{ status_code }}" target="_blank">{{ status_code }}<a/></td>
|
|
|
|
<td>
|
|
|
|
<ul>
|
|
|
|
{% for description in descriptions %}
|
|
|
|
<li>{{ description }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-11-13 04:45:07 +00:00
|
|
|
{% endfor %}
|
2013-02-18 21:07:59 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2012-11-13 04:45:07 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2013-03-26 11:49:12 +01:00
|
|
|
{% if data.cache is defined and data.cache is not empty %}
|
|
|
|
<h4>Cache</h4>
|
|
|
|
<div>{{ data.cache }}s</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if enableSandbox %}
|
|
|
|
<div class="pane sandbox">
|
|
|
|
<form method="{{ data.method|upper }}" action="{{ data.uri }}">
|
|
|
|
<fieldset class="parameters">
|
2012-09-12 13:47:25 -04:00
|
|
|
<legend>Input</legend>
|
|
|
|
{% if data.requirements is defined %}
|
|
|
|
<h4>Requirements</h4>
|
|
|
|
{% for name, infos in data.requirements %}
|
2012-07-18 13:18:26 +02:00
|
|
|
<p class="tuple">
|
|
|
|
<input type="text" class="key" value="{{ name }}" placeholder="Key" />
|
|
|
|
<span>=</span>
|
2012-09-12 13:47:25 -04:00
|
|
|
<input type="text" class="value" placeholder="{% if infos.description is defined %}{{ infos.description }}{% else %}Value{% endif %}" /> <span class="remove">-</span>
|
2012-07-18 13:18:26 +02:00
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2012-09-12 13:47:25 -04:00
|
|
|
{% if data.filters is defined %}
|
|
|
|
<h4>Filters</h4>
|
|
|
|
{% for name, infos in data.filters %}
|
2012-07-26 12:34:43 +01:00
|
|
|
<p class="tuple">
|
|
|
|
<input type="text" class="key" value="{{ name }}" placeholder="Key" />
|
|
|
|
<span>=</span>
|
|
|
|
<input type="text" class="value" placeholder="{% if infos.description is defined %}{{ infos.description }}{% else %}Value{% endif %}" /> <span class="remove">-</span>
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2012-09-12 13:47:25 -04:00
|
|
|
{% if data.parameters is defined %}
|
|
|
|
<h4>Parameters</h4>
|
|
|
|
{% for name, infos in data.parameters %}
|
|
|
|
{% if not infos.readonly %}
|
2012-07-18 13:18:26 +02:00
|
|
|
<p class="tuple">
|
|
|
|
<input type="text" class="key" value="{{ name }}" placeholder="Key" />
|
|
|
|
<span>=</span>
|
2013-06-10 17:18:17 -07:00
|
|
|
<input type="text" class="value" placeholder="{% if infos.dataType %}[{{ infos.dataType }}] {% endif %}{% if infos.format %}{{ infos.format }}{% endif %}{% if infos.description %}{{ infos.description }}{% else %}Value{% endif %}" /> <span class="remove">-</span>
|
2012-07-18 13:18:26 +02:00
|
|
|
</p>
|
2012-09-12 13:47:25 -04:00
|
|
|
{% endif %}
|
2012-07-18 13:18:26 +02:00
|
|
|
{% endfor %}
|
2012-09-12 13:47:25 -04:00
|
|
|
<button class="add">New parameter</button>
|
2012-07-18 13:18:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<fieldset class="headers">
|
|
|
|
<legend>Headers</legend>
|
|
|
|
|
2012-12-11 17:59:03 -08:00
|
|
|
{% if acceptType %}
|
2013-01-08 16:38:52 -08:00
|
|
|
<p class="tuple">
|
|
|
|
<input type="text" class="key" value="Accept" />
|
|
|
|
<span>=</span>
|
|
|
|
<input type="text" class="value" value="{{ acceptType }}" /> <span class="remove">-</span>
|
|
|
|
</p>
|
2012-12-11 17:59:03 -08:00
|
|
|
{% endif %}
|
|
|
|
|
2012-05-24 01:22:45 +02:00
|
|
|
<p class="tuple">
|
2012-07-18 13:18:26 +02:00
|
|
|
<input type="text" class="key" placeholder="Key" />
|
2012-05-24 01:22:45 +02:00
|
|
|
<span>=</span>
|
2012-07-18 13:18:26 +02:00
|
|
|
<input type="text" class="value" placeholder="Value" /> <span class="remove">-</span>
|
2012-05-24 01:22:45 +02:00
|
|
|
</p>
|
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<button class="add">New header</button>
|
|
|
|
</fieldset>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<fieldset class="request-content">
|
|
|
|
<legend>Content</legend>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<textarea class="content" placeholder="Content set here will override the parameters that do not match the url"></textarea>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<p class="tuple">
|
|
|
|
<input type="text" class="key content-type" value="Content-Type" disabled="disabled" />
|
|
|
|
<span>=</span>
|
|
|
|
<input type="text" class="value" placeholder="Value" />
|
|
|
|
<button class="set-content-type">Set header</button> <small>Replaces header if set</small>
|
|
|
|
</p>
|
|
|
|
</fieldset>
|
2012-07-05 19:38:22 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<div class="buttons">
|
|
|
|
<input type="submit" value="Try!" />
|
|
|
|
</div>
|
|
|
|
</form>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<script type="text/x-tmpl" class="tuple_template">
|
2012-07-05 19:38:22 +02:00
|
|
|
<p class="tuple">
|
2012-07-18 13:18:26 +02:00
|
|
|
<input type="text" class="key" placeholder="Key" />
|
2012-07-05 19:38:22 +02:00
|
|
|
<span>=</span>
|
2012-07-18 13:18:26 +02:00
|
|
|
<input type="text" class="value" placeholder="Value" /> <span class="remove">-</span>
|
2012-07-05 19:38:22 +02:00
|
|
|
</p>
|
2012-07-18 13:18:26 +02:00
|
|
|
</script>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<div class="result">
|
|
|
|
<h4>Request URL</h4>
|
|
|
|
<pre class="url"></pre>
|
2012-05-24 01:22:45 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<h4>Response Headers <small>[<a href="" class="to-expand">Expand</a>]</small></h4>
|
|
|
|
<pre class="headers to-expand"></pre>
|
2012-07-04 16:31:06 +02:00
|
|
|
|
2012-07-18 13:18:26 +02:00
|
|
|
<h4>Response Body <small>[<a href="" class="to-raw">Raw</a>]</small></h4>
|
|
|
|
<pre class="response prettyprint"></pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2012-05-24 01:22:45 +02:00
|
|
|
</div>
|
2012-04-13 11:24:57 +02:00
|
|
|
</div>
|
|
|
|
</li>
|