From 22392779a35e61493521462025b54d510f62e18c Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Wed, 27 May 2020 22:35:51 +0530 Subject: [PATCH] api: Implement POST /realm/profile_fields endpoint. --- zulip/zulip/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 405d5a6..8a57a55 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -919,6 +919,19 @@ class Client: method='GET', ) + def create_realm_profile_field(self, **request: Any) -> Dict[str, Any]: + ''' + Example usage: + + >>> client.create_realm_profile_field(name='Phone', hint='Contact No.', field_type=1) + {'result': 'success', 'msg': '', 'id': 9} + ''' + return self.call_endpoint( + url='realm/profile_fields', + method='POST', + request=request, + ) + def get_server_settings(self) -> Dict[str, Any]: ''' Example usage: