9-12, Advanced Topics, AP Computer Science Principles, Computer Science I, Hybrid Learning, Uncategorized

Investigating Web APIs

It’s rare, but every once in awhile I’m lucky enough to have time to learn something new. A few weeks ago I decided to work through this Mixtape tutorial on Repl.it that utilizes the Spotify API. While an excellent tutorial on it’s own, especially for someone teaching themselves, I saw an awesome opportunity to expand each part with rich discussions and discovery activities. Over the course of a few lessons, students explore HTTP requests, discuss the values set forth by the Developer’s Terms of Service, interpret JSON objects, write basic HTML, make use of Flask and Python, and put it all together in the original tutorial’s Mixtape project.

Here are all lesson files and zipped Repl.it projects, but the students and I really enjoyed the first lesson. In the warm-up, students “notice and wonder” what is happening behind the scenes with HTTP as a webpage loads. The remainder of the lesson gives a brief overview of HTTP requests and APIs. This culminates with a discussion of the Spotify Developer Terms of Service utilizing Nearpod. I have 80-minute periods, and we didn’t finish so definitely split this into two days if needed!