Astronomy Picture of the Day

Log in to Vote
4
4 Votes • 6 Comments
Shows today's photo from APOD ( http://apod.nasa.gov/apod/astropix.html ). There's an RSS feed but no API. I'm happy to have a go at parsing the XML within spice.js but is there already the ability for DDG to handle RSS?
• posted 4 years and 9 months ago • type: Spice (API calls) Live

anonymous
We don't currently have any built-in functionality for parsing RSS (or any other XML), but I agree that it shouldn't be too bad to parse the feed. Please note that to take non-JSON input in a spice, use `spice wrap_string_callback => 1`. Let me know if you're still interested in writing this! I'm happy to answer any questions.
posted by [UserVoice Dylan Lloyd] • 4 years and 9 months ago Link
tagawa
Great, thanks for the clarification and wrap_string_callback tip.
I won't be able to start on this immediately but would like to make it at some point - I love APOD!
posted by tagawa Staff4 years and 9 months ago Link
tagawa
Just discovered someone's made a JSON API for the APOD RSS feed so this should be straightforward to make as a spice. I'll have a go...
posted by tagawa Staff2 years and 11 months ago Link
Moollaza
posted by Moollaza Staff2 years and 11 months ago Link
tagawa
Thank you! I was thinking of using the API to show the current picture of the day, perhaps with the previous days' pictures alongside. Also it would be good to trigger it with "apod" as well. I'm happy to send a PR if you like.
posted by tagawa Staff2 years and 11 months ago Link
Moollaza
Sure, feel free to make improvements and submit a PR :)
posted by Moollaza Staff2 years and 11 months ago Link