From 8b0fa6bfee1b7f8185f98ac38ccf5fd85d744d7a Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Wed, 8 Apr 2020 05:14:49 +0530 Subject: [PATCH] api: Implement GET /attachments endpoint. --- zulip/zulip/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 04fe078..3483aab 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -717,6 +717,19 @@ class Client(object): files=[file] ) + def get_attachments(self): + # type: () -> Dict[str, Any] + ''' + Example usage: + + >>> client.get_attachments() + {'result': 'success', 'msg': '', 'attachments': [{...}, {...}]} + ''' + return self.call_endpoint( + url='attachments', + method='GET' + ) + def update_message(self, message_data): # type: (Dict[str, Any]) -> Dict[str, Any] '''