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:
Kartik Srivastava
2020-06-05 20:30:05 +05:30
committed by Tim Abbott
parent bd943941e4
commit 5cb1edcadc

View File

@@ -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'