Application Programming Interface

Responding to Data

Publishing on the web enables us to interact, not only with browser conditions and user input, but data available on other areas of the internet.

In today’s exercise, we will be diving into the json file format, how to access it, and how to use that data in your webpages. Review the notes on APIs and check out this week’s demo code (in-class-demos/week10 folder).

We will create a webpage that adds structured data into a website.

  1. Organize / Select your data source
  1. Fetch your data, and output your data into the console.
  • This step is to verify that you are able to successfully access your data.
  1. Using JavaScript object notation, access parts of your data.
  • First use the console to make sure you are able to extract the correct item.
  1. Create container structures in your HTML page to which you will insert your data.
  • Append your data into your webpage using jQuery.

Resources

Reference