mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 18:13:58 +00:00
openapi/python_examples: Update examples for add/remove subscriptions.
This updates the examples to use user ids to add or remove subscriptions from a stream.
This commit is contained in:
committed by
Tim Abbott
parent
bd943941e4
commit
5cb1edcadc
@@ -66,11 +66,12 @@ def add_subscriptions(client: Client) -> None:
|
||||
# {code_example|start}
|
||||
# To subscribe another user to a stream, you may pass in
|
||||
# the `principals` argument, like so:
|
||||
user_id = 25
|
||||
result = client.add_subscriptions(
|
||||
streams=[
|
||||
{'name': 'new stream', 'description': 'New stream for testing'}
|
||||
],
|
||||
principals=['newbie@zulip.com']
|
||||
principals=[user_id]
|
||||
)
|
||||
# {code_example|end}
|
||||
assert result['result'] == 'success'
|
||||
|
||||
Reference in New Issue
Block a user