Updated Development_API (markdown)

Chris Caron 2020-09-18 12:05:37 -04:00
parent 484b1efe27
commit 9d11749951

@ -71,6 +71,27 @@ apobj.notify(
title='my notification title', title='my notification title',
) )
``` ```
Developers should know that Apprise passes everything it gets _as is_ which will work for most circumstances. However sometimes it's useful to let apprise know the data you're feeding it. This information is used to guarantee that the upstream provider can handle the content, and if it can't, it _will be modified_ so that it does.
```python
# Include the NotifyFormat object
from apprise import NotifyFormat
# our body might be read from a file, it might be just input from
# our end users
body="""
...a lot of content
that could span multiple lines ...
"""
# Now we can send our notification while controlling the input source
# and knowing the upstream plugins will be able to handle it
apobj.notify(
body=body,
# Possible formats are TEXT, MARDOWN, and HTML
body_format=NotifyFormat.TEXT,
)
```
#### Leverage Tagging #### Leverage Tagging
If you associated tags with your notification services when you called **add()** earlier, you can leverage it's full potential through the **notify()** function here. Tagging however allows you to trigger notifications only when a criteria is met. The tagging logic can be interpreted as follows: If you associated tags with your notification services when you called **add()** earlier, you can leverage it's full potential through the **notify()** function here. Tagging however allows you to trigger notifications only when a criteria is met. The tagging logic can be interpreted as follows: