From 8d7eb0fea3c49bbd91c4eb950f2767069c3b27e7 Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Wed, 8 Apr 2020 04:42:11 +0530 Subject: [PATCH] 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}. --- zulip/zulip/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 99a7c8d..fb3303e 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1055,13 +1055,13 @@ class Client(object): method='DELETE', ) - def get_user_by_id(self, user_id, request=None): - # type: (int, Optional[Dict[str, Any]]) -> Dict[str, Any] + def get_user_by_id(self, user_id, **request): + # type: (int, **Any) -> Dict[str, Any] ''' 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': [{...}, {...}]} ''' return self.call_endpoint(