diff --git a/app.js b/app.js index 63550e9..ba1d048 100644 --- a/app.js +++ b/app.js @@ -114,36 +114,36 @@ particlesJS("bg", { -// NASA API CALL +// NASA API CALL 1 : APoD - // fetch('https://api.nasa.gov/planetary/apod?api_key=eISHzmGbQk7EMWv9NTlVtvzZVmeLKPUoL3uKMSPJ') - // .then((response) => { - // return response.json() - // }).then((data) => { - // console.log(data) + fetch('https://api.nasa.gov/planetary/apod?api_key=eISHzmGbQk7EMWv9NTlVtvzZVmeLKPUoL3uKMSPJ') + .then((response) => { + return response.json() + }).then((data) => { + console.log(data) - // displayData(data.hdurl, data.explanation, data.title, data.date, data.copyright ) + displayData(data.url, data.explanation, data.title, data.date, data.copyright ) - // }) - // .catch((error) => console.log(error)) + }) + .catch((error) => console.log(error)) - // function to display data in apod section - // function displayData(image, info, title, date, copyright){ - // document.getElementById("apod_img").src = image - // document.getElementById("apod_info").textContent = info - // document.getElementById("title").textContent = title - // document.getElementById("date").textContent = date - // document.getElementById("copyright").textContent = copyright + //function to display data in apod section + function displayData(image, info, title, date, copyright){ + document.getElementById("apod_img").src = image + document.getElementById("apod_info").textContent = info + document.getElementById("title").textContent = title + document.getElementById("date").textContent = date + document.getElementById("copyright").textContent = copyright - // } + } - // NASA API CALL 2 + // NASA API CALL 2 : Mars Rover Photos - // fetch('https://api.nasa.gov/EPIC/api/natural/images?api_key=eISHzmGbQk7EMWv9NTlVtvzZVmeLKPUoL3uKMSPJ') + // fetch('https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?earth_date=2015-6-3&api_key=eISHzmGbQk7EMWv9NTlVtvzZVmeLKPUoL3uKMSPJ') // .then((response) => { // return response.json() // }).then((data) => { diff --git a/index.html b/index.html index 416b987..460f2a6 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@ APoD
NASA's Astronomy Picture of the Day (APoD) showcases captivating celestial images accompanied by brief explanations. Each day, NASA features astronomical wonders, ranging from stunning nebulae and galaxies to snapshots of our solar system, providing a daily dose of cosmic beauty and scientific insight. APoD serves as a valuable resource for both astronomy enthusiasts and those seeking to explore the wonders of the universe.
@@ -88,9 +88,8 @@Embark on a fascinating journey into the Martian landscape as we delve into the photographic archives of diverse rovers, each boasting a distinctive collection of images meticulously stored in a comprehensive database. This rich repository offers an extensive visual chronicle of Mars' exploration. + + Discover the convenience of accessing Mars rover images effortlessly by entering the Earth date corresponding to a specific photo. This user-friendly approach provides unparalleled flexibility, allowing you to seamlessly navigate through the captivating imagery captured during the exploration of the enigmatic Red Planet.Whether you're intrigued by the geological formations, atmospheric phenomena, or the rover's own milestones, this immersive experience promises a deeper understanding of Mars' unique features and the scientific endeavors undertaken by these robotic explorers. Join us in unlocking the mysteries of the Red Planet through the lens of cutting-edge technology and unparalleled exploration.
+Get Martian Images real quick!
+