23 lines
		
	
	
	
		
			551 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			23 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))
 | 
