Skip to content

Commit f9d6c08

Browse files
akashaviatortimabbott
authored andcommitted
api: Implement POST /default_streams api endpoint.
1 parent ef730b2 commit f9d6c08

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

zulip/zulip/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,21 @@ def delete_stream(self, stream_id):
10961096
method='DELETE',
10971097
)
10981098

1099+
def add_default_stream(self, stream_id):
1100+
# type: (int) -> Dict[str, Any]
1101+
1102+
'''
1103+
Example usage:
1104+
1105+
>>> client.add_default_stream(5)
1106+
{'result': 'success', 'msg': ''}
1107+
'''
1108+
return self.call_endpoint(
1109+
url='default_streams',
1110+
method='POST',
1111+
request={'stream_id': stream_id},
1112+
)
1113+
10991114
def get_user_by_id(self, user_id, **request):
11001115
# type: (int, **Any) -> Dict[str, Any]
11011116

0 commit comments

Comments
 (0)