From 0691832817496a3823e60ff53deee9b1af61b0a5 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 4 Aug 2016 11:52:28 -0700 Subject: [PATCH] docs: Document new WEBHOOK_INTEGRATIONS API. --- docs/integration-guide.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/integration-guide.md b/docs/integration-guide.md index d2c0b7ec6f..fa6dfc1602 100644 --- a/docs/integration-guide.md +++ b/docs/integration-guide.md @@ -123,8 +123,11 @@ Here's how we recommend doing it: integration](#documenting-your-integration) for details. * `zerver/test_hooks.py`: Edit to include tests for your webbook. See [Testing and writing tests](testing.html) for details. -* `zproject/urls.py`: Edit to add externally available url of the webhook and - associate with the function added to `zerver/views/webhooks/mywebhook.py` +* `zerver/lib/integrations.py`: Add your integration to +`WEBHOOK_INTEGRATIONS` to register it. This will automatically +register a url for the webhook of the form `api/v1/external/mywebhook` +and associate with the function called `api_mywebhook_webhook` in +`zerver/views/webhooks/mywebhook.py`. ### Files that need to be created