python-zulip-api/zulip/zulip/examples/get-stream-topics
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

19 lines
416 B
Python
Executable file

#!/usr/bin/env python3
import argparse
usage = """get-stream-topics --stream-id=<stream-id> [options]
Get all the topics for a specific stream.
"""
import zulip
parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage))
parser.add_argument('--stream-id', required=True)
options = parser.parse_args()
client = zulip.init_from_options(options)
print(client.get_stream_topics(options.stream_id))