omdb

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OMDB_URL                    = "http://www.omdbapi.com/"
	OMDB_IMDB_SOURCE            = "Internet Movie Database"
	OMDB_METACRITIC_SOURCE      = "Metacritic"
	OMDB_ROTTEN_TOMATOES_SOURCE = "Rotten Tomatoes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *viper.Viper, logger *zerolog.Logger, restyClient *resty.Client) *Client

func (*Client) GetMovieById

func (c *Client) GetMovieById(imdbId string, params map[string]string) (*Result, error)

func (*Client) GetMovieByTitle

func (c *Client) GetMovieByTitle(title string, params map[string]string) (*Result, error)

func (*Client) GetSeriesById

func (c *Client) GetSeriesById(imdbId string, params map[string]string) (*Result, error)

func (*Client) GetSeriesByTitle

func (c *Client) GetSeriesByTitle(title string, params map[string]string) (*Result, error)

func (*Client) SearchMovieByTitle

func (c *Client) SearchMovieByTitle(title string, params map[string]string) (*SearchResponse, error)

func (*Client) SearchSeriesByTitle

func (c *Client) SearchSeriesByTitle(title string, params map[string]string) (*SearchResponse, error)

type Rating

type Rating struct {
	Source string
	Value  string
}

type Result

type Result struct {
	Title      string
	Year       string
	Rated      string
	Released   string
	Runtime    string
	Genre      string
	Language   string
	Director   string
	Writer     string
	Actors     string
	Plot       string
	Country    string
	Awards     string
	Poster     string
	Ratings    []Rating
	Metascore  string
	ImdbRating string
	ImdbVotes  string
	ImdbID     string
	Type       string
	BoxOffice  string
	Production string
	Website    string
	Response   string
	Error      string
}

type SearchResponse

type SearchResponse struct {
	Search       []SearchResult
	Response     string
	Error        string
	TotalResults string
}

type SearchResult

type SearchResult struct {
	Title  string
	Year   string
	ImdbID string
	Type   string
	Poster string
}

Jump to

Keyboard shortcuts

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