From 2f463e2a88b3b65b5aca11fce8c725ff91d2cbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Tue, 7 Aug 2018 15:43:58 +0200 Subject: [PATCH] api: Implement POST /users/me/presence. --- zulip/zulip/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 49eb44a..4401f1a 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -865,6 +865,24 @@ class Client(object): method='GET', ) + def update_presence(self, request): + # type: (Dict[str, Any]) -> Dict[str, Any] + ''' + Example usage: + + >>> client.update_presence({ + status='active', + ping_only=False, + new_user_input=False, + }) + {'result': 'success', 'server_timestamp': 1333649180.7073195, 'presences': {'iago@zulip.com': { ... }}, 'msg': ''} + ''' + return self.call_endpoint( + url='users/me/presence', + method='POST', + request=request, + ) + def get_streams(self, **request): # type: (**Any) -> Dict[str, Any] '''