python-zulip-api icon indicating copy to clipboard operation
python-zulip-api copied to clipboard

zulip/__init__.py: Adds delete_topic method

Open Pradhvan opened this issue 5 years ago • 3 comments

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

Pradhvan avatar Jun 17 '20 17:06 Pradhvan

@akashaviator can you review this?

timabbott avatar Jun 22 '20 20:06 timabbott

Go for it!

On Wed, Oct 21, 2020 at 9:43 PM Pradhvan Bisht [email protected] 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 .

timabbott avatar Nov 04 '20 00:11 timabbott

I think this deserves some extra testings to get merged.

PIG208 avatar Jun 14 '21 16:06 PIG208