melissa-asiamah / simple-nasa-api-bootcamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple NASA API App

This is a small app that returns the picture of the day from NASA's website when a date is entered in. It utilizes NASA's API.

alt tag

How It's Made:

Tech used: HTML, CSS, JavaScript, API

I made this by finding NASA's API link and adding an API key to it to access it and it's specific parameters to get the picture of the day. I tested it on Postman to check if it was working and it was; it then returned the JSON for the API. I started to build a function that would fetch the API and return it's reponse. By using console.log on the response I was able to see which values I would need to incorporate in the function to get the function to run on the DOM as well.

Lessons Learned:

THrough building this project, I learned how APIs work. I learned about JSON and how JSON is basically a giant array that holds a bunch of objects with key-value pairs you can access using a combination of dot notation or optional brackets to select which index you need from the JSON array. I learn how to append newly created elements with the appendChild method to add to the DOM to make new elements appear in my HTML.

About


Languages

Language:JavaScript 60.8%Language:HTML 25.7%Language:CSS 13.5%