Skip to content
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

Return full response body when fetching categories #221

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

mikepack
Copy link
Contributor

This is not a fully flushed out PR but enough to get a conversation going around the neglected metadata when fetching categories.

Essentially, I'm trying to access metadata on category response, not just the categories/topics within. Specifically, can_create_topic and other permissions, eg:

This would be breaking, of course, but I'm not sure how to accomplish it otherwise. Once we align on direction, I can flush out the remainder and specs.

@eviltrout
Copy link
Contributor

I am definitely not a fan of a breaking change here. I'd recommend we create new methods that return the extra attributes.

@mikepack
Copy link
Contributor Author

mikepack commented Feb 18, 2021

What are your thoughts on appending _all or _full to the new method names, eg categories_all, category_latest_topics_all, etc?

@eviltrout
Copy link
Contributor

I think _full would be fine.

@mikepack
Copy link
Contributor Author

This should be ready for review. The same can likely be done in topics.rb (and maybe others) but I decided I wouldn't overload this PR.

Copy link
Member

@oblakeerickson oblakeerickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@oblakeerickson oblakeerickson merged commit cd6df08 into discourse:master Feb 19, 2021
Carmer pushed a commit to vangst/discourse_api that referenced this pull request Apr 9, 2021
Carmer pushed a commit to vangst/discourse_api that referenced this pull request Apr 9, 2021
Carmer pushed a commit to vangst/discourse_api that referenced this pull request Apr 9, 2021
Carmer pushed a commit to vangst/discourse_api that referenced this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants