omdb

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrItemNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg *Config) *Client

func (*Client) GetItem

func (c *Client) GetItem(imdbId string) (*Item, error)

type Config

type Config struct {
	ApiKey string `yaml:"api_key"`

	Verbosity string `yaml:"verbosity,omitempty"`
}

type Item

type Item struct {
	Metascore      int     `json:"Metascore,omitempty"`
	RottenTomatoes int     `json:"RottenTomatoes,omitempty"`
	ImdbRating     float64 `json:"ImdbRating,omitempty"`
	ImdbVotes      int     `json:"ImdbVotes,omitempty"`
	Language       string  `json:"Language,omitempty"`
	Country        string  `json:"Country,omitempty"`
	Rated          string  `json:"Rated,omitempty"`
}

Jump to

Keyboard shortcuts

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