Documentation
¶
Overview ¶
Package gomdb is a golang implementation of the OMDB API.
Index ¶
Constants ¶
View Source
const ( MovieSearch = "movie" SeriesSearch = "series" EpisodeSearch = "episode" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovieResult ¶
type MovieResult struct {
Title string `json:"Title"`
Year string `json:"Year"`
Rated string `json:"Rated"`
Released string `json:"Released"`
Runtime string `json:"Runtime"`
Genre string `json:"Genre"`
Director string `json:"Director"`
Writer string `json:"Writer"`
Actors string `json:"Actors"`
Plot string `json:"Plot"`
Language string `json:"Language"`
Country string `json:"Country"`
Awards string `json:"Awards"`
Poster string `json:"Poster"`
Ratings []Ratings `json:"Ratings"`
Metascore string `json:"Metascore"`
ImdbRating string `json:"imdbRating"`
ImdbVotes string `json:"imdbVotes"`
ImdbID string `json:"imdbID"`
Type string `json:"Type"`
DVD string `json:"DVD"`
BoxOffice string `json:"BoxOffice"`
Production string `json:"Production"`
Website string `json:"Website"`
Response string `json:"Response"`
Error string `json:"Error"`
}
MovieResult is the result struct of an specific movie search
func (MovieResult) String ¶
func (mr MovieResult) String() string
Stringer Interface for MovieResult
type OmdbApi ¶
type OmdbApi struct {
// contains filtered or unexported fields
}
func (*OmdbApi) MovieByImdbID ¶
func (api *OmdbApi) MovieByImdbID(query *QueryData) (*MovieResult, error)
MovieByImdbID returns a MovieResult given a ImdbID ex:"tt2015381"
func (*OmdbApi) MovieByTitle ¶
func (api *OmdbApi) MovieByTitle(query *QueryData) (*MovieResult, error)
MovieByTitle returns a MovieResult given Title
type QueryData ¶
type QueryData struct {
Title string
Year string
ImdbId string
SearchType string
Season string
Episode string
}
QueryData is the type to create the search query
type SearchResponse ¶
type SearchResponse struct {
Search []SearchResult
Response string
Error string
// contains filtered or unexported fields
}
SearchResponse is the struct of the response in a search
type SearchResult ¶
SearchResult is the type for the search results
func (SearchResult) String ¶
func (sr SearchResult) String() string
Stringer Interface for SearchResult
Click to show internal directories.
Click to hide internal directories.