Updated Development_API (markdown)

master
lead2gold 2018-10-14 20:35:13 -04:00
parent 7123d8fcd9
commit 53b085e7ce
1 changed files with 55 additions and 0 deletions

@ -73,6 +73,61 @@ If you ever want to reset the object, you can use the **clear()** function.
apobj.clear() apobj.clear()
``` ```
Developers who wish to be able to generate information based on this library dynamically can use the __details()__ function:
```python
# returns an object containing details about the plugin for dynamic integration.
apobj.details()
```
The output will look like:
```json
{
"version": "0.5.2",
"asset": {
"default_extension": ".png",
"app_desc": "Apprise Notifications",
"image_path_mask": "https://github.com/caronc/apprise/raw/master/apprise/assets/themes/{THEME}/apprise-{TYPE}-{XY}{EXTENSION}",
"app_id": "Apprise",
"theme": "default",
"image_url_logo": "https://github.com/caronc/apprise/raw/master/apprise/assets/themes/{THEME}/apprise-logo.png",
"image_url_mask": "https://github.com/caronc/apprise/raw/master/apprise/assets/themes/{THEME}/apprise-{TYPE}-{XY}{EXTENSION}"
},
"schemas": [
{
"service_name": "Boxcar",
"setup_url": "https://github.com/caronc/apprise/wiki/Notify_boxcar",
"service_url": "https://boxcar.io/",
"protocols": null,
"secure_protocols": [
"boxcar"
]
},
{
"service_name": "Discord",
"setup_url": "https://github.com/caronc/apprise/wiki/Notify_discored",
"service_url": "https://discordapp.com/",
"protocols": null,
"secure_protocols": [
"discord"
]
},
{
"service_name": "E-Mail",
"setup_url": "https://github.com/caronc/apprise/wiki/Notify_email",
"service_url": null,
"protocols": [
"mailto"
],
"secure_protocols": [
"mailtos"
]
},
"... etc, ..."
]
}
```
The idea behind the __details()__ function is that it allows developers to pass details back through their program letting their users know what notifications are supported. Thus as this library deprecates and introduces new notification services, calling front end applications (built around the __details()__ function) can automatically serve this information back to their user base.
## The Apprise Asset Object ## The Apprise Asset Object
The apprise object allows you to customize your alarms by offering it different images, different sources and different themes. Different notification services support different ways of passing images into it (and some don't support images at all). Apprise offers a way of supporting both local and hosted images and looks after passing the correct one to the correct service (when requested). The apprise object allows you to customize your alarms by offering it different images, different sources and different themes. Different notification services support different ways of passing images into it (and some don't support images at all). Apprise offers a way of supporting both local and hosted images and looks after passing the correct one to the correct service (when requested).