python-zulip-api/zulip/zulip/examples/get-public-streams
rht 8a74f576a3 python: Remove per-file copyright notices.
These notices are redundant and obscure what are often very short
example scripts.
2020-03-23 12:52:52 -07:00

24 lines
551 B
Python
Executable file

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
usage = """get-public-streams [options]
Prints out all the public streams in the realm.
Example: get-public-streams
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.get_streams(include_public=True, include_subscribed=False))