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

Request: sol manifest for mission #25

Closed open768 closed 7 years ago

open768 commented 8 years ago

not all sols have photos. In this api it would be useful to have an API that returns the list of valid sols for the mission eg

https://mars-photos.herokuapp.com/api/v1/rovers/curiosity/manifest

and be able to filter the list by instrument

https://mars-photos.herokuapp.com/api/v1/rovers/curiosity/manifest?camera=fhaz

this should return a full list of sols like that at http://mars.jpl.nasa.gov/msl-raw-images/image/image_manifest.json

ie (depending on instrument) { "sol": 0, "num_images": 3720, "last_updated": "2014-08-13T22:27:14Z" }, { "sol": 1, "num_images": 20, "last_updated": "2012-10-01T20:49:14Z" },

this feature would allow sites using the api to prepopulate drop down lists indicating which sols have data available.

this feature should not be limited to 25 rows, as it would cause excessive traffic to your site with repeated requests to the api. Rather it would be preferrable to cache the resultset from the database to disk for a period of time (I would suggest 1 hour) and return the cached data instead of hitting your database.

corincerami commented 7 years ago

This is begun with #29. It doesn't accept any query parameters yet, but it gives the basic information this issue is looking for.

corincerami commented 7 years ago

30 Moves the manifest to its own route, so as not to overload the standard Rover serialization.

corincerami commented 7 years ago

I think as of #33 this can be closed.