mirror of
https://github.com/caronc/apprise.git
synced 2025-06-27 13:11:36 +02:00
Updated Development_API (markdown)
parent
6839538693
commit
5b3f4cb37e
@ -77,7 +77,10 @@ a.add('json://localhost/tagD/', tag="TagD")
|
|||||||
|
|
||||||
# add a tag set by set (again)
|
# add a tag set by set (again)
|
||||||
a.add('json://localhost/tagCDE/', tag=set(["TagC", "TagD", "TagE"]))
|
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
|
# Expression: TagC and TagD
|
||||||
# Matches the following only:
|
# Matches the following only:
|
||||||
# - json://localhost/tagCD/
|
# - json://localhost/tagCD/
|
||||||
@ -99,7 +102,19 @@ a.notify(title="my title", body="my body", tag=[('TagY', 'TagZ'), 'TagA'])
|
|||||||
# - json://localhost/tagAB/
|
# - json://localhost/tagAB/
|
||||||
# - json://localhost/tagB/
|
# - json://localhost/tagB/
|
||||||
a.notify(title="my title", body="my body", tag=[('TagE', 'TagD'), '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:
|
By default, all notifications are sent as type **NotifyType.INFO** using the _default_ theme. The following other types are included with this theme:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user