Skip to content

khvci/cinemaRoomRestService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# cinemaRoomRestService

As of June 1st, the project is completed. Some examples from the application can be seen below.

/seats endpoint provides available seats:

Let's buy the seat at first row, first column, which is available, by sending a post request to /purchase endpoint. If transaction is succesful, it returns the seat and the price with 200 OK Http response:

Update: now it also returns with a token, which will be used for returning tickets later.

Let's try to buy same seat again, and it returns a 400 bad request with an error "The ticket has been already purchased!"

This time, let try to buy 15th column, which is out of bounds. It returns a 400 bad request with an error "The number of a row of a column is out of bounds!"

In our cinema, first 4 rows are expensive(10) and the rest is cheaper(8). Let's buy a cheaper ticket:

Lastly, when we reach the /seats endpoint again, we can see that first seat is not listed anymore, because it's been purchased at the second example.

Updates after completing the third stage of the project:

Now we have /return endpoint and we are able to return the ticket by using token provided during purchase:

Seat is returned, added to available seats list, and the list is sorted:

If we try to use same token again, it returns a "wrong token" exception, because the token is not a valid one anymore.

/stats endpoint provides current statistics and http response 200, if the correct password provided:

If the correct password is not provided, it returns an error message and http response 401 unauthorised:

Project Overview

All the project-related topics and implementations are completed. Green bars indicate completed topics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages