From 4ab53c9073dfb09e4470f0158fe171ece6930ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Sat, 11 Aug 2018 13:41:46 +0200 Subject: [PATCH] api: Implement POST /mark_stream_as_read. --- zulip/zulip/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 1f1e6fb..04fa30f 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -776,6 +776,20 @@ class Client(object): method='POST', ) + def mark_stream_as_read(self, stream_id): + # type: (int) -> Dict[str, Any] + ''' + Example usage: + + >>> client.mark_stream_as_read(42) + {'result': 'success', 'msg': ''} + ''' + return self.call_endpoint( + url='mark_stream_as_read', + method='POST', + request={'stream_id': stream_id}, + ) + def get_message_history(self, message_id): # type: (int) -> Dict[str, Any] '''