api: Add bindings for new get_presence endpoint.

This commit is contained in:
Tim Abbott 2017-02-10 23:46:38 -08:00
parent 9a8dc2661a
commit a87ae4b1c4
3 changed files with 58 additions and 0 deletions

View file

@ -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]
'''