mirror of
https://github.com/caronc/apprise.git
synced 2024-11-21 23:53:23 +01:00
new logo and working code examples simplified
* New apprise logo * simplified attachment references
This commit is contained in:
parent
aac8455a5f
commit
4aa00f3704
27
README.md
27
README.md
@ -240,7 +240,7 @@ apobj.notify(
|
||||
# Tagging allows you to specifically target only specific notification
|
||||
# services you've loaded:
|
||||
apobj.notify(
|
||||
body='send a notification to our admin group'
|
||||
body='send a notification to our admin group',
|
||||
title='Attention Admins',
|
||||
# notify any services tagged with the 'admin' tag
|
||||
tag='admin',
|
||||
@ -249,7 +249,7 @@ apobj.notify(
|
||||
# If you want to notify absolutely everything (reguardless of whether
|
||||
# it's been tagged or not), just use the reserved tag of 'all':
|
||||
apobj.notify(
|
||||
body='send a notification to our admin group'
|
||||
body='send a notification to our admin group',
|
||||
title='Attention Admins',
|
||||
# notify absolutely everything loaded, reguardless on wether
|
||||
# it has a tag associated with it or not:
|
||||
@ -286,7 +286,7 @@ apobj.notify(
|
||||
)
|
||||
```
|
||||
|
||||
To send more than one attachment, you just need the **AppriseAttachment** object:
|
||||
To send more than one attachment, just use a list, set, or tuple instead:
|
||||
```python
|
||||
import apprise
|
||||
|
||||
@ -296,22 +296,21 @@ apobj = apprise.Apprise()
|
||||
# Add at least one service you want to notify
|
||||
apobj.add('mailto://myuser:mypass@hotmail.com')
|
||||
|
||||
# Initialize our attachment object
|
||||
attachment = apprise.AppriseAttachment()
|
||||
|
||||
# Now add all of the entries we're intrested in:
|
||||
# ?name= allows us to rename the actual jpeg as found on the site
|
||||
# to be another name when sent to our receipient(s)
|
||||
attachment.add('https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg')
|
||||
attach = (
|
||||
# ?name= allows us to rename the actual jpeg as found on the site
|
||||
# to be another name when sent to our receipient(s)
|
||||
'https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg',
|
||||
|
||||
# Now add another:
|
||||
attachment.add('/path/to/funny/joke.gif')
|
||||
# Now add another:
|
||||
'/path/to/funny/joke.gif',
|
||||
)
|
||||
|
||||
# Send your multiple attachments with a single notify call:
|
||||
apobj.notify(
|
||||
title='Some good jokes.'
|
||||
body='Hey guys, check out these!'
|
||||
attach=attachment,
|
||||
title='Some good jokes.',
|
||||
body='Hey guys, check out these!',
|
||||
attach=attach,
|
||||
)
|
||||
```
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 157 KiB |
Loading…
Reference in New Issue
Block a user