Skip to content

Commit

Permalink
API: Rename list_subscriptions to get_subscriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rht authored and timabbott committed Mar 11, 2021
1 parent 503e8ed commit 57e8886
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion zulip/integrations/bridge_with_irc/irc_mirror_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def connect(self, *args: Any, **kwargs: Any) -> None:
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)
Expand Down
2 changes: 1 addition & 1 deletion zulip/integrations/jabber/jabber_mirror_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def get_stream_infos(key: str, method: Callable[[], Dict[str, Any]]) -> Any:
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:
Expand Down
4 changes: 2 additions & 2 deletions zulip/zulip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,9 +1278,9 @@ def remove_alert_words(self, alert_words: List[str]) -> Dict[str, Any]:
}
)

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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ options = parser.parse_args()

client = zulip.init_from_options(options)

print(client.list_subscriptions())
print(client.get_subscriptions())

0 comments on commit 57e8886

Please sign in to comment.