Repository for Service Oriented Programming | ITKMITL 2019
URL : /showtime
Method : GET
Response example
[
{
"id": "5da32f48accef147705f4dd4",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "11.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fc4accef147705f4dd5",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "14.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fcfaccef147705f4dd6",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db12821084af14cc0590c93",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "12.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fd8accef147705f4dd7",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db12821084af14cc0590c93",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "17.00",
"date": "04-10-2019",
"status": true
}
]
URL : /showtime?theater={theaterId}
Method : GET
Response example
[
{
"id": "5da32f48accef147705f4dd4",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "11.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fc4accef147705f4dd5",
"movieId": "5db3fcfcaccef102e44d75f4",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "14.00",
"date": "04-10-2019",
"status": true
}
]
URL : /showtime?movie={movieId}
Method : GET
Response example
[
{
"id": "5da32f48accef147705f4dd4",
"movieId": "5da32fc4accef147705f4dd5",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "11.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fc4accef147705f4dd5",
"movieId": "5da32fc4accef147705f4dd5",
"theaterId": "5db1280f084af14cc0590c92",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "14.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fcfaccef147705f4dd6",
"movieId": "1",
"theaterId": "2",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "12.00",
"date": "04-10-2019",
"status": true
},
{
"id": "5da32fd8accef147705f4dd7",
"movieId": "1",
"theaterId": "2",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "03-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film",
"time": "17.00",
"date": "04-10-2019",
"status": true
}
]
URL : /showtime?id={id}
Method : GET
Response example
{
"_id": "5da32f48accef147705f4dd4",
"movieId": "5da32f48accef147705f4dd4",
"theaterId": "5da32f48accef147705f4dd4",
"date": "04-10-2019",
"time": "11.00",
"status": true,
"availableSeats": ["A3", "A4", ..., "B10"]
}
URL : /showtime?date={date}
Method : DELETE
Response Example
Delete showtime date: {date} Complete
URL : /showtime
Method : POST
Request example
{
"movieId": "5da32f48accef147705f4dd4",
"theaterId": "5da32fcfaccef147705f4dd6",
"date": "04-10-2019",
"time": "11.00",
"status": true
}
Response example
{
"id": "5da32f48accef147705f4dd4",
"movieId": "5da32f48accef147705f4dd4",
"theaterId": "5da32f48accef147705f4dd4",
"date": "04-10-2019",
"time": "11.00",
"status": true,
"availableSeats": ["A1", "A2", ..., "B10"]
}
URL : /showtime?id={id}
Method : DELETE
Response Example
Delete showtime _id: {_id} Complete
URL : /movie
Method : GET
Response example
[
{
"_id": "5da321b7accef147705f4dd0",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "3-OCT-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film"
},
{
"_id": "5da326b8accef147705f4dd2",
"movieName": "The Matrix",
"movieThumbnail": "picpath",
"movieReleaseDate": "24-OCT-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film"
}
]
URL : /movie/{_id}
Method : GET
Response example
{
"_id": "5da321b7accef147705f4dd0",
"movieName": "JOKER",
"movieThumbnail": "picpath",
"movieReleaseDate": "3-OCT-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film"
}
URL : /movie
Method : POST
Request example
{
"movieName": "The Matrix",
"movieThumbnail": "picpath",
"movieReleaseDate": "24-10-2019",
"movieLength": "104",
"movieDescription": "This is Short Description of This Film"
}
Response example
{
"_id": "5db2fab7accef10da071ca0d",
"movieName": "The Matrix",
"movieThumbnail": "picpath",
"movieReleaseDate": "24-10-2019",
"movieLength": "104",
"movieDescription": "This is Short Description of This Film"
}
URL : /movie/{id}
Method : PUT
Request example
{
"movieName": "The Matrix",
"movieThumbnail": "picpath",
"movieReleaseDate": "24-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film"
}
Response example
{
"_id": "5db2fb23accef10da071ca0e",
"movieName": "The Matrix",
"movieThumbnail": "picpath",
"movieReleaseDate": "24-10-2019",
"movieLength": "120",
"movieDescription": "This is Short Description of This Film"
}
URL : /movie/{id}
Method : DELETE
URL : /theater
Method : POST
Request example
{
"theaterId": "3",
"seats": ["A1", "A2", ..., "B10"]
}
Response example
{
"_id": "5da32a9eaccef147705f4dd3",
"theaterId": "3",
"seats": ["A1", "A2", ..., "B10"]
}
URL : /theater
Method : Get
Response example
[
{
"_id": "5db1280f084af14cc0590c92",
"theaterId": "1",
"seats": ["A1", "A2", ..., "B10"]
},
{
"_id": "5db12821084af14cc0590c93",
"theaterId": "2",
"seats": ["A1", "A2", ..., "B10"]
}
]
URL : /theater/{_id}
Method : GET
Response example
{
"_id": "5da32a9eaccef147705f4dd3",
"theaterId": "3",
"seats": ["A1", "A2", ..., "B10"]
}
URL : /theater/{_id}
Method : DELETE
Response example
Delete theater _id: {_id} Complete
URL : /u
Method : GET
Response example
[
{
"username": "user1",
"tickets": [
"5db43d8daccef1020cb470ed",
"5db43d9caccef1020cb470ee"
]
},
{
"username": "user2",
"tickets": [
"5db43dabaccef1020cb470ef",
"5db43db8accef1020cb470f0"
]
}
]
URL : /u/{username}
Method : GET
Response example
[
{
"_id": "5db43d8daccef1020cb470ed",
"username": "user1",
"showtimeId": "5db3fd80accef102e44d75f6",
"seats": [
"A1",
"A2"
]
},
{
"_id": "5db43d9caccef1020cb470ee",
"username": "user1",
"showtimeId": "5db3fd8daccef102e44d75f7",
"seats": [
"A1",
"A2"
]
}
]
URL : /u
Method : POST
Request example
{
"username": "user2",
"showtimeId": "5db3fd80accef102e44d75f6",
"seats": ["A3", "A4"]
}
Response example
{
"username": "user2",
"tickets": [
"5db43dabaccef1020cb470ef",
"5db43db8accef1020cb470f0"
]
}
URL : /u/ticket
Method : GET
Response example
[
{
"_id": "5db43d8daccef1020cb470ed",
"username": "user1",
"showtimeId": "5db3fd80accef102e44d75f6",
"seats": [
"A1",
"A2"
]
},
{
"_id": "5db43d9caccef1020cb470ee",
"username": "user1",
"showtimeId": "5db3fd8daccef102e44d75f7",
"seats": [
"A1",
"A2"
]
},
{
"_id": "5db43dabaccef1020cb470ef",
"username": "user2",
"showtimeId": "5db3fd8daccef102e44d75f7",
"seats": [
"A3",
"A4"
]
},
{
"_id": "5db43db8accef1020cb470f0",
"username": "user2",
"showtimeId": "5db3fd80accef102e44d75f6",
"seats": [
"A3",
"A4"
]
}
]
URL : /u/ticket/{id}
Method : DELETE
go to website
username adminmovie
password adminmovie
Note : This website is only intended to show the work of api. It can't to booking movies in real life and does not support responsive.
GET /movie
GET /showtime?movie={movie_id} GET /movie
GET /showtime?id={showtime_id} GET /theater GET /movie
GET /showtime?id={showtime_id} GET /movie PUT /showtime/{showtime_id} ( Remove selected seat when booking sucess ) POST /u/ ( Add new ticket in database )
GET /u/{username} ( Get ticket by username )
GET /movie POST /movie PUT /movie/{movie_id} DELETE /movie/{movie_id}
GET /theater POST /theater PUT /theater/{theater_id} DELETE /theater/{theater_id}
GET /showtime POST /showtime DELETE /showtime/{showtime_id}
GET /u
นาย จิรพัส วงษ์พิทักษ์ 60070009
นาย นิติ จิรการวุฒิไกร 60070041
นาย ศุภกิตติ์ เธียรธัญญกิจ 60070098
นาย อนุศรณ์ เม่นนาเกร็ด 60070110