From 57e8886dfee19cdc71e8eb35df6afb80e2676360 Mon Sep 17 00:00:00 2001 From: rht Date: Tue, 9 Mar 2021 23:16:47 -0500 Subject: [PATCH] API: Rename list_subscriptions to get_subscriptions. --- zulip/integrations/bridge_with_irc/irc_mirror_backend.py | 2 +- zulip/integrations/jabber/jabber_mirror_backend.py | 2 +- zulip/zulip/__init__.py | 4 ++-- .../zulip/examples/{list-subscriptions => get-subscriptions} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename zulip/zulip/examples/{list-subscriptions => get-subscriptions} (92%) diff --git a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py index 7726dc6..9d8ca8f 100644 --- a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py +++ b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py @@ -36,7 +36,7 @@ class IRCBot(irc.bot.SingleServerIRCBot): print("Listening now. Please send an IRC message to verify operation") def check_subscription_or_die(self) -> None: - resp = self.zulip_client.list_subscriptions() + resp = self.zulip_client.get_subscriptions() if resp["result"] != "success": print("ERROR: %s" % (resp["msg"],)) exit(1) diff --git a/zulip/integrations/jabber/jabber_mirror_backend.py b/zulip/integrations/jabber/jabber_mirror_backend.py index c93ccab..93a1cc7 100755 --- a/zulip/integrations/jabber/jabber_mirror_backend.py +++ b/zulip/integrations/jabber/jabber_mirror_backend.py @@ -275,7 +275,7 @@ def get_rooms(zulipToJabber: ZulipToJabberBot) -> List[str]: if options.mode == 'public': stream_infos = get_stream_infos("streams", zulipToJabber.client.get_streams) else: - stream_infos = get_stream_infos("subscriptions", zulipToJabber.client.list_subscriptions) + stream_infos = get_stream_infos("subscriptions", zulipToJabber.client.get_subscriptions) rooms = [] # type: List[str] for stream_info in stream_infos: diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 343bbcc..9e63681 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1278,9 +1278,9 @@ class Client: } ) - def list_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: + def get_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: ''' - See examples/list-subscriptions for example usage. + See examples/get-subscriptions for example usage. ''' return self.call_endpoint( url='users/me/subscriptions', diff --git a/zulip/zulip/examples/list-subscriptions b/zulip/zulip/examples/get-subscriptions similarity index 92% rename from zulip/zulip/examples/list-subscriptions rename to zulip/zulip/examples/get-subscriptions index a32d2b8..1c7aa04 100755 --- a/zulip/zulip/examples/list-subscriptions +++ b/zulip/zulip/examples/get-subscriptions @@ -18,4 +18,4 @@ options = parser.parse_args() client = zulip.init_from_options(options) -print(client.list_subscriptions()) +print(client.get_subscriptions())