api: Implement DELETE /streams/<stream_id>.
MODIFY
zulip/zulip/__init__.py
zulip/zulip/__init__.py
@@ -1043,6 +1043,16 @@ class Client(object):
request=stream_data,
)
+ def delete_stream(self, stream_id):
+ # type: (int) -> Dict[str, Any]
+ '''
+ See examples/delete-stream for example usage.
+ '''
+ return self.call_endpoint(
+ url='streams/{}'.format(stream_id),
+ method='DELETE',
+ )
+
def get_members(self, request=None):
# type: (Optional[Dict[str, Any]]) -> Dict[str, Any]
'''

ADD
zulip/zulip/examples/delete-stream
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import argparse
+
+import zulip
+
+usage = """delete-stream <stream_id>
+
+Example: delete-stream 42
+"""
+
+
+parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage))
+parser.add_argument('stream_id', type=int)
+options = parser.parse_args()
+
+client = zulip.init_from_options(options)
+
+print(client.delete_stream(options.stream_id))

api: Implement DELETE /streams/<stream_id>.