From 30d87c82848f5d3534797565e74a1edae1a6d79e Mon Sep 17 00:00:00 2001
From: Chris Caron
+ {% url 'details' as href %}
+ {% blocktrans %}The following services are supported by this Apprise instance.{% endblocktrans %}
+
+ {% if show_all %}
+ {% blocktrans %}To see a simplified listing that only identifies the Apprise services enabled click here.{% endblocktrans %}
+ {% else %}
+ {% blocktrans %}To see a listing that identifies all of Apprise services available to this version (enabled or not) click here.{% endblocktrans %}
+ {% endif %}
+
*Payload Parameters*
📌 **body**: Your message body. This is the *only* required field.
📌 **title**: Optionally define a title to go along with the *body*.
📌 **type**: Defines the message type you want to send as. The valid options are `info`, `success`, `warning`, and `failure`. If no *type* is specified then `info` is the default value used.
📌 **tag**: Optionally notify only those tagged accordingly.
📌 **format**: Optionally identify the text format of the data you're feeding Apprise. The valid options are `text`, `markdown`, `html`. The default value if nothing is specified is `text`.
| `/json/urls/{KEY}` | GET | Returns a JSON response object that contains all of the URLS and Tags associated with the key specified.
+| `/details` | GET | Set the `Accept` Header to `application/json` and retrieve a JSON response object that contains all of the supported Apprise URLs. See [here for more details](https://github.com/caronc/apprise/wiki/Development_Apprise_Details#apprise-details)
As an example, the `/json/urls/{KEY}` response might return something like this:
diff --git a/apprise_api/api/templates/base.html b/apprise_api/api/templates/base.html
index a426d3a..77ed482 100644
--- a/apprise_api/api/templates/base.html
+++ b/apprise_api/api/templates/base.html
@@ -48,6 +48,8 @@
{% endif %}
+ settings
+ {% trans "Apprise Details" %}
📣
{% trans "Notification Services" %}
diff --git a/apprise_api/api/templates/details.html b/apprise_api/api/templates/details.html
new file mode 100644
index 0000000..b0ec421
--- /dev/null
+++ b/apprise_api/api/templates/details.html
@@ -0,0 +1,128 @@
+{% extends 'base.html' %}
+{% load i18n %}
+
+{% block body %}
+
{% trans 'Apprise Details' %}
+
+
+
+ {% for entry in details.schemas %}
+
+ {{ entry.service_name }}
+ {% if show_all and not entry.enabled %}
+ report{% blocktrans %}Note: This service is unavailable due to the service being disabled by the administrator or the required libraries needed to drive it is not installed or functioning correctly.{% endblocktrans %}
+ {% endif %}
+
+
+
+
+ {% blocktrans %}Developers who wish to receive this result set in a JSON parseable string for their application can perform the following to achive this:{% endblocktrans %} +
+
+ #{% blocktrans %}Retrieve JSON Formatted Apprise Details{% endblocktrans %}
+ curl -H "Accept: application/json" \
+ "{{ request.scheme }}://{{ request.META.HTTP_HOST }}{{ BASE_URL }}/details/{% if show_all %}?all=yes{% endif %}"
+
+
+ import json
+ from urllib.request import Request
+
# The URL
+ req = Request(
+ "{{ request.scheme }}://{{ request.META.HTTP_HOST }}{{ BASE_URL }}/details/{% if show_all %}?all=yes{% endif %}",
+ json.dumps(payload).encode('utf-8'),
+ {"Accept": "application/json"},
+ method='GET',
+ )
+
+
+ <?php
+
+ // The URL
+ $url = '{{ request.scheme }}://{{ request.META.HTTP_HOST }}{{ BASE_URL }}/details/{% if show_all %}?all=yes{% endif %}';
+
+ //Initiate cURL.
+ $ch = curl_init($url);
+
+ //Set the content type to application/json
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
+
+ //Execute the request
+ $result = curl_exec($ch);
+
+ + {% blocktrans %}More details on the JSON format can be found here.{% endblocktrans %} +