From 838370f441a9e5a411e4641b2edec0f0fc8d6917 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Tue, 5 Mar 2019 19:40:36 -0500 Subject: [PATCH] Updated README to reference tagging and fixed typos --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c8b7996d..ee1edb5b 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ apobj.notify( ``` ### Configuration Files -Developers need access to configuration files too. The good news is they're use just involves declaring another object that Apprise can ingest as easy as the notification urls. You can mix and match config and notification entries too! +Developers need access to configuration files too. The good news is their use just involves declaring another object (called AppriseConfig) that Apprise can ingest too! You can mix and match config and notification entries too! ```python import apprise @@ -148,7 +148,7 @@ import apprise apobj = apprise.Apprise() # Create an Config instance -config = apprise.AppriseCofig() +config = apprise.AppriseConfig() # Add a configuration source: config.add('/path/to/my/config.yml') @@ -160,14 +160,23 @@ config.add('https://myserver:8080/path/to/config') apobj.add(config) # You can mix and match; add an entry directly if you want too -apobj.add('mailto://myemail:mypass@gmail.com') +apobj.add('mailto://myemail:mypass@gmail.com', tag=admin) # Then notify these services any time you desire. The below would -# notify all of the services loaded into our Apprise object. +# notify all of the services loaded into our Apprise object; this includes +# all items identified in the configuration files. apobj.notify( body='what a great notification service!', title='my notification title', ) + +# If you're using tagging, then you can load all of your notifications +# but only selectively call ones associated with one or more tags: +apobj.notify( + body='send a notification to our admin group' + title='Attention Admins', + tag='admin', +) ``` If you're interested in reading more about this and methods on how to customize your own notifications, please check out the wiki at https://github.com/caronc/apprise/wiki/Development_API