From ef730b2c1bea4c377b215f7beb56889c02cb0f08 Mon Sep 17 00:00:00 2001 From: akashaviator Date: Thu, 12 Mar 2020 01:26:37 +0530 Subject: [PATCH] api: Implement GET /messages/matches_narrow endpoint. --- zulip/zulip/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index c646104..ecb08a2 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -685,6 +685,23 @@ class Client: request=message_filters ) + def check_messages_match_narrow(self, **request): + # type: (Dict[str, Any]) -> Dict[str, Any] + + ''' + Example usage: + + >>> client.check_messages_match_narrow(msg_ids=[11, 12], + narrow=[{'operator': 'has', 'operand': 'link'}] + ) + {'result': 'success', 'msg': '', 'messages': [{...}, {...}]} + ''' + return self.call_endpoint( + url='messages/matches_narrow', + method='GET', + request=request + ) + def get_raw_message(self, message_id): # type: (int) -> Dict[str, str] '''