Updated DemoPlugin_WebRequest (markdown)

Chris Caron 2024-05-27 18:59:57 -04:00
parent 1a9171ed2b
commit 744d1bb656

@ -1,17 +1,16 @@
# A Web Request Apprise Notification Example # 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. 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 ## The Code
```python ```python
import requests import requests
import json import json
from .NotifyBase import NotifyBase from ..url import PrivacyMode
from ..URLBase import PrivacyMode from .base import NotifyBase
from ..locale import gettext_lazy as _
from ..common import NotifyType from ..common import NotifyType
from ..AppriseLocale import gettext_lazy as _
class NotifyDemo(NotifyBase): class NotifyDemo(NotifyBase):
""" """