MOBILEGROUP INC. 12/F Sagittarius Building, HV Dela Costa St, Salcedo Village, Makati City, 1227 Tel # +632 7514050
Total Page:16
File Type:pdf, Size:1020Kb
MOBILEGROUP INC. 12/F Sagittarius Building, HV Dela Costa St, Salcedo Village, Makati City, 1227 Tel # +632 7514050 Application Programming Interface Reference Title Schedule API Reference Document ID API-ScheduleAPI Version 1.0 Date 2015 January 08 Prepared by Christopher P. Cheng Gerald S. Cruz Related Project or Lucky Chinatown Cinema Ticketing System Module Copyright © 2015 Mobilegroup Inc. 1. OVERVIEW 1.1. Revision Information Date Version Description Author 2015-01-08 1.0 Initial Release Christopher Cheng / Gerald S. Cruz 1.2 Introduction This document describes the Schedule API. 1.3 Scope This document is intended to be used by 3rd party developers to pull movie schedules and other relevant data. Available are only READ-ONLY functions. As a publicly available API system, no authentication is necessary. 1.4. Architecture The API is a .NET 2.0 ASMX Webservice. It uses primarily SOAP as a protocol, and supports SOAP 1.1 and 1.2 as per the framework. Integration is easy via languages that support WSDL. The API also allows HTTP GET for clients that may have trouble with implementing a SOAP framework. However, this is only applicable for APIs that use purely native types. It is possible to call the API via JSON, but it requires changing the HTTP header MIME type to JSON manually from the caller end, due to a limitation of the .NET framework in that regard. 2. SCHEDULE API 2.1 Webservice URL Webservice URL is at: Live: http://blockbusterseats.com/dataapiws/dataapiws.asmx WSDL: http://blockbusterseats.com/dataapiws/dataapiws.asmx?wsdl Test: http://blockbusterseats.com/testdataapiwsmw/dataapiws.asmx WSDL: http://blockbusterseats.com/testdataapiwsmw/dataapiws.asmx?wsdl 2.2 Details The Webservice methods are structured such that they pull data in a specific distributed way. This is to limit the bandwidth and other overhead costs of pulling textual data. 2.3 Constants 2.3.1. Filter Most of the APIs require a filter to denote which Screen types are to be displayed. Value: ALL (or 0) - for all cinemas 2.3.2. Running Most of the APIs require a parameter which determines if the schedules for the whole day are to be displayed, or if it filters by time. True – Does not show lapsed schedules False – Shows all schedules for the given date, 2.3.3. Screening Type Some of the APIs return a Screening_Type parameter of type Integer, which is interpreted as follows: 1 – Reserved Seating 2 – Guaranteed Seating (Free seating but limited seat capacity) 3 – Free Seating (Free seating regardless of seat capacity) 2.4 APIs 2.4.1 GetBranchesWithSchedules () This Method is used to retrieve all branches with schedule on a given date. 2.4.1.1 Inputs Parameter Type Description Date DateTime The date from which is to be pulled Filter String See 2.3.1 Running Boolean See 2.3.2 2.4.1.2 Returns XBranch object containing: Parameter Type Description XBranch List[] List of string containing branch details Branch_Key Integer Branch key Branch_Code String Unique code for each branch Branch_Name String Branch name Cinema_Count Integer Cinema number where the movie is shown 2.4.1.3 Sample Result <XBranch> <Branch_Key>1</Branch_Key> <Branch_Code>LCT</Branch_Code> <Branch_Name>Lucky Chinatown</Branch_Name> <Cinema_Count>4</Cinema_Count> </XBranch> 2.4.2 GetMoviesWithSchedules() This method returns movie with schedule at a given date. 2.4.2.1 Inputs Parameter Type Description Date DateTime The date from which is to be pulled Filter String See 2.3.1 Running Boolean See 2.3.2 2.4.2.2 Returns XMovie object containing: Parameter Type Description XMovie List[] List of movie details Movie_Code String Unique movie mode Movie_Name String Movie name Mtrcb_Rating String Movie rating RunningTime Integer Movie running time Genre String Movie genre FilmFormat String Movie format CinemaType String Cinema type Synopsis String Movie synopsis The party that stores this information stores the data with escaped special characters (HTML format). Since we are using a textual (XML) protocol, we cannot escape the characters as it would break the XML. Image String Thumbnail movie image Image2 String Header/Banner movie image Video_Link String Link of movie trailer Showing_Type String Movie type Image3 String (Reserved) Cast String Movie casts Director String Movie director/s 2.4.2.3.Notes This method is use only to retrieve movie_code, movie_name. We recommend using GetMoviesWithDetails API to get all movies on a given date. 2.4.2.4 Sample Result <XMovie> <Movie_Code>BEAUTYINABOT</Movie_Code> <Movie_Name>Beauty In A Bottle</Movie_Name> <Mtrcb_Rating /> <RunningTime>0</RunningTime> <Genre /> <FilmFormat>ALL</FilmFormat> <CinemaType>ALL</CinemaType> <Synopsis /> <Image /> <Image2 /> <Video_Link /> <Showing_Type>ALL</Showing_Type> <Image3 /> <StarringCast /> <Director /> </XMovie> 2.4.3 GetMoviesWithDetails() This method returns all movies with details on a given date. 2.4.3.1 Inputs Parameter Type Description Date DateTime The date from which is to be pulled 2.4.3.2 Returns XMovie object containing: Parameter Type Description XMovie List[] List of movie details Movie_Code String Unique movie mode Movie_Name String Movie name Mtrcb_Rating String Movie rating RunningTime Integer Movie running time Genre String Movie genre FilmFormat String Movie format CinemaType String Cinema type Synopsis String Movie synopsis The party that stores this information stores the data with escaped special characters (HTML format). Since we are using a textual (XML) protocol, we cannot escape the characters as it would break the XML. Image String Thumbnail movie image Image2 String Header/Banner movie image Video_Link String Link of movie trailer Showing_Type String Movie type Image3 String (Reserved) Cast String Movie casts Director String Movie director/s 2.4.3.3.Notes This API is the third of 3 calls for the Movies → Branches → Schedules retrieval process flow and the Branches → Movies → Schedules retrieval process flow. Due to the external nature of Synopsis and Images, calling this API may incur a higher retrieval cost, and is encouraged to be used sparingly. The MTRCB_Rating, Synopsis and Images fields return with valid data only for this API. 2.4.3.4 Sample Result <XMovie> <Movie_Code>JOHN_WICK</Movie_Code> <Movie_Name>John Wick</Movie_Name> <Mtrcb_Rating>R-16</Mtrcb_Rating> <RunningTime>105</RunningTime> <Genre>Action,Thriller,</Genre> <FilmFormat>STANDARD</FilmFormat> <CinemaType>REGULAR</CinemaType> <Synopsis>An ex-hitman comes out of retirement to track down the gangsters that took everything from him.</Synopsis> <Image>http://luckychinatowncinemas.com/megaworldcms/Images/JOHN-WICK- THUMBNAIL_20141101093714.jpg</Image> <Image2>http://luckychinatowncinemas.com/megaworldcms/Images/john-wick- banner_20141101093718.jpg</Image2> <Video_Link><iframe width="640" height="390" src="//www.youtube.com/embed/bvaftiAu7mw" frameborder="0" allowfullscreen> </iframe></Video_Link> <Showing_Type>NOWSHOWING</Showing_Type> <Image3 /> <StarringCast>Keanu Reeves, Michael Nyqvist, Alfie Allen</StarringCast> <Director>David Leitch, Chad Stahelski</Director> </XMovie> 2.4.4 GetBranchesByMovie() This method returns list of branches available based on a given movie 2.4.4.1 Inputs Parameter Type Description Date DateTime The date from which is to be pulled Movie_Code String Unique movie code Filter String See 2.3.1 Running Boolean See 2.3.3 2.4.4.2 Returns XBranch object containing: Parameter Type Description XBranch List[] List of the details of the Branch Branch_Key Integer Branch Key Branch_Code String Unique Code for each Branch Branch_Name String Branch Name Cinema_Count Integer Number of cinema of a certain branch 2.4.4.3 Sample Result <XBranch> <Branch_Key>1</Branch_Key> <Branch_Code>LCT</Branch_Code> <Branch_Name>Lucky Chinatown</Branch_Name> <Cinema_Count>4</Cinema_Count> </XBranch> 2.4.5 GetSchedulesByBranchAndMovie() This method is used to get the list of schedules given a particular branch and particular movie based on the given date. 2.4.5.1 Inputs Parameter Type Description Date DateTime Date from which data is to be pulled. Branch Integer Integer representation of the branch Movie_Code String Unique movie code Filter Enum See 2.3.1 Running Boolean See 2.3.2 2.4.5.2. Returns: XSchedule objects containing: Parameter Type Description MCT_Key Integer Integer representation of a specific schedule. Cinema_Code String Unique Cinema (Screen) Code Cinema_Name String Displayable Cinema (Screen) name. Screening_Type Integer See 2.3.3 Start_Time DateTime Start time of Movie End_Time DateTime End time of Movie Price Decimal Regular ticket price for the schedule Allow_online_ purchase Boolean True – purchase over the web allowed False – purchase over the web is not allowed (For future implementation) 2.4.5.3 Sample Result <XSchedule> <MCT_Key>307</MCT_Key> <Cinema_Code>1</Cinema_Code> <Cinema_Name>Cinema 1</Cinema_Name> <Screening_Type>2</Screening_Type> <Start_Time>2014-11-04T14:30:00</Start_Time> <End_Time>2014-11-04T16:15:00</End_Time> <Price>242.0000</Price> <Allow_Online_Purchase>true</Allow_Online_Purchase> </XSchedule> 2.4.6 GetMovie() This method is used to get the full details of a given movie. 2.4.6.1 Inputs Parameter Type Description Movie_Code String Unique Movie Code 2.4.6.2. Returns: XMovie objects containing: Parameter Type Description XMovie List[] List of the details of the movie Movie_Code String Unique movie mode Movie_Name String Movie name Mtrcb_Rating String Movie rating RunningTime Integer Movie running time Genre String Movie genre FilmFormat String Movie format CinemaType String Cinema type