Commit Graph

14 Commits

Author SHA1 Message Date
Rishi Gupta bf22eefede api docs: Move integration-docs-guide to docs/. 2018-10-09 20:28:44 -07:00
Anders Kaseorg b618c644a3 HTML validation: Quote <my-bot> and <api_key> placeholders in api docs.
They were being sent to the browser as non-renderable HTML tags.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 10:00:56 +05:30
Eeshan Garg 4f98a45507 docs: Rename "webhooks" to "incoming webhooks".
I only renamed references that I thought were absolutely necessary
and only if the resulting sentence structure wasn't awkward.

If the renaming resulted in awkward structure, I replaced the term
"webhook" with "integration" (but only in some very obvious cases).

Fixes #9500.
2018-05-30 18:21:13 -07:00
Eeshan Garg 3ed20589f2 webhooks: Add generic exception for unexpected webhook events.
UnexpectedWebhookEventType is a generic exception that we may
now raise when we encounter a webhook event that is new or one
that we simply aren't aware of.
2018-05-22 08:30:19 -07:00
Aditya Bansal a00f3b5843 docs: Update for change from typing.Text to str. 2018-05-14 05:23:36 +05:30
Eeshan Garg 34d1b0ebf1 webhooks: Add helper to extract and validate HTTP event headers.
This is a part of our efforts to close #6213.
2018-05-05 15:48:37 -07:00
Preston Hansen e168f9938c tests: Refactor use of test and webhook data fixtures. 2018-04-19 21:50:29 -07:00
Preston Hansen 76d6c71595 tests: Move zerver/fixtures to zerver/tests/fixtures for clarity.
Fixes #9153.
2018-04-19 21:50:17 -07:00
Eeshan Garg af56df7723 webhooks: Enable custom topics and default PM notifications.
This commit adds a generic function called check_send_webhook_message
that does the following:
* If a stream is specified in the webhook URL, it sends a stream
  message, otherwise sends a PM to the owner of the bot.
* In the case of a stream message, if a custom topic is specified
  in the webhook URL, it uses that topic as the subject of the
  stream message.

Also, note that we need not test this anywhere except for the
helloworld webhook. Since helloworld is our default example for
webhooks, it is here to stay and it made sense that tests for a
generic function such as check_send_webhook_message be tested
with an actual generic webhook!

Fixes #8607.
2018-03-16 11:34:20 -07:00
Viraat Chandra 9284d32837 docs: Improve consistency and quality of API Documentation. 2018-03-01 08:21:53 -08:00
rht 4e0fc593cf docs: Remove u prefix from strings. 2018-02-05 12:11:33 -08:00
Tim Abbott 6f53d65e56 docs: Update a few broken links to the Git guide. 2017-11-23 16:24:00 -08:00
Tim Abbott 9074b9f2fa docs: Do a few more tweaks to the webhook walkthrough formatting. 2017-11-22 10:29:07 -08:00
derAnfaenger 73915a9631 docs: Move integration docs to /api. 2017-11-17 11:58:54 -08:00