mirror of https://github.com/zulip/zulip.git
docs: Improve consistency and quality of API Documentation.
This commit is contained in:
parent
d6a38901ae
commit
9284d32837
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
Integrations are one of the most important parts of a group chat tool
|
Integrations are one of the most important parts of a group chat tool
|
||||||
like Zulip, and we are committed to making integrating with Zulip and
|
like Zulip, and we are committed to making integrating with Zulip and
|
||||||
getting you integration merged upstream so everyone else can benefit
|
getting your integration merged upstream so that everyone else can benefit
|
||||||
from it as easy as possible while maintaining the high quality of the
|
from it, as easy as possible while maintaining the high quality of the
|
||||||
Zulip integrations library.
|
Zulip integrations library.
|
||||||
|
|
||||||
On this page you'll find:
|
On this page you'll find:
|
||||||
|
@ -37,8 +37,8 @@ products, ordered here by which types we prefer to write:
|
||||||
content to a particular URI on our site with data about the event.
|
content to a particular URI on our site with data about the event.
|
||||||
For these, you usually just need to create a new python package in
|
For these, you usually just need to create a new python package in
|
||||||
the `zerver/webhooks/` directory. You can easily find recent
|
the `zerver/webhooks/` directory. You can easily find recent
|
||||||
commits adding new integrations to crib from via `git log
|
commits adding new integrations to crib from via
|
||||||
zerver/webhooks/`.
|
`git log zerver/webhooks/`.
|
||||||
|
|
||||||
2. **[Python script integrations](#python-script-and-plugin-integrations)**
|
2. **[Python script integrations](#python-script-and-plugin-integrations)**
|
||||||
(examples: SVN, Git), where we can get the service to call our integration
|
(examples: SVN, Git), where we can get the service to call our integration
|
||||||
|
@ -125,13 +125,12 @@ For a quick guide, read on.
|
||||||
without ever needing to post directly from the service you're
|
without ever needing to post directly from the service you're
|
||||||
integrating with to your Zulip development machine. You can run
|
integrating with to your Zulip development machine. You can run
|
||||||
just the tests for one integration like this:
|
just the tests for one integration like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
test-backend zerver/webhooks/pagerduty/
|
test-backend zerver/webhooks/pagerduty/
|
||||||
```
|
```
|
||||||
|
|
||||||
See [this guide](https://zulip.readthedocs.io/en/latest/testing/testing.html)
|
*Hint: See [this guide](https://zulip.readthedocs.io/en/latest/testing/testing.html)
|
||||||
for more details on the Zulip test runner.
|
for more details on the Zulip test runner.*
|
||||||
|
|
||||||
* Once you've gotten your webhook working and passing a test, capture
|
* Once you've gotten your webhook working and passing a test, capture
|
||||||
payloads for the other common types of posts the service's webhook
|
payloads for the other common types of posts the service's webhook
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Interactive bots
|
# Interactive bots
|
||||||
|
|
||||||
Zulip's API has a powerful framework for interactive bots that react
|
Zulip's API has a powerful framework for interactive bots that react
|
||||||
the messages in Zulip. This page documents how to run a bot
|
to messages in Zulip. This page documents how to run a bot
|
||||||
implemented using that framework, both on your laptop for quick
|
implemented using that framework, both on your laptop for quick
|
||||||
testing as well in a production server environment.
|
testing as well in a production server environment.
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Webhook walkthrough
|
# Webhook walkthrough
|
||||||
|
|
||||||
Below explains each part of a simple webhook integration, called **Hello
|
Below, we explain each part of a simple webhook integration, called
|
||||||
World**. This webhook sends a "hello" message to the `test` stream and includes
|
**Hello World**. This webhook sends a "hello" message to the `test`
|
||||||
a link to the Wikipedia article of the day, which it formats from json data it
|
stream and includes a link to the Wikipedia article of the day, which
|
||||||
receives in the http request.
|
it formats from json data it receives in the http request.
|
||||||
|
|
||||||
Use this walkthrough to learn how to write your first webhook
|
Use this walkthrough to learn how to write your first webhook
|
||||||
integration.
|
integration.
|
||||||
|
@ -47,8 +47,8 @@ some other kind of data. See [Step 4: Create tests](#step-4-create-tests) or
|
||||||
In the `zerver/webhooks/` directory, create new subdirectory that will
|
In the `zerver/webhooks/` directory, create new subdirectory that will
|
||||||
contain all of corresponding code. In our example it will be
|
contain all of corresponding code. In our example it will be
|
||||||
`helloworld`. The new directory will be a python package, so you have
|
`helloworld`. The new directory will be a python package, so you have
|
||||||
to create an empty `__init__.py` file in that directory via e.g. `touch
|
to create an empty `__init__.py` file in that directory via e.g.
|
||||||
zerver/webhooks/helloworld/__init__.py`.
|
`touch zerver/webhooks/helloworld/__init__.py`.
|
||||||
|
|
||||||
## Step 2: Create main webhook code
|
## Step 2: Create main webhook code
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,8 @@ third-party service.
|
||||||
* **Interactive bots**, for when you want the tool to react to
|
* **Interactive bots**, for when you want the tool to react to
|
||||||
messages in Zulip.
|
messages in Zulip.
|
||||||
|
|
||||||
* This guide is about writing and testing interactive bots. We assume
|
This guide is about writing and testing interactive bots. We assume
|
||||||
familiarity with our
|
familiarity with our [guide for running bots](running-bots).
|
||||||
[guide for running bots](running-bots).
|
|
||||||
|
|
||||||
On this page you'll find:
|
On this page you'll find:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue