2020-09-15

Sep 16 In-Class Exercise Thread.

Post your solution here for the Sep 16 In-Class Exercise.
Best,
Chris
Post your solution here for the Sep 16 In-Class Exercise. Best, Chris

-- Sep 16 In-Class Exercise Thread
GET /movie/time?movieIDs= &theatreIDs= POST /movie/time body => application/json => [{ movieID: 12345, name: "Alice in Wonderland", theatreList: [{ theatreID: 92393, name: "Max Las vegas", timezone: "USA/Los Angeles", screenList: [{ screenID: 13244, timingList: [{ startTS: 1600289677143, endTS: 1600289977143, startTime: "10:00", endTime: "12:30" }] }] }] }] PUT /movie/time?movieID=&theatreID=&screenID= body => application/json => { screenID: 13244, timingList: [{ startTS: 1600289677143, endTS: 1600289977143, startTime: "10:00", endTime: "12:30" }] } DELETE /movie/time?movieIDs=&theatreIDs=
(Edited: 2020-09-16)
<nowiki> GET /movie/time?movieIDs=<movie ID or comma-seperated list of movie IDs> &theatreIDs=<theatre IDs> POST /movie/time body => application/json => [{ movieID: 12345, name: "Alice in Wonderland", theatreList: [{ theatreID: 92393, name: "Max Las vegas", timezone: "USA/Los Angeles", screenList: [{ screenID: 13244, timingList: [{ startTS: 1600289677143, endTS: 1600289977143, startTime: "10:00", endTime: "12:30" }] }] }] }] PUT /movie/time?movieID=<movie ID>&theatreID=<theatre ID>&screenID=<screen ID> body => application/json => { screenID: 13244, timingList: [{ startTS: 1600289677143, endTS: 1600289977143, startTime: "10:00", endTime: "12:30" }] } DELETE /movie/time?movieIDs=<movie IDs>&theatreIDs=<theatre IDs> </nowiki>

-- Sep 16 In-Class Exercise Thread
  • GET Method : arg-MovieName , response-Timings
  • GET Method : response-List of movies being shown
  • GET Method : arg-MovieName, arg-Timing, response-SeatsAvailable
  • POST Method : arg-MovieName, arg-Timing , arg-SeatNumbers, response-200/400
* GET Method : arg-MovieName , response-Timings * GET Method : response-List of movies being shown * GET Method : arg-MovieName, arg-Timing, response-SeatsAvailable * POST Method : arg-MovieName, arg-Timing , arg-SeatNumbers, response-200/400

-- Sep 16 In-Class Exercise Thread
  http://www.mygreattheatres.com/movie/sgdvg/timing
 response : {
              "cinema_id": "hdfjc",
              "cinema_name": "Zeon",
              "movie_id": "sgdvg",
              "movie_title": "Tenet",
              "timing": [{ "start_time": "10:30", "seats_available": true },{ "start_time": "14:30", "seats_available": true }]
            }
 GET http://www.mygreattheatres.com/timing?movie=tfy
 GET http://www.mygreattheatres.com/time?cinema=shfjhg&movie=hsfjfg
(Edited: 2020-09-16)
http://www.mygreattheatres.com/movie/sgdvg/timing response : { "cinema_id": "hdfjc", "cinema_name": "Zeon", "movie_id": "sgdvg", "movie_title": "Tenet", "timing": [{ "start_time": "10:30", "seats_available": true },{ "start_time": "14:30", "seats_available": true }] } GET http://www.mygreattheatres.com/timing?movie=tfy GET http://www.mygreattheatres.com/time?cinema=shfjhg&movie=hsfjfg

-- 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 } } }

-- Sep 16 In-Class Exercise Thread
 GET /showtimes/movie/name/location/zipcode
{
   {
     theaterId: 1,
     {
       time: 1/20/2011 20:15pm,
       roomId: 2
     }
     {
       time: 1/20/2011 22:40pm,
       roomId: 4
      }
  },
  {
     theaterId: 4,
     {
       time: 1/21/2011 10:20am,
       roomId: 5
     }
  }
}
   
 GET /showtimes/allmovies
{
  {
    movieId: 13,
    title: "Rocknrolla"
  },
  {
    movieId: 7,
    title: "Pacific Rim"
  }
}
 GET /showtimes/movie/name/description
{
  description: "plot of the specific movie",
  trailerUrl: https://youtube/abc
}
(Edited: 2020-09-20)
GET /showtimes/movie/name/location/zipcode { { theaterId: 1, { time: 1/20/2011 20:15pm, roomId: 2 } { time: 1/20/2011 22:40pm, roomId: 4 } }, { theaterId: 4, { time: 1/21/2011 10:20am, roomId: 5 } } } GET /showtimes/allmovies { { movieId: 13, title: "Rocknrolla" }, { movieId: 7, title: "Pacific Rim" } } GET /showtimes/movie/name/description { description: "plot of the specific movie", trailerUrl: https://youtube/abc }

-- Sep 16 In-Class Exercise Thread
 https://www.MyGreatTheartres.com/api/v1/?format=json&func=showMovieInfo&movieID=1003
 {
 	"title":"alice in wonderland",
 	"show_time":"09/30/2020";,
 	"actor":['Scarlett Johansson','Brad Pitt']
 };
 
 
 https://www.MyGreatTheartres.com/api/v1/?format=json&func=cancelMyTicket&movieID=1003&userID=1009&token=abd!@#
 {status:true};
 https://www.MyGreatTheartres.com/api/v1/?format=json&func=bookMyTicket&movieID=1003&userID=1009&timeline=09/30/2020&seat=C3&token=abd!@#
 {status:false,"msg":"all seats are full"};
(Edited: 2020-09-16)
https://www.MyGreatTheartres.com/api/v1/?format=json&func=showMovieInfo&movieID=1003 { "title":"alice in wonderland", "show_time":"09/30/2020";, "actor":['Scarlett Johansson','Brad Pitt'] }; https://www.MyGreatTheartres.com/api/v1/?format=json&func=cancelMyTicket&movieID=1003&userID=1009&token=abd!@# {status:true}; https://www.MyGreatTheartres.com/api/v1/?format=json&func=bookMyTicket&movieID=1003&userID=1009&timeline=09/30/2020&seat=C3&token=abd!@# {status:false,"msg":"all seats are full"};

-- Sep 16 In-Class Exercise Thread
 GET www.greattheatres.com/movie?id=<movie_id>
 {
    "movie_name": "I am Legend",
    "movie_time": "09/18/2020 15:00:00"
 }
PUT www.greattheaters.com/movie/time(Edited: 2020-09-16)
GET www.greattheatres.com/movie?id=<movie_id> { "movie_name": "I am Legend", "movie_time": "09/18/2020 15:00:00" } PUT www.greattheaters.com/movie/time

-- Sep 16 In-Class Exercise Thread
 GET /movies/show_timings
     response in JSON{
      {
        movie: "Fast and Furious Still Going",
        location: area1,
        screen4: timing2 
      },
      {
        movie: "John Wick 4",
        location: area2,
        screen1: [timing1, timing2],
        screen2: timing3 
      },
      {
        movie: "Lion King",
        location: area2,
        screen3: timing2 
      }
     }
 POST /movies/show_timings?specified_time="timing2"
     response in JSON{
      {
        movie: "Fast and Furious Still Going",
        location: area1,
        screen4: timing2 
      },
      {
        movie: "Lion King",
        location: area2,
        screen3: timing2 
      }
     }
 POST /movies?movie_id="John Wick 4"&theatre="screen1"
     response in JSON{
      {
        screen1: [timing1, timing2]
      }
     }
(Edited: 2020-09-16)
GET /movies/show_timings response in JSON{ { movie: "Fast and Furious Still Going", location: area1, screen4: timing2 }, { movie: "John Wick 4", location: area2, screen1: [timing1, timing2], screen2: timing3 }, { movie: "Lion King", location: area2, screen3: timing2 } } POST /movies/show_timings?specified_time="timing2" response in JSON{ { movie: "Fast and Furious Still Going", location: area1, screen4: timing2 }, { movie: "Lion King", location: area2, screen3: timing2 } } POST /movies?movie_id="John Wick 4"&theatre="screen1" response in JSON{ { screen1: [timing1, timing2] } }
2020-09-20

-- Sep 16 In-Class Exercise Thread
 1. GET start times for a MOVIE: 
 http://www.mygreattheatres.com/showtimes?theater= <theater_id>&movie=terminator
 response : {
    showtimes: [9:30, 12:00, 2:30, 5:00, 7:30]
 }
 2. POST ticket purchase: 
 http://www.mygreattheatres.com/ticketpurchase
 response : {
               theater_id: xawqer,
               movie: terminator,
               time: "12:00"
               screen: 4
               ticket_id: afasfsa
               printable_ticket: {<printable_pdf>}
            }
 3. PUT update a movies showtimes: 
 http://www.mygreattheatres.com/movies?theater=<theater_id>&movie=terminator
     response : {
               updated_times: [7:00, 9:30, 12:00, 2:30, 5:00, 7:30, 9:00]
            }
(Edited: 2020-09-20)
1. GET start times for a MOVIE: http://www.mygreattheatres.com/showtimes?theater= <theater_id>&movie=terminator response : { showtimes: [9:30, 12:00, 2:30, 5:00, 7:30] } 2. POST ticket purchase: http://www.mygreattheatres.com/ticketpurchase response : { theater_id: xawqer, movie: terminator, time: "12:00" screen: 4 ticket_id: afasfsa printable_ticket: {<printable_pdf>} } 3. PUT update a movies showtimes: http://www.mygreattheatres.com/movies?theater=<theater_id>&movie=terminator response : { updated_times: [7:00, 9:30, 12:00, 2:30, 5:00, 7:30, 9:00] }
[ Next ]
X