Updated Development_API (markdown)

Chris Caron 2019-02-09 02:26:42 -05:00
parent 6839538693
commit 5b3f4cb37e

@ -77,7 +77,10 @@ a.add('json://localhost/tagD/', tag="TagD")
# add a tag set by set (again)
a.add('json://localhost/tagCDE/', tag=set(["TagC", "TagD", "TagE"]))
```
Now that we've added our services and assigned them tags, this is how we can access them:
```python
# Expression: TagC and TagD
# Matches the following only:
# - json://localhost/tagCD/
@ -99,7 +102,19 @@ a.notify(title="my title", body="my body", tag=[('TagY', 'TagZ'), 'TagA'])
# - json://localhost/tagAB/
# - json://localhost/tagB/
a.notify(title="my title", body="my body", tag=[('TagE', 'TagD'), 'TagB'])
# Expression: None
# Matches every single service.
a.notify(title="my title", body="my body")
```
You could look at the apprise.notify() logic like this:
|tag= line | Tag Representation |
| ------------------------- | ------------------------ |
| "TagA, TagB" | TagA **or** TagB
| ['TagA', 'TagB'] | TagA **or** TagB
| [('TagA', 'TagC'), 'TagB']| (TagA **and** TagC) **or** TtagB
| [('TagB', 'TagC')] | TagB **and** TagC
By default, all notifications are sent as type **NotifyType.INFO** using the _default_ theme. The following other types are included with this theme: