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

APOD api suggestion: add ability to return images based on a number or date range #44

Closed
AdamMurray opened this issue Jun 5, 2015 · 8 comments

Comments

@AdamMurray
Copy link

I'm thinking of something like:

https://api.nasa.gov/planetary/apod?count=10&api_key=DEMO_KEY

to return the 10 most recent images. Or:

https://api.nasa.gov/planetary/apod?startDate=2015-04-27&endDate=2015-01-01&api_key=DEMO_KEY

to return images between the start and end dates.

@benjaminboruff
Copy link

+1
I like this idea. The start and end dates would probably suffice. I was going to write a frontend app to craft the appropriate number of requests based on user input, but that would mean a lot of requests - those are expensive in terms of time to get the data (and subtract a lot from the hourly rate limit for your api_key), then process the data and request the images, etc.... So instead of 10 data requests/responses, there would only be one data request/response. (The JSON response would be an array of 10 objects, or however many requested. ) Would that ease the API endpoint server's network load? Or increase the load on the DB? It may be a wash.

@gdomingu
Copy link

+1

2 similar comments
@MichalPaszkiewicz
Copy link

+1

@brianthomas
Copy link
Member

+1

@joshuatbrown
Copy link

Yes please! 👍

@suemareverton
Copy link

+1

@martinsuchan
Copy link

I like this idea. It might be sufficient to add endpoint for returning all images published in the target month, somethng like:
https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&month=2015-04

@jnbetancourt
Copy link
Contributor

The latest release of the apod api includes the ability to specify a date range. The details are in the README at: https://github.com/nasa/apod-api

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

No branches or pull requests

9 participants