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
346 stars 46 forks source link

Please add limit for rows retrieved and order to earth dat #108

Closed eleonoraortega closed 4 years ago

eleonoraortega commented 4 years ago

Hi, I just want to retrieve a limit of pictures and order by date asc. Could you please add it to the specification? I would like to contribute but It'll take longer amount of time. Thank you very much if you can do it and thank you anyways if you are busy with other stuffs.

Best.

corincerami commented 4 years ago

Hi @eleonoraortega, I'm not sure what you're asking for. What set of data are you trying to limit/order? Ordering by Earth date doesn't really make any sense, as the API returns photos for a single sol/Earth date at a time. As for limiting, you can add a page and per_page parameter to your requests in order to limit how many photos will be returned. So for example, page=1&per_page=10 will give you the first 10 photos for that day.