Documentation ¶
Overview ¶
Package everyman provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.2 DO NOT EDIT.
Index ¶
- Constants
- func NewCinemasRequest(server string) (*http.Request, error)
- func NewFilmsRequest(server string, cinemaID int) (*http.Request, error)
- type Cinema
- type CinemasResponse
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Film
- type FilmExperience
- type FilmMediaItems
- type FilmSession
- type FilmSessionTime
- type FilmsResponse
- type HttpRequestDoer
- type RequestEditorFn
Constants ¶
const ( // BaseAPIURL is the URL for the Everyman Cinema API. BaseAPIURL = "https://movieeverymanapi.peachdigital.com" // BaseWebURL is the URL for the Everyman Cinema website. BaseWebURL = "https://everymancinema.com" )
Variables ¶
This section is empty.
Functions ¶
func NewCinemasRequest ¶
NewCinemasRequest generates requests for Cinemas
Types ¶
type Cinema ¶
type Cinema struct { CinemaFilmUrl *string `json:"CinemaFilmUrl,omitempty"` CinemaId int `json:"CinemaId"` CinemaName string `json:"CinemaName"` CinemaUrl *string `json:"CinemaUrl,omitempty"` }
Cinema defines model for Cinema.
type CinemasResponse ¶
func ParseCinemasResponse ¶
func ParseCinemasResponse(rsp *http.Response) (*CinemasResponse, error)
ParseCinemasResponse parses an HTTP response from a CinemasWithResponse call
func (CinemasResponse) Status ¶
func (r CinemasResponse) Status() string
Status returns HTTPResponse.Status
func (CinemasResponse) StatusCode ¶
func (r CinemasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
type ClientInterface ¶
type ClientInterface interface { // Cinemas request Cinemas(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // Films request Films(ctx context.Context, cinemaID int, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CinemasWithResponse ¶
func (c *ClientWithResponses) CinemasWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CinemasResponse, error)
CinemasWithResponse request returning *CinemasResponse
func (*ClientWithResponses) FilmsWithResponse ¶
func (c *ClientWithResponses) FilmsWithResponse(ctx context.Context, cinemaID int, reqEditors ...RequestEditorFn) (*FilmsResponse, error)
FilmsWithResponse request returning *FilmsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // Cinemas request CinemasWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CinemasResponse, error) // Films request FilmsWithResponse(ctx context.Context, cinemaID int, reqEditors ...RequestEditorFn) (*FilmsResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Film ¶
type Film struct { Cast string `json:"Cast"` Cert string `json:"Cert"` Director string `json:"Director"` Experiences []FilmExperience `json:"Experiences"` FilmId int `json:"FilmId"` FriendlyName string `json:"FriendlyName"` Img *string `json:"Img,omitempty"` MediaItems FilmMediaItems `json:"MediaItems"` Order int `json:"Order"` ReleaseDate string `json:"ReleaseDate"` RunTime string `json:"RunTime"` Sessions []FilmSession `json:"Sessions"` Synopsis string `json:"Synopsis"` Title string `json:"Title"` Trailer *string `json:"Trailer,omitempty"` }
Film defines model for Film.
type FilmExperience ¶
type FilmExperience struct { Description string `json:"Description"` ExternalId string `json:"ExternalId"` Id string `json:"Id"` Name string `json:"Name"` }
FilmExperience defines model for FilmExperience.
type FilmMediaItems ¶
type FilmMediaItems struct { OneSheet *string `json:"OneSheet,omitempty"` QuadStill string `json:"QuadStill"` Trailer *string `json:"Trailer,omitempty"` YouTubeTrailer *string `json:"YouTubeTrailer,omitempty"` }
FilmMediaItems defines model for FilmMediaItems.
type FilmSession ¶
type FilmSession struct { ActualDate string `json:"ActualDate"` ActualDisplayDate string `json:"ActualDisplayDate"` Date string `json:"Date"` DisplayDate string `json:"DisplayDate"` FirstSession string `json:"FirstSession"` NewDate openapi_types.Date `json:"NewDate"` Times []FilmSessionTime `json:"Times"` }
FilmSession defines model for FilmSession.
type FilmSessionTime ¶
type FilmSessionTime struct {
Definitions *interface{} `json:"definitions,omitempty"`
}
FilmSessionTime defines model for FilmSessionTime.
type FilmsResponse ¶
func ParseFilmsResponse ¶
func ParseFilmsResponse(rsp *http.Response) (*FilmsResponse, error)
ParseFilmsResponse parses an HTTP response from a FilmsWithResponse call
func (FilmsResponse) Status ¶
func (r FilmsResponse) Status() string
Status returns HTTPResponse.Status
func (FilmsResponse) StatusCode ¶
func (r FilmsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.