mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 18:43:52 +00:00
docs: Make add-subscriptions use curl example system.
This commit is contained in:
@@ -52,21 +52,12 @@ zulip(config).then((client) => {
|
|||||||
|
|
||||||
{tab|curl}
|
{tab|curl}
|
||||||
|
|
||||||
``` curl
|
{generate_code_example(curl, include=["subscriptions"])|/users/me/subscriptions:post|example}
|
||||||
curl -X POST {{ api_url }}/v1/users/me/subscriptions \
|
|
||||||
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
|
|
||||||
-d 'subscriptions=[{"name": "Verona"}]'
|
|
||||||
```
|
|
||||||
|
|
||||||
To subscribe another user to a stream, you may pass in
|
To subscribe another user to a stream, you may pass in
|
||||||
the `principals` argument, like so:
|
the `principals` argument, like so:
|
||||||
|
|
||||||
``` curl
|
{generate_code_example(curl, include=["subscriptions", "principals"])|/users/me/subscriptions:post|example}
|
||||||
curl -X POST {{ api_url }}/v1/users/me/subscriptions \
|
|
||||||
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
|
|
||||||
-d 'subscriptions=[{"name": "Verona"}]' \
|
|
||||||
-d 'principals=["ZOE@zulip.com"]'
|
|
||||||
```
|
|
||||||
|
|
||||||
{end_tabs}
|
{end_tabs}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user