From 1df19c06654da539b446e69e875a0a4acf45c0d2 Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Thu, 27 Aug 2020 21:46:48 +0530 Subject: [PATCH] api: update_user_group_members should have a user_group_id parameter. This avoids weirdly passing an extra field in the request, and also makes the bindings better align with the API. --- zulip/zulip/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 97bedfc..b46a677 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1454,18 +1454,18 @@ class Client: method='DELETE', ) - def update_user_group_members(self, group_data: Dict[str, Any]) -> Dict[str, Any]: + def update_user_group_members(self, user_group_id: int, group_data: Dict[str, Any]) -> Dict[str, Any]: ''' Example usage: - >>> client.update_user_group_members({ - 'delete': [4, 8, 15], - 'add': [16, 23, 42], + >>> client.update_user_group_members(1, { + 'delete': [8, 10], + 'add': [11], }) {'msg': '', 'result': 'success'} ''' return self.call_endpoint( - url='user_groups/{}/members'.format(group_data['group_id']), + url='user_groups/{}/members'.format(user_group_id), method='POST', request=group_data, )