From faf4ccd84397140177ac288e2a9e3eff2d3d7f8b Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Fri, 15 Feb 2019 15:20:16 -0500 Subject: [PATCH] Updated Development_API (markdown) --- Development_API.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Development_API.md b/Development_API.md index 310889c..fb2094f 100644 --- a/Development_API.md +++ b/Development_API.md @@ -70,7 +70,7 @@ apobj.notify( ) ``` #### 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: | apprise.notify(tag=**match**) | Tag Representation | | -------------------------------- | ------------------------ | @@ -84,23 +84,27 @@ If you associated tags with your notification services (when you called **add()* Now that we've added our services and assigned them tags, this is how we can access them: ```python # Has TagA -apobj.notify(title='a title', body="a body", tag="tagA") +apobj.notify( + title='a title', body="a body", tag="tagA") # Has TagA OR TagB -apobj.notify(title='a title', body="a body", tag=["tagA", "TagB"]) +apobj.notify( + title='a title', body="a body", tag=["tagA", "TagB"]) # Has TagA AND TagB -apobj.notify(title='a title', body="a body", tag=[("tagA", "TagB")]) +apobj.notify( + title='a title', body="a body", tag=[("tagA", "TagB")]) # Has TagA OR TagB OR (TagC AND TagD) -apobj.notify(title='a title', body="a body", tag=["tagA", "TagB", ["TagC", "TagD"]]) +apobj.notify( + title='a title', body="a body", tag=["tagA", "TagB", ["TagC", "TagD"]]) # No reference to tags; alert all of the added services apobj.notify(title="my title", body="my body") ``` #### Tagging and Categories -Another use case for tagging might be for a system owner to fill their code with clean logic like: +Another use case for tagging might be to instead interpret them as categories. A system owner could simply fill their code with clean logic like: ```python #... stuff happening apobj.notify(title='a title', body="a body", tag="service-message")