{% extends "mini_buildd/base.html" %}
{% block title %}{% block titledup %}{% if request.GET.call %}API call {{ request.GET.call }}{% else %}API call index{% endif %}{% endblock %}{% endblock %}

{% block content %}
	{% if request.GET.call %}
		{% mbd_api request.GET.call verbose=True %}
	{% else %}
		{% for category in mbd.api.Call.CATEGORIES %}
			<section>
				<h3>{{ category }}</h3>
				{% for call in mbd.api.CALLS.values %}
					{% if call.category == category %}
					<details>
						<summary><strong>{{ call.name }}</strong>: <em>{{ call.doc_title }}</em>
							<a href="{{ request.path }}?call={{ call.name }}" title="Dedicated page for this call only" style="text-decoration: none;">
								<img class="mbd-icon mbd-icon-small" src="{% static 'icons/isolate.svg' %}" alt="Isolate">
							</a>
						</summary>
						<section>
							{% mbd_api call verbose=True %}
						</section>
					</details>
				{% endif %}
			{% endfor %}
			</section>
		{% endfor %}
	{% endif %}
{% endblock %}
