#100DaysOfCode in Python Transcripts
Chapter: Days 97-99: Building JSON APIs
Lecture: Exercising the API

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Alright, we have the stubs for our APIs in place. And we're going to start focusing on some of these that are easy.
0:08 For example, this all_rolls, this one is really easy. top_scores, somewhat easy. play_round, we're going to save that one for later.
0:16 But I've already sort of configured Postman to deal with this. So Postman is cool because you can create these groups, like here I have Online RPS,
0:25 and here are all the operations, and you can see GET, PUT, POST, POST, GET, GET, GET. So if I go get_user, we have api/game/users/mark,
0:33 and you can see down here would find user Mark. Come over here and say create_user, the body's already set, here's the user that didn't exist yet.
0:43 But if we do this, response is would create user 200 okay. So what we're going to do is we're going to go through and work on these.
0:52 Let's start with all_rolls. Right now we're getting would create all_rolls. I think we're going to start knocking out
0:58 some of these simple ones, game_status, all_rolls, new game, create user, these types of things. And then the play_round and the top_scores
1:05 those are a little bit trickier. But you'll see that we can configure these in Postman like for example, this play_round is going to pass the body,
1:15 here's the game id, here's the user, here's the roll, alright, so we're going to want to make sure we have a user, we could create a user over here,
1:24 want to make sure we have, Michael for example, so that other one would work. Things like that. So we're going to use Postman to exercise
1:31 and get our API just right, and then, then we're going to go write the client side code that consumes it.

Talk Python's Mastodon Michael Kennedy's Mastodon