api docs: Explain clearly how to create new streams.

Tweaked significantly by tabbott to cover this more clearly.
This commit is contained in:
Yago González 2018-06-26 21:33:13 +02:00 committed by Tim Abbott
parent 3f40240017
commit bba8b88707
4 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,10 @@ Subscribe one or more users to one or more streams.
`POST {{ api_url }}/v1/users/me/subcriptions` `POST {{ api_url }}/v1/users/me/subcriptions`
If any of the specified streams do not exist, they are automatically
created, and configured using the `invite_only` setting specified in
the arguments (see below).
## Usage examples ## Usage examples
<div class="code-section" markdown="1"> <div class="code-section" markdown="1">
<ul class="nav"> <ul class="nav">

View File

@ -216,7 +216,7 @@
}, },
{ {
"argument": "invite_only", "argument": "invite_only",
"description": "A boolean specifying whether the streams specified in `subscriptions` are private or not. Default is `False`.", "description": "A boolean specifying whether any streams created by this request should be created as private streams. Default is `False`.",
"required": false, "required": false,
"example": "`True` or `False`" "example": "`True` or `False`"
}, },

View File

@ -0,0 +1,7 @@
# Create a stream
You can create a stream using Zulip's REST API by submitting a
[subscribe](/api/add-subscriptions) request with a stream name that
doesn't yet exist. You can specify the initial configuration of the
stream using the `invite_only` and `announce` arguments to that
request.

View File

@ -13,6 +13,7 @@
* [Add subscriptions](/api/add-subscriptions) * [Add subscriptions](/api/add-subscriptions)
* [Remove subscriptions](/api/remove-subscriptions) * [Remove subscriptions](/api/remove-subscriptions)
* [Get topics in a stream](/api/get-stream-topics) * [Get topics in a stream](/api/get-stream-topics)
* [Create a stream](/api/create-stream)
#### Users #### Users