petefitton / kanye-fetch

Lab for making AJAX calls using fetch in front end js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KanyeREST quote generator

It's time to use our newfound knowledge of AJAX to create something really useful.

Have you ever felt down? Moved from informed pessimism into the valley of despair? In those times of trouble, Kanye West quotes come to you, speaking words of wisdom and truth, via the Kanye.REST API.

Goals

  • Make a call to the Kanye.REST API to receive a nugget of wisdom from the Grammy Award winning performer.
  • Display the wisdom on the page (in a way that inspires)
  • Have a button that a user can push to receive another gem from the father of four

The main goal of this lab is to introduce you to 3rd party APIs and show you the possibilities. KanyeREST is a simple API, but there are more complicated ones out there if you finish the main goals early.

Resources

Bonus

  • Style your inspirational site!
  • Make a call to ICanHazDadJoke or another quote API, either randomly generate which call gets made or make a separate button

NOTE: ICanHazDadJoke requires headers to be sent with the request so you might have to look up how to use headers with Fetch or craft your own XML request using vanilla Javascript!

Licensing

All content is licensed under a CC­BY­NC­SA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

About

Lab for making AJAX calls using fetch in front end js


Languages

Language:JavaScript 61.9%Language:HTML 35.3%Language:CSS 2.8%