python-zulip-api/zulip/zulip/examples/list-subscriptions
Anders Kaseorg e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00

22 lines
451 B
Python
Executable file

#!/usr/bin/env python3
import argparse
usage = """list-subscriptions [options]
Prints out a list of the user's subscriptions.
Example: list-subscriptions
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
"""
import zulip
parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage))
options = parser.parse_args()
client = zulip.init_from_options(options)
print(client.list_subscriptions())