-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added collapse and uncollapse methods to Message object #463
Conversation
""" | ||
|
||
data = {'id': self.name} | ||
url = 'https://api.reddit.com/api/collapse_message/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add these urls to the api paths config in the form seen there. Then you can replace these lines with url = self.reddit_session.config['collapse_message']
. Just make sure to keep them alphabetized.
Thanks for finding this! Should be a quick merge with just those few changes and flake8 fixes. Oh, also make sure to return the json response, even though it'll probably be an empty dictionary. |
It'd be awesome to have tests written for this that utilize the |
I can see what I can do, but I won't be able to do that right now. Also - any reason why it's failing the build tests? It's all running fine on my machine and I didn't change very much. |
It might be passing the betamax tests, but there are some flake8 formatting issues. It says here you've got a blank line with some whitespace characters in it, and it doesn't like your docstrings being split up the way they are. If you do |
If you open up the p27 test you'll see this information:
These checks are in place just to help keep things in a consistent manner. You can run those locally yourself via |
"meat" |
Just one last push, please (unless you want to then write tests afterwards). Can you move the collapse and uncollapse methods so they are below the underscore methods? Then, if you can make it so that uncollapse points to collapse in the same way that unhide points to hide and remove_editor uses add_editor, it would be more stylistically consistent. When you do this, you will need to remove the decorator from uncollapse or else it will fail. Finally, Great changes so far. |
Well this is trickier than I'd anticipated, but thanks for all of the help! |
Thanks for the PR. I'm going to squash up the commits and merge. |
Merged as 0181ac5. Thanks! |
These endpoints are currently undocumented, although I have made a PR to have reddit add documentation to their /dev/api page:
reddit-archive/reddit#1365