-- Sep 16 In-Class Exercise Thread
1. List<TheaterLocation> getNearestTheaters(String zipcode)
GET Request URL: http://www.mygreattheatres.com/theaterlist/theaters_near_me/95129
Response JSON:
{
response: 200,
message: 'success',
theaters: {
1: theater12,
2: theater17,
3: theater14,
4: cinema7788,
5: malltheater22
}
}
2. List<Ticket> reserveSeats(String zipcode, List<Seats> seats, PaymentInformation payInfo)
POST Request URL: http://www.mygreattheatres.com/reservations/reserve_seat?zipcode=95129
Note: This will be a POST request because we want the seats object as a JSON array, but more importantly we want the payment information to be secure!
Response JSON:
{
response: 200,
message: 'success'
}
3. List<MovieTimes> viewTimesForMovie(String zipcode, Movie movie)
GET Request URL: http://www.mygreattheatres.com/screenings/view_times?zipcode=95129&movie=tt0128483
Note: movie = assigned movie id
Response JSON:
{
response: 200,
message: 'success',
times: {
location1: {
screening1: time1,
screening2: time2,
screening3: time3
},
location2: {
screening4: time4,
screening5: time5
},
location2: {
screening6: time6
}
}
}
(
Edited: 2020-09-19)
1. List<TheaterLocation> getNearestTheaters(String zipcode)
GET Request URL: http://www.mygreattheatres.com/theaterlist/theaters_near_me/95129
Response JSON:
{
response: 200,
message: 'success',
theaters: {
1: theater12,
2: theater17,
3: theater14,
4: cinema7788,
5: malltheater22
}
}
2. List<Ticket> reserveSeats(String zipcode, List<Seats> seats, PaymentInformation payInfo)
POST Request URL: http://www.mygreattheatres.com/reservations/reserve_seat?zipcode=95129
Note: This will be a POST request because we want the seats object as a JSON array, but more importantly we want the payment information to be secure!
Response JSON:
{
response: 200,
message: 'success'
}
3. List<MovieTimes> viewTimesForMovie(String zipcode, Movie movie)
GET Request URL: http://www.mygreattheatres.com/screenings/view_times?zipcode=95129&movie=tt0128483
Note: movie = assigned movie id
Response JSON:
{
response: 200,
message: 'success',
times: {
location1: {
screening1: time1,
screening2: time2,
screening3: time3
},
location2: {
screening4: time4,
screening5: time5
},
location2: {
screening6: time6
}
}
}