corincerami / mars-photo-api

A Rails API for photo data from NASA's Mars Rovers
https://api.nasa.gov/#MarsPhotos
GNU General Public License v3.0
352 stars 48 forks source link

Bring back pagination #46

Closed armadsen closed 7 years ago

armadsen commented 7 years ago

I note that pagination was removed (see #35). I understand the reason for removing it, but would like to request that it be brought back and made optional. My reasoning is that for sols with a large number of photos, requesting, receiving, and parsing the whole list of photo info takes a long time. I'm building a mobile app where that delay means staring at a blank page for a while, and where it would make a lot of sense to paginate the data anyway, since the UI displays a scrollable view with a relatively small number of photos on screen at one time.

Perhaps including the page= query parameter could turn on paging, but if its left out, the default is to return all photos?

corincerami commented 7 years ago

I'll look into this when I get a chance. Seems like a reasonable idea.

krtkush commented 7 years ago

I second this. Pagination can be really useful in certain cases.

AndreaMiotto commented 7 years ago

Yup please, bring back pagination. Or at least a "random query" that returns some random images between all the sol