mirror of
https://github.com/caronc/apprise-api.git
synced 2025-01-05 13:39:15 +01:00
Better Micro-Service Integration Docs in README
This commit is contained in:
parent
1fc4277bd3
commit
50bd4b3fb5
27
README.md
27
README.md
@ -91,16 +91,6 @@ flake8 apprise_api
|
||||
pytest apprise_api
|
||||
```
|
||||
|
||||
## Micro-Service Integration
|
||||
|
||||
Perhaps you run your own service and the only goal you have is to add notification support to it. Here is an example:
|
||||
```bash
|
||||
# Send your notifications
|
||||
curl -X POST -d '{"urls": "mailto://user:pass@gmail.com", "body":"test message"}' \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8000/notify
|
||||
```
|
||||
|
||||
## Apprise Integration
|
||||
|
||||
### Apprise CLI Pull Example
|
||||
@ -133,3 +123,20 @@ a.add(config)
|
||||
# Send a test message
|
||||
a.notify('test message')
|
||||
```
|
||||
|
||||
## Micro-Service Integration
|
||||
You can trigger the API to notify your pre-created keys like so: (using `/notify/{key}`):
|
||||
```bash
|
||||
# Send notification(s) to a {key} defined as 'my-apprise-key'
|
||||
curl -X POST -d '{"body":"test message"}' \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8000/notify/my-apprise-key
|
||||
```
|
||||
|
||||
Here is a *stateless* example where no key is required (using `/notify/`):
|
||||
```bash
|
||||
# Send your notifications directly
|
||||
curl -X POST -d '{"urls": "mailto://user:pass@gmail.com", "body":"test message"}' \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8000/notify
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user