- Why we need a standard format for exchanging data.
- The rules for the JSON format.
- What an API is.
- How to use
fetch
to request data from an API. - How to make use of the data returned from an API.
- The difference between synchronous and asynchronous processes.
- Check with your class Candidate Engagement Manager for any other announcements.
- Graded assignment #5 is due soon!
- Welcome to Days 23 & 24
- Day 23:
- Lesson 16
- Assignment 4 due at end of day 23
- Day 24:
- Introduce Graded Assignment 5 in the morning.
- Rest of day is in-class work time for Assignment 5.
- Assignment 5 due end of Day 29.
- Restate what "API" stands for, and provide examples of common APIs.
- Why are APIs a good thing?
- What sorts of information do APIs supply?
- How hard is it to create an API?
- JSON looks a lot like JavaScript objects, but note the differences.
- How is
fetch
similar to and different from HTTP requests (GET, POST)? - Live coding. Set up a
fetch
example and discuss:- Syntax,
- How to use the dev tools to view what
fetch
does, - The
response
keyword, - How to use the response from an API to modify the HTML on a webpage.
- Studio intro.
- Forking and cloning a GitHub repository should be old hat by now. If a student requires help, point them to a book example that shows how to fork and clone rather than walking them through the process again.
- Absolutely, positively, NO EXCUSES! Complete this studio on your own.
- There are lots of tiny details that students may miss or mistype that cause their code to break.
- When a student asks for help, have them describe in detail what they have done, what was working before, and where they think their code might be misbehaving.
- Some students might get confused about the sample JSON given in the instructions. Remind them that they do NOT need to cut and paste this data. Instead, their program will request data from an API.
- Similarly, students might get confused about where to add the HTML for the astronaut data.
- As always, encourage your studio group to try the Bonus missions, or play with the CSS file to try to change the appearance of the webpage.