api_docs: Add documentation for update_stream.

This commit is contained in:
sameerchoubey
2019-06-23 18:08:28 +05:30
committed by Tim Abbott
parent 0ceea2713c
commit f84e84d6c7
4 changed files with 133 additions and 2 deletions

View File

@@ -261,14 +261,19 @@ def get_streams(client):
def update_stream(client, stream_id):
# type: (Client, int) -> None
# {code_example|start}
# Update the stream by a given ID
request = {
'stream_id': stream_id,
'content': 'Venice is the capital of Italy',
'subject': 'Italy'
'is_announcement_only': True,
'is_private': True,
}
result = client.update_stream(request)
# {code_example|end}
validate_against_openapi_schema(result, '/streams/{stream_id}', 'patch', '200')
assert result['result'] == 'success'
def get_user_groups(client):