Astronomy Picture of the Day from NASA with discriptions.
Live Project at: https://brettcrafton.com/Portfolio/NASA%20API/index.html
Tech used: HTML, CSS, JavaScript
Utilized the NASA API: https://github.com/nasa/apod-api
!! If forking this repo, be sure to get your own API key here! https://api.nasa.gov/ !!
API fetch requests to NASA on request. Uses date input box for user to select date if they want to search instead of use today's date. Adds that date to the end of the fetch url to pull that specific date. Uses dot notation to pull specific data from object to push to the DOM. Conditional statements to determine media type for proper display.
Just a couple redundancies that could be condensed. Could move everything into object to get data off global object (OOP). As it is currently coded, their isn't really any responsiveness coded in, however I don't feel with this type of data any additional responsiveness is needed. The pictures are best viewed in their full size as to get a feel of the grand scope and detail.
Honed more in fetch requests. Different ways to implement media types. Implementing a looped video as a background. Use of the "date" input element.
Get NASA's Astronomy Picture of the Day for today by clicking "Today's Date", or search by date by clicking "Get Picture".
Works with different data formats within the API. Image, video, etc.
Includes brief discription of image and includes date at top of site.
*hidden BTTF references.
You Can't Afford Rent: https://github.com/BrettCrafton/You-Cant-Afford-Rent
Cocktail Recipes: https://github.com/BrettCrafton/Cocktail-Recipes
Rick and Morty Parasite Detector: https://github.com/BrettCrafton/Rick-and-Morty-Parasite-Detector
Magical World of Harry Potter: https://github.com/BrettCrafton/Magical-World-of-Harry-Potter