{% extends theme('layouts/1-column.html') %} {% from theme('macros/breadcrumb.html') import breadcrumb with context %} {% from theme('macros/follow.html') import follow_btn with context %} {% set meta = { 'title': dataservice.title, 'description': dataservice.description|mdstrip(60)|forceescape, 'image': dataservice.organization and dataservice.organization.logo(external=True) or '', 'keywords': [_('API')] + dataservice.tags, 'robots': 'noindex, nofollow' if dataservice.is_hidden else '', } %} {% set read_only_mode = config.READ_ONLY_MODE %} {% block extra_head %} {% cache cache_duration, 'dataservice-extra-head', dataservice.id|string, g.lang_code, dataservice.last_modified|string %} {% endcache %} {% endblock %} {% block breadcrumb %} {% cache cache_duration, 'dataservice-breadcrumb', dataservice.id|string, g.lang_code, dataservice.last_modified|string %}
  • {{ _('APIs') }}
  • {{ dataservice.acronym or dataservice.title|truncate(128) }}
  • {% endcache %} {% endblock %} {% block toolbar %} {{ follow_btn(dataservice) }} {% endblock %} {% block content %} {% cache cache_duration, 'dataservice-content', dataservice.id|string, g.lang_code, current_user.slug or 'anonymous', dataservice.metadata_modified_at|string %} {{ breadcrumb(self) }}
    {% if dataservice.private or dataservice.deleted_at or dataservice.archived_at %}
    {% if dataservice.private %}

    {{ _('Private') }}

    {% endif %} {% if dataservice.deleted_at %}

    {{ _('Deleted') }}

    {% endif %} {% if dataservice.archived_at %}

    {{ _('Archived') }}

    {% endif %}
    {% endif %}

    {{ dataservice.title }} {% if dataservice.acronym %}{{ dataservice.acronym }}{% endif %}

    {{ _('Description') }}

    {{ dataservice.description|markdown }}
    {% if dataservice.organization %}

    {{ _('Producer') }}

    {% with organization=dataservice.organization, producer_type='organization' %} {% include theme('organization/producer-name-with-logo.html') %} {% endwith %} {% elif dataservice.owner %}

    {{ _('Author') }}

    {% with organization=dataservice.owner, producer_type='owner' %} {% include theme('organization/producer-name-with-logo.html') %} {% endwith %}

    {% trans date=dataservice.created_at|dateformat(format='long'), update=dataservice.metadata_modified_at|dateformat(format='long'), author=dataservice.owner.fullname %}This API has been published on the initiative and under the responsibility of {{author}}
    Published on {{date}}{% endtrans %}

    {% endif %}

    {{ _('Latest update') }}

    {{ dataservice.metadata_modified_at|dateformat(format='long') }}

    {{ _('Rate limiting') }}

    {% if dataservice.rate_limiting %} {{ dataservice.rate_limiting }} {% else %} {{ _('Not documented') }} {% endif %}

    {{ _('Availability') }}

    {% if dataservice.availability %} {{ _("%(availability)s last month", availability=dataservice.availability|format_percentage) }} {% else %} {{ _('Not documented') }} {% endif %}

    {{ _('Access') }}

    {% if dataservice.is_restricted %}

    {{ _('Restricted') }}

    {% if dataservice.authorization_request_url %}

    {{ _("Make an authorization request") }}

    {% endif %} {% else %}

    {{ _('Opened') }}

    {% endif %}

    {{ _('API link') }}

    {% if dataservice.base_api_url %} {{ dataservice.base_api_url }} {% else %} {{ _('Not documented') }} {% endif %}

    {{ _('Documentation link') }}

    {% if dataservice.endpoint_description_url %} {{ dataservice.endpoint_description_url }} {% else %} {{ _('Not documented') }} {% endif %}

    {{ hook('dataservice.display.after-description') }}
    {% if dataservice.datasets|length %}

    {{ ngettext('%(num)d used dataset', '%(num)d used datasets', dataservice.datasets|length) }}

    {% with datasets = dataservice.datasets %} {% include theme('dataset/search-results.html') %} {% endwith %}
    {% else %}
    {% include theme('svg/illustrations/dataset.svg') %}

    {{ _('No datasets on %(site)s are linked to this API.', site=config.SITE_TITLE) }}

    {% endif %} {{ hook('dataservice.display.metrics') }}
    {% if not dataservice.metrics.discussions %}

    {{ _('Discussions') }}

    {% include theme('svg/blank_state/discussion.svg') %}

    {{ _('There are no discussions for this API yet.') }}

    {% endif %}
    {% endcache %} {% endblock %}