Skip to content

buzzcosm/nasa-api-pictures-vanilla-js-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NASA API Pictures (NASA APOD)

Exercise Project of ZTM Cours on Udemy (JavaScript Web Projects: 20 Projects to Build Your Portfolio).

Description

NASA API Pictures programmed in vanilla-js.

Useful references

Remarks

API Schema

Sometimes a video link appears in the url instead of an image

media_type "image" || "video"

{
  date: "2016-11-05"
  explanation: "TEXT"
  media_type: "video"
  service_version: "v1"
  title: "ISS Fisheye Fly-Through"
  url: "https://www.youtube.com/embed/DhmdyQdu96M?rel=0"
}

Limit of requests reached

REST Call: https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&count=10

OVER_RATE_LIMIT
You have exceeded your rate limit. Try again later or contact us at https://api.nasa.gov:443/contact/ for assistance

getNasaPictures() function get ERROR:

TypeError: currentArray.forEach is not a function
    at createDOMNodes (script.js:29:16)
    at updateDOM (script.js:103:3)
    at getNasaPictures (script.js:114:5)