spiderdata

package
v0.0.0-...-7c7d171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cinema

type Cinema struct {
	Name      string    `json:"name"`
	URL       string    `json:"url"`
	Chain     string    `json:"chain"` // e.g. "Epic Cinemas"
	ShortName string    `json:"short_name"`
	Acquired  time.Time `json:"acquired"`
}

Cinema represents a single cinema (the building)

type Film

type Film struct {
	ID              string       `json:"id"`
	ImdbID          *int         `json:"imdb_id"`
	ImdbIDCertainty float32      `json:"imdb_id_certainty"`
	Title           string       `json:"title"`
	Year            int          `json:"year"`
	URL             string       `json:"url"`
	Screenings      []*Screening `json:"screenings"`
	Rating          string       `json:"rating"`
	Acquired        time.Time    `json:"acquired"`
}

Film represents a film as seen in the cinema (different versions, e.g. 3D, IMAX, 70mm etc are separate films)

type Request

type Request struct {
	Cinemas []*Cinema `json:"cinemas"`
	Films   []*Film   `json:"films"`
}

Request contains all data given in a single request from a spider to the filling server

type Screening

type Screening struct {
	ID              string        `json:"id"`
	CinemaShortName string        `json:"cinema_short_name"`
	Hall            string        `json:"hall"`
	Time            time.Time     `json:"time"`
	Tickets         []*Ticket     `json:"tickets"`
	Active          bool          `json:"active"`
	IsSubtitled     bool          `json:"is_subtitled"`
	IsDubbed        bool          `json:"is_dubbed"`
	Is3D            bool          `json:"is_3d"`
	Is4D            bool          `json:"is_4d"`
	IsImax          bool          `json:"is_imax"`
	Language        string        `json:"language"`
	Variant         string        `json:"variant"`
	Duration        time.Duration `json:"duration"`
	Acquired        time.Time     `json:"acquired"`
}

Screening is a performance of a film in a particular cinema at a particular time

type Ticket

type Ticket struct {
	BookingURL string    `json:"booking_url"`
	Price      float32   `json:"price"`
	Currency   string    `json:"currency"`
	Type       string    `json:"type"` // e.g. "elderly", "student", "regular"
	Acquired   time.Time `json:"acquired"`
}

Ticket is a ticket for a single performance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL