From 122a78756a67c95ef8ea52b87bd2e9a8b261f5af Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Thu, 21 Feb 2019 20:12:49 -0500 Subject: [PATCH] Updated Development_API (markdown) --- Development_API.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Development_API.md b/Development_API.md index b074c50..93d2b6e 100644 --- a/Development_API.md +++ b/Development_API.md @@ -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", +) ``` \ No newline at end of file