#100DaysOfCode in Python Transcripts
Chapter: Days 55-57: Structured API clients with uplink
Lecture: Demo: Exploring the service
0:00 Over here at consumer_services_api.talkpython.fm,
0:04 we have at least three services that you can play with.
0:09 So this is the backend for the blog,
0:11 and it gives you the operations right here.
0:14 So you can get, and it'll list,
0:16 if you just do a getting into this,
0:18 it will give you all of the blog posts.
0:19 If you do a get against that, some particular id,
0:23 you'll get the details only about that blog post.
0:26 Create a new one you do an HTTP POST.
0:28 To update one you do a PUT,
0:29 and to actually remove one you do a
0:31 DELETE against these particular URL's here.
0:33 So this can be totally done with requests,
0:36 but it's a lot of juggling the pieces.
0:38 And if you use the restricted version,
0:40 then you've got to use the authentication settings
0:43 that actually go into the headers and stuff like that.
0:45 There's also this kind of crazy SOAP version,
0:48 we're going to stay away from that.
0:49 So, we're just going to focus with this one here,
0:51 but if you wanted to get more interesting stuff
0:54 going on, you could actually use like
0:56 basic authentication with those, and so on.
0:59 So if we look here,
1:01 and you'll see we have a list, and then just
1:03 blog post, blog post, blog post.
1:05 Now these are not super interesting here, right?
1:08 They're just title, content, view count, id,
1:11 which is kind of like a primary key,
1:13 and then the date it was published, okay?
1:16 They're not advanced, but it's plenty for us to play with.
1:20 Right, so we're going to use this URL,
1:22 and I would just leave this open,
1:24 we might come back in and refer to these
1:26 as we build out our service here.
1:27 You guys can play with this, you can update and
1:31 delete posts however you want.
1:33 Actually, it's each person that comes and works with
1:36 the service gets their own copy.
1:37 So don't worry you're not going to mess it up
1:39 for someone, have fun with it.