mirror of
https://github.com/caronc/apprise.git
synced 2024-12-12 18:01:08 +01:00
Updated DemoPlugin_WebRequest (markdown)
parent
1a9171ed2b
commit
744d1bb656
@ -1,17 +1,16 @@
|
||||
# A Web Request Apprise Notification Example
|
||||
This example shows a basic template of how one might build a Notification Service that is required to connect to an upstream web service and send a payload.
|
||||
|
||||
It's very important to save the `apprise/plugins/NotifyServiceName.py` to be exactly the name of the `NotifyServiceName` class you define within it. In this example, the class is `NotifyDemo`. This implies that the filename to activate this (and make it usable in Apprise) must be called `apprise/plugins/NotifyDemo.py`.
|
||||
It's very important that the filename `apprise/plugins/service.py` does not align with the class name inside of it. In this example, the class is `NotifyDemo`. So perhaps a good filename might be `apprise/plugins/demo.py`.
|
||||
|
||||
## The Code
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
from .NotifyBase import NotifyBase
|
||||
from ..URLBase import PrivacyMode
|
||||
from ..url import PrivacyMode
|
||||
from .base import NotifyBase
|
||||
from ..locale import gettext_lazy as _
|
||||
from ..common import NotifyType
|
||||
from ..AppriseLocale import gettext_lazy as _
|
||||
|
||||
|
||||
class NotifyDemo(NotifyBase):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user