From 0ca25af06e15ef00909a5436f6a1e5f63a354785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Wed, 8 Aug 2018 14:02:47 +0200 Subject: [PATCH] api: Implement POST /user_groups/create. --- zulip/zulip/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 4401f1a..a2a2088 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1054,6 +1054,23 @@ class Client(object): method='GET' ) + def create_user_group(self, group_data): + # type: (Dict[str, Any]) -> Dict[str, Any] + ''' + Example usage: + >>> client.create_user_group({ + 'name': 'marketing', + 'description': "Members of ACME Corp.'s marketing team.", + 'members': [4, 8, 15, 16, 23, 42], + }) + {'msg': '', 'result': 'success'} + ''' + return self.call_endpoint( + url='user_groups/create', + method='POST', + request=group_data, + ) + def get_subscribers(self, **request): # type: (**Any) -> Dict[str, Any] '''