Skip to content

Instantly share code, notes, and snippets.

@cferdinandi
Created January 16, 2019 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cferdinandi/c17df25b0826b529643743bc71d1eaec to your computer and use it in GitHub Desktop.
Save cferdinandi/c17df25b0826b529643743bc71d1eaec to your computer and use it in GitHub Desktop.
Top NYT Stories project template from https://learnvanillajs.com.

Project Details

Write a script that gets the top five stories for the day from the New York Times using the NYT API.

Bonus: Get stories from two or three categories instead of just one.

Considerations

  • What do you do if the NYT API fails?
  • How do you protect yourself from XSS attacks with third-party API data?

Need help?

This project is part of the Vanilla JS Academy.

<!DOCTYPE html>
<html>
<head>
<title>Project Template</title>
<style type="text/css">
body {
margin-left: auto;
margin-right: auto;
max-width: 40em;
width: 88%;
}
</style>
</head>
<body>
<h1>Today's Top Stories</h1>
<div id="news"></div>
<script>
// Project code...
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment