zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
359 stars 361 forks source link

FEAT: add method to move topics between streams #620

Closed tmichela closed 4 years ago

tmichela commented 4 years ago

Move a topic from one stream to another,

Example usage:

>>> client.move_topic('stream_a', 'stream_b', 'my_topic')
{'result': 'success', 'msg': ''}
timabbott commented 4 years ago

@tmichela thanks for working on this! I posted a few comments. It'd also be great if you wrote a proper commit message; Check out the Zulip commit message guidelines for more details: https://zulip.readthedocs.io/en/latest/contributing/version-control.html#commit-messages.

@akashaviator can you do a review pass on this as well?

tmichela commented 4 years ago

@timabbott thanks for the review and suggestions!

I think I've addressed your comments.

I also changed/fixed:

timabbott commented 4 years ago

This is great, merged, thanks @tmichela!

Would you be up for submitting a PR to document this in the examples in https://zulip.com/api/update-message? I expect https://zulip.readthedocs.io/en/latest/documentation/api.html should cover the background you need; let me know if it's missing anything!

tmichela commented 4 years ago

Sure, I'll look into this.

Do you want me to simply update the python example code? It looks like this documentation reflects more of the direct restAPI call while this method wraps a few different calls to make it more convenient to use.

timabbott commented 4 years ago

Yeah, exactly; I'd just include it in the same block where we document the more messy/direct way to do it.