-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attachment keyword in payload now supports Web Based URLs (#164)
- Loading branch information
Showing
6 changed files
with
580 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,16 +147,47 @@ curl -X POST \ | |
-F attach2=@/my/path/to/Apprise.doc \ | ||
http://localhost:8000/notify | ||
|
||
# This example shows how you can place the body among other parameters | ||
# in the GET parameter and not the payload as another option. | ||
curl -X POST -d 'urls=mailto://user:[email protected]&body=test message' \ | ||
-F @/path/to/your/attachment \ | ||
http://localhost:8000/notify | ||
|
||
# The body is not required if an attachment is provided: | ||
curl -X POST -d 'urls=mailto://user:[email protected]' \ | ||
-F @/path/to/your/attachment \ | ||
http://localhost:8000/notify | ||
|
||
# Send your notifications directly using JSON | ||
curl -X POST -d '{"urls": "mailto://user:[email protected]", "body":"test message"}' \ | ||
-H "Content-Type: application/json" \ | ||
http://localhost:8000/notify | ||
``` | ||
|
||
You can also send notifications that are URLs. Apprise will download the item so that it can send it along to all end points that should be notified about it. | ||
```bash | ||
# Use the 'attachment' parameter and send along a web request | ||
curl -X POST \ | ||
-F 'urls=mailto://user:[email protected]' \ | ||
-F attachment=https://i.redd.it/my2t4d2fx0u31.jpg \ | ||
http://localhost:8000/notify | ||
|
||
# To send more then one URL, the following would work: | ||
curl -X POST \ | ||
-F 'urls=mailto://user:[email protected]' \ | ||
-F attachment=https://i.redd.it/my2t4d2fx0u31.jpg \ | ||
-F attachment=https://path/to/another/remote/file.pdf \ | ||
http://localhost:8000/notify | ||
|
||
# Finally feel free to mix and match local files with external ones: | ||
curl -X POST \ | ||
-F 'urls=mailto://user:[email protected]' \ | ||
-F attachment=https://i.redd.it/my2t4d2fx0u31.jpg \ | ||
-F attachment=https://path/to/another/remote/file.pdf \ | ||
-F @/path/to/your/local/file/attachment \ | ||
http://localhost:8000/notify | ||
``` | ||
|
||
### Persistent Storage Solution | ||
|
||
You can pre-save all of your Apprise configuration and/or set of Apprise URLs and associate them with a `{KEY}` of your choosing. Once set, the configuration persists for retrieval by the `apprise` [CLI tool](https://github.com/caronc/apprise/wiki/CLI_Usage) or any other custom integration you've set up. The built in website with comes with a user interface that you can use to leverage these API calls as well. Those who wish to build their own application around this can use the following API end points: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.