{% extends "passerelle/manage/service_view.html" %}
{% load i18n passerelle %}

{% block description %}
{% endblock %}

{% block endpoints %}
<ul>
  <li>{% trans 'Get newsletters:' %}
    {% url 'meyzieu-newsletters-types' slug=object.slug as types_url %}
    <a href="{{ types_url }}">{{ site_base_uri }}{{ types_url }}</a></li>
  <li>{% trans 'Get subscriptions:' %}
    {% url 'meyzieu-newsletters-subscriptions' slug=object.slug as subscriptions_url %}
    <a href="{{ subscriptions_url }}">{{ site_base_uri }}{{ subscriptions_url }}</a>?email=<em>email</em>
  </li>
  <li>{% trans 'Update subscriptions(POST):' %}
    {% url 'meyzieu-newsletters-subscriptions' slug=object.slug as subscriptions_url %}
    <a href="{{ subscriptions_url }}">{{ site_base_uri }}{{ subscriptions_url }}</a>?email=<em>email</em><br />
    Payload JSON:
    <ul>
      <li><em>{"id": "newsletter_id", "transports" : ["transport1_id", "transport2_id]"}</em></li>
    </ul>
  </li>
  <li>{% trans 'Delete all subscriptions:(DELETE)' %}
    {% url 'meyzieu-newsletters-subscriptions' slug=object.slug as subscriptions_url %}
    <a href="{{ subscriptions_url }}">{{ site_base_uri }}{{ subscriptions_url }}</a>?email=<em>email</em><br />
    <ul>
    </ul>
  </li>
</ul>
{% endblock %}

{% block security %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}
