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

Endpoint request: photos by ids #233

Open
AAverin opened this issue Apr 25, 2017 · 0 comments
Open

Endpoint request: photos by ids #233

AAverin opened this issue Apr 25, 2017 · 0 comments

Comments

@AAverin
Copy link

AAverin commented Apr 25, 2017

Hi guys.
In my app that uses 500px API I have a "local favorites" feature – people can mark any picture favorite, then I cache photoId.
The tricky part comes when I need to display user's favorites.
For every photoId I have to make a network request to https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id.md
It's not only difficult to implement, although I managed, It also results in a significant number of network requests sent by the app.
In API terms it says that we shouldn't use unreasonable amount of bandwidth. This kind of bandwidth looks pretty unreasonable to me.

Would it be possible to have a new endpoint in the API?
GET_photos_ids, that would accept list of photo ids, separated via ,, and return back the same response https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_search.md is returning, but with photos, listed in the query parameter.

I don't know technical details on your side, but it looks like a single database query that should be much faster then doing 10 separate queries for every request.
With such endpoint my app will generate much less requests then it does now.

Thanks

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

No branches or pull requests

1 participant