Browse Source

document webhook notifications configurations in README

Guilhem Saurel 6 years ago
parent
commit
9e5b524585
1 changed files with 13 additions and 2 deletions
  1. 13 2
      README.md

+ 13 - 2
README.md

@@ -68,9 +68,9 @@ accessible under *http://example.com/foo/* :
 
     URL_PREFIX='foo/'
 
-### Notifications
+### Email Notifications
 
-If you to receive notifications on each new contrib, customize those :
+If you want to receive email notifications on each new contrib, customize those :
 
 List of notification recipients:
 
@@ -80,6 +80,17 @@ Notification sender address:
 
     DEFAULT_FROM_EMAIL='notifier@example.tld'
 
+### Webhook Notifications
+
+If you want to send web notifications on each new contrib, install
+[requests](http://docs.python-requests.org/en/master/) and customize those :
+
+    WEBHOOK = True
+    WEBHOOK_URL = 'https://<domain>/<path>'
+    WEBHOOK_KEY = '<secret>'
+
+Then, on each contrib, an HTTP POST request wil be made to `WEBHOOK_URL` with json dict containing `'key': WEBHOOK_KEY`
+and the notification as `'text'`.
 
 ### Data expiration