From 868ce8f225b82f628c48284ac91feb4c2c6a48cc Mon Sep 17 00:00:00 2001 From: rsashank Date: Sat, 16 Dec 2023 06:08:44 +0530 Subject: [PATCH] api: Add get_stream_email_address(). --- zulip/zulip/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index e868e6bf2..85e84f7a2 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1488,6 +1488,15 @@ def get_stream_topics(self, stream_id: int) -> Dict[str, Any]: """ return self.call_endpoint(url=f"users/me/{stream_id}/topics", method="GET") + def get_stream_email_address(self, stream_id: int) -> Dict[str, Any]: + """ + Example usage: + + >>> client.get_stream_email_address(stream_id=1) + {'result': 'success', 'msg': '', 'email': 'username@example.com'} + """ + return self.call_endpoint(url=f"streams/{stream_id}/email_address", method="GET") + def get_user_groups(self) -> Dict[str, Any]: """ Example usage: