{% extends "layout.html" %}
{% from "_macros.html" import render_event_props, render_image_with_link, render_place, render_link_prop %}
{%- block title -%}
{{ _('Developer') }}
{%- endblock -%}
{% block content %}

<h1>{{ _('Developer') }}</h1>

{% if config["DOCS_URL"] %}
    <div class="my-2">
        <a class="btn btn-outline-info" href="{{ config["DOCS_URL"] }}/category/developer" target="_blank" rel="noopener noreferrer" role="button"><i class="fa fa-fw fa-info-circle"></i> Documentation</a>
    </div>
{% endif %}

<h2>API</h2>
<ul>
    {% if config["DOCS_URL"] %}
        <li>Authorization: <a href="{{ config["DOCS_URL"] }}/goto/dev-api-auth" target="_blank" rel="noopener noreferrer">Documentation</a></li>
    {% endif %}
    <li>Endpoints: <a href="/swagger-ui" target="_blank" rel="noopener noreferrer">Swagger UI</a></li>
    <li>Code generation: <a href="https://editor.swagger.io/?url={{ url_for('home', _external=True) }}swagger/" target="_blank" rel="noopener noreferrer">Swagger Editor</a></li>
</ul>

<h2>{{ _('Download') }}</h2>
<ul>
    <li>
    {% if dump_file %}
        <a href="{{ dump_file.url }}">{{ _('All data') }}</a> <span class="badge badge-pill badge-light">{{ dump_file.ctime | datetimeformat }}</span> <span class="badge badge-pill badge-light">{{ dump_file.size | human_file_size }}</span>
    {% else %}
        {{ _('No files available') }}
    {% endif %}
    </li>
    <li>The data file format is part of the <a href="/swagger-ui" target="_blank" rel="noopener noreferrer">API spec</a>. Watch for the <code>*Dump</code> models.</li>
</ul>


{% endblock %}