Open Pradhvan opened 4 years ago
@akashaviator can you review this?
Go for it!
On Wed, Oct 21, 2020 at 9:43 PM Pradhvan Bisht notifications@github.com wrote:
@Pradhvan commented on this pull request.
In zulip/zulip/examples/delete-topic https://github.com/zulip/python-zulip-api/pull/603#discussion_r509876162 :
+import argparse +import zulip + + +usage = """delete-topic <stream_id/stream_name, topic_name> + +Example: delete-topic 1 "Denmark1" or "Denmark" "Denmark1" +""" + +parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage)) +parser.add_argument('stream_id') +parser.add_argument('topic_name', type=str) +options = parser.parse_args() + +client = zulip.init_from_options(options) +if (type(options.stream_id) == str):
Since it's not merged, I can take this up again. @akashaviator https://github.com/akashaviator
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zulip/python-zulip-api/pull/603#discussion_r509876162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU6NWQS6R24O5DEEW73MZLSL6Z7PANCNFSM4OA2T2QA .
I think this deserves some extra testings to get merged.
Adds a method delete_topic which calls the url '/streams/stream_id/delete_topic ' with topic_name passed as data
Closes https://github.com/zulip/python-zulip-api/issues/534