api: Implement POST /default_streams api endpoint.

This commit is contained in:
Kartik Srivastava 2020-04-12 02:20:39 +05:30 committed by Tim Abbott
parent ef730b2c1b
commit f9d6c085a1

View file

@ -1096,6 +1096,21 @@ class Client:
method='DELETE', 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): def get_user_by_id(self, user_id, **request):
# type: (int, **Any) -> Dict[str, Any] # type: (int, **Any) -> Dict[str, Any]