Documentation ¶
Index ¶
- func GetShowtimeURL(venueCode, sessionID string) (*url.URL, error)
- type Categories
- type ChildEvent
- type Cinemas
- type Client
- func (c *Client) GetEventCode(movieName, language, dimension string) (string, error)
- func (c *Client) GetMovieURL(movieName, language, dimension string, date time.Time) (*url.URL, error)
- func (c *Client) GetQuickbook(eventType string) (*QuickBook, error)
- func (c *Client) GetShowtimes(eventCode, venueCode string, date time.Time) ([]Show, error)
- func (c *Client) ListMovieTitles() ([]string, error)
- func (c *Client) ListPreferredCinemas() (*PopularCinemas, error)
- func (c *Client) ListTheaters() ([]RegionalCinemaDetail, error)
- type Event
- type MoviesData
- type PopularCinemas
- type PrefferedCinemaDetail
- type QuickBook
- type RegionDetails
- type RegionalCinemaDetail
- type Regions
- type Show
- type Showtimes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Categories ¶
type Categories struct { AreaCatCode string PriceDesc string CurPrice string SeatsAvail string SeatLayout string MaxSeats string PercentAvail string PriceCode string CategoryRange string // contains filtered or unexported fields }
Categories for a show
type ChildEvent ¶
type ChildEvent struct { Name string `json:"EventName"` Language string `json:"EventLanguage"` Dimension string `json:"EventDimension"` Code string `json:"EventCode"` Synopsis string `json:"EventSynopsis"` URL string `json:"EventURL"` }
ChildEvent can be multiple children of an Event (Movie) containing different languages/dimensions events
type Cinemas ¶
type Cinemas struct { BookMyShow struct { AIVN []RegionalCinemaDetail } `json:"BookMyShow"` }
Cinemas is the "cinemas" field from QUICKBOOK response
type Client ¶
Client is a general struct
func NewClient ¶
NewClient instantiates a Client struct with a Region Code and Region Name
Example:
c := bms.NewClient("MUMBAI", "Mumbai")
func (*Client) GetEventCode ¶
GetEventCode returns an Event code for a given movie
func (*Client) GetMovieURL ¶
func (c *Client) GetMovieURL(movieName, language, dimension string, date time.Time) (*url.URL, error)
GetMovieURL returns a URL to a movie's main BMS page.
Language can be:
Hindi, English, Tamil, Telugu, Kannada, Gujarati or anything else BookMyShow supports
Dimensions can be:
2D, 2D 4DX, 3D, 3D 4DX, IMAX 3D or any other that BookMyShow supports
func (*Client) GetQuickbook ¶
GetQuickbook returns a slice of Event objects
eventType can be:
MT(Movies), CT(Concerts or Misc Events), PL(Plays), SP(Sports)
As of right now, the package only supports MT (Movies)
func (*Client) GetShowtimes ¶
GetShowtimes returns a slice of Showtimes (ArrShows) for a movie at a particular venue (theater) on a particular date.
func (*Client) ListMovieTitles ¶
ListMovieTitles returns a slice of movie titles
func (*Client) ListPreferredCinemas ¶
func (c *Client) ListPreferredCinemas() (*PopularCinemas, error)
ListPreferredCinemas returns a list of popular cinemas in your region
func (*Client) ListTheaters ¶
func (c *Client) ListTheaters() ([]RegionalCinemaDetail, error)
ListTheaters returns slice of Cinemas in your region
type Event ¶
type Event struct { Title string `json:"EventTitle"` Code string `json:"EventCode"` ChildEvents []ChildEvent `json:"ChildEvents"` }
Event is a movie object
type MoviesData ¶
type MoviesData struct { BookMyShow struct { ArrEvents []Event `json:"arrEvents"` } `json:"BookMyShow"` }
MoviesData is the "moviesData" field from QUICKBOOK response
type PopularCinemas ¶
type PopularCinemas struct {
Popular map[string]PrefferedCinemaDetail `json:"popular"`
}
PopularCinemas is the GETPREFFEREDCINEMAS endpoint response
type PrefferedCinemaDetail ¶
type PrefferedCinemaDetail struct { VenueCode string `json:"venueCode"` VenueName string `json:"venueName"` RegionCode string `json:"regionCode"` RegionName string `json:"regionName"` }
PrefferedCinemaDetail contains information regarding Theaters
type QuickBook ¶
type QuickBook struct { MovieData *MoviesData `json:"moviesData"` Cinemas *Cinemas `json:"cinemas"` }
QuickBook is the response from QUICKBOOK endpoint
type RegionDetails ¶
type RegionalCinemaDetail ¶
type RegionalCinemaDetail struct { IsATMOSEnabled string `json:"IsATMOSEnabled"` Address string `json:"VenueAddress"` Code string `json:"VenueCode"` Latitude string `json:"VenueLatitude"` Longitude string `json:"VenueLongitude"` Name string `json:"VenueName"` SubRegionCode string `json:"VenueSubRegionCode"` SubRegionName string `json:"VenueSubRegionName"` }
RegionalCinemaDetail contains information regarding Theaters in a region
type Regions ¶
type Regions map[string][]RegionDetails
Regions from GETREGIONS endpoint
func ListRegions ¶
ListRegions returns Region list including the name, code and alias of a region from GETREGIONS Endpoint
Example:
regions, err := bms.ListRegions() if err != nil { log.Print(err) }
for _, region := range *regions { fmt.Println(region[0].Name) }