From f9d6c085a1cfad505fb1582fc0584fda8083b4f8 Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Sun, 12 Apr 2020 02:20:39 +0530 Subject: [PATCH] api: Implement POST /default_streams api endpoint. --- zulip/zulip/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index ecb08a2..d8469cd 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1096,6 +1096,21 @@ class Client: method='DELETE', ) + def add_default_stream(self, stream_id): + # type: (int) -> Dict[str, Any] + + ''' + Example usage: + + >>> client.add_default_stream(5) + {'result': 'success', 'msg': ''} + ''' + return self.call_endpoint( + url='default_streams', + method='POST', + request={'stream_id': stream_id}, + ) + def get_user_by_id(self, user_id, **request): # type: (int, **Any) -> Dict[str, Any]