{% 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.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 class="mbd-icon" 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 %}
