api: Add bindings for new get_presence endpoint.
MODIFY
setup.py
setup.py
@@ -46,6 +46,7 @@ package_info = dict(
["examples/zuliprc",
"examples/create-user",
"examples/edit-message",
+ "examples/get-presence",
"examples/get-public-streams",
"examples/list-members",
"examples/list-subscriptions",

MODIFY
zulip/__init__.py
zulip/__init__.py
@@ -599,6 +599,19 @@ class Client(object):
request=request,
)
+ def get_presence(self, email):
+ # type: (Dict[str, Any]) -> Dict[str, Any]
+ '''
+ Example usage:
+
+ >>> client.get_presence()
+ {'presence': {'website': {'timestamp': 1486799122, 'status': 'active'}}, 'result': 'success', 'msg': ''}
+ '''
+ return self.call_endpoint(
+ url='users/%s/presence' % (email,),
+ method='GET',
+ )
+
def get_streams(self, **request):
# type: (**Any) -> Dict[str, Any]
'''

api: Add bindings for new get_presence endpoint.