I connected CosmoPulse to NASA’s APOD API!
This was one of the most exciting parts because the website is no longer just a design, it can now fetch real information from NASA.
I learned how API requests work using JavaScript’s fetch() function. The website sends a request to NASA, receives the data, converts it into a usable format, and displays the image, title, date, and explanation.
One challenge I faced was understanding promises and asynchronous code but after testing and debugging, I was able to successfully display NASA’s daily astronomy image.
I have also started working on the index.html file.
Comments 2
Woah cool. What kinds of images are you focusing on?
@soomit I am focusing on images of stars, planets, black holes, and galaxies.
Sign in to join the conversation.