api: Implement PATCH /users/{user_id} endpoint.

This commit is contained in:
akashaviator 2020-04-01 20:25:51 +05:30 committed by Tim Abbott
parent ed706c24ce
commit 59b025d2e4

View file

@ -1110,6 +1110,25 @@ class Client(object):
method='DELETE',
)
def update_user_by_id(self, user_id, **request):
# type: (int, **Any) -> Dict[str, Any]
'''
Example usage:
>>> client.update_user_by_id(8, full_name="New Name")
{'result': 'success', 'msg': ''}
'''
for key, value in request.items():
request[key] = json.dumps(value)
return self.call_endpoint(
url='users/{}'.format(user_id),
method='PATCH',
request=request
)
def get_members(self, request=None):
# type: (Optional[Dict[str, Any]]) -> Dict[str, Any]
'''