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