mirror of
https://github.com/caronc/apprise.git
synced 2025-01-19 04:19:32 +01:00
Updated Development_API (markdown)
parent
be757ab0e6
commit
122a78756a
@ -3,6 +3,8 @@ Apprise is very easy to use as a developer. The **Apprise()** object handles eve
|
||||
* **[[The Apprise Object|Development_API#the-apprise-object]]**
|
||||
* **[[The Apprise Asset Object|Development_API#the-apprise-asset-object]]**
|
||||
|
||||
Some additional functionality is available via the **[[The Apprise Notification Object|Development_API#the-apprise-notification-object]]** for those who want to manage the notifications themselves.
|
||||
|
||||
## The Apprise Object
|
||||
The Apprise() object is the heart and soul of this library. To instantiate an instance of the object, one might do the following:
|
||||
```python
|
||||
@ -281,4 +283,26 @@ apobj = apprise.Apprise(asset=asset)
|
||||
|
||||
# At this point you can use the Apprise() object knowing that all of the
|
||||
# default configuration has been over-ridden.
|
||||
```
|
||||
|
||||
## The Apprise Notification Object
|
||||
The **[[The Apprise Object|Development_API#the-apprise-object]]** actually already does a really good managing these for you. But if you want to manage the notifications yourself here is how you can do it:
|
||||
|
||||
```python
|
||||
# Import this library
|
||||
import apprise
|
||||
|
||||
# Instantiate an object. This is what the apprise object
|
||||
# would have otherwise done under the hood:
|
||||
obj = apprise.Apprise.instantiate('glib://')
|
||||
|
||||
# Now you can use the send() function to pass notifications.
|
||||
# send() is similar to Apprise.notify() except the overhead of
|
||||
# of tagging is not present. There also no handling of the
|
||||
# the text input type (HTML, MARKUP, etc). This is on you
|
||||
# to manipulate before passing in the content.
|
||||
obj.send(
|
||||
body=u"A test message",
|
||||
title=u"a title",
|
||||
)
|
||||
```
|
Loading…
Reference in New Issue
Block a user