From 6dd52439bfb2f9231abd74a0782e2740448f1191 Mon Sep 17 00:00:00 2001 From: Kartik Srivastava Date: Wed, 8 Apr 2020 04:42:59 +0530 Subject: [PATCH] api: Implement DELETE /users/{user_id} api endpoint. --- zulip/zulip/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index fb3303e..04fe078 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1070,6 +1070,20 @@ class Client(object): request=request, ) + def deactivate_user_by_id(self, user_id): + # type: (int) -> Dict[str, Any] + + ''' + Example usage: + + >>> client.deactivate_user_by_id(8) + {'result': 'success', 'msg': ''} + ''' + return self.call_endpoint( + url='users/{}'.format(user_id), + method='DELETE', + ) + def get_members(self, request=None): # type: (Optional[Dict[str, Any]]) -> Dict[str, Any] '''