api: Refactor get_user_by_id to take keyword arguments.

This refactors get_user_by_id to take arguments like
`include_custom_profile_fields = True` instead of
{include_custom_profile_fields: True}.
This commit is contained in:
Kartik Srivastava 2020-04-08 04:42:11 +05:30 committed by GitHub
parent d7c52c9a74
commit 8d7eb0fea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1055,13 +1055,13 @@ class Client(object):
method='DELETE', method='DELETE',
) )
def get_user_by_id(self, user_id, request=None): def get_user_by_id(self, user_id, **request):
# type: (int, Optional[Dict[str, Any]]) -> Dict[str, Any] # type: (int, **Any) -> Dict[str, Any]
''' '''
Example usage: Example usage:
>>> client.get_user_by_id(8, {'include_custom_profile_fields': True}) >>> client.get_user_by_id(8, include_custom_profile_fields=True)
{'result': 'success', 'msg': '', 'user': [{...}, {...}]} {'result': 'success', 'msg': '', 'user': [{...}, {...}]}
''' '''
return self.call_endpoint( return self.call_endpoint(