From c480657952d0c3864ad85e525b29d772503533d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Tue, 14 Aug 2018 13:46:29 +0200 Subject: [PATCH] api: Implement POST /user_groups//members. --- zulip/zulip/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 62f6b45..7b5d00f 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1213,6 +1213,23 @@ class Client(object): method='DELETE', ) + def update_user_group_members(self, group_data): + # type: (Dict[str, Any]) -> Dict[str, Any] + ''' + Example usage: + + >>> client.update_user_group_members({ + 'delete': [4, 8, 15], + 'add': [16, 23, 42], + }) + {'msg': '', 'result': 'success'} + ''' + return self.call_endpoint( + url='user_groups/{}/members'.format(group_data['group_id']), + method='POST', + request=group_data, + ) + def get_subscribers(self, **request): # type: (**Any) -> Dict[str, Any] '''