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

End points where {id} isn't the last element doesn't work with the ids keyword #18

Closed
AWegnerGitHub opened this issue Mar 7, 2016 · 1 comment
Labels
Milestone

Comments

@AWegnerGitHub
Copy link
Owner

StackAPI currently makes the, incorrect, assumption that if you are passing something via ids, it is the last element in the end point. This is not the case in many end points.

As an example, you can pass ids to /answers/{ids}/comments.

There are also end points that accept a single id, that would fail as currently implemented. An example of this is /posts/{id}/comments/render

@AWegnerGitHub
Copy link
Owner Author

Potential Idea:

User needs to pass something like: answers/{}/comments as the first parameter to fetch and then a list of items to the ids parameter.

If there isn't a parameter passed with a list, an error needs to be thrown.

If the end point is answers, then the list from ids is tacked onto the end (as it does currently)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant