RESTful and HTTP APIs in Pyramid Transcripts
Chapter: Your first service
Lecture: Introducing the car dealer service
Login or
purchase this course
to watch this video and the rest of the course contents.
0:01
I think it's time to create our first web service. What web services we are going to build? Well we've been hired by a small town auto dealership here,
0:14
and this dealership is very interested in taking their car sales to the next level
0:20
and they've decided that if they can add a little bit of European flair plus some technology, some services, maybe people can integrate with their APIs
0:30
they will be able to take it to the top. So we're going to add Opel as one of the companies, the brands of cars that we're going to sell,
0:39
and we're going to expose all of these Opels that people might want to sell or interact with through our web service.
0:46
So we're going to be creating basically a service that lets them list the details about the cars that they sell, initially
0:53
and then later, we might be able to do things like add used cars for sales
0:57
or list our own Opel to be sold through their Opel dealership things like that. So, if we look at the operations, we're going to start small,
1:05
the first thing that we're going to do is be able to just do a get to list all available cars
1:11
now, they've actually got a pretty big supply cars as we'll see in our database, so we're going to have to limit this somehow,
1:18
maybe implement some paging or something like that, but we want to be able to get all the cars they have,
1:24
and once we have the list of cars, we might want details about those cars. So if we want to interact with a particular car,
1:30
we could do a get against api /auto/ the id of that car and that will give us a specific details about this car.
1:36
Now, we might want this in many formats, but in our first pass we're going to take and exchange all of the data simply in json format.
1:44
I hope you are excited to build this web service for this awesome car dealership, it's going to be really fun.