From 851eb1b3bbdeea9f4d5233fef655557b4d4cf2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Thu, 9 Aug 2018 20:17:51 +0200 Subject: [PATCH] api: Implement PATCH /user_groups/. --- zulip/zulip/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 72a38e8..553bd48 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1182,6 +1182,24 @@ class Client(object): request=group_data, ) + def update_user_group(self, group_data): + # type: (Dict[str, Any]) -> Dict[str, Any] + ''' + Example usage: + + >>> client.update_user_group({ + 'group_id': 1, + 'name': 'marketing', + 'description': "Members of ACME Corp.'s marketing team.", + }) + {'description': 'Description successfully updated.', 'name': 'Name successfully updated.', 'result': 'success', 'msg': ''} + ''' + return self.call_endpoint( + url='user_groups/{}'.format(group_data['group_id']), + method='PATCH', + request=group_data, + ) + def get_subscribers(self, **request): # type: (**Any) -> Dict[str, Any] '''