series

package
v0.0.0-...-d25a9c8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: GPL-3.0, GPL-3.0-only Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Episode

type Episode struct {
	ImdbID      string
	Title       string
	Description string
	Runtime     int
	Season      int
	Episode     int
	Aired       time.Time
}

func GetEpisodes

func GetEpisodes(imdbID string) ([]Episode, error)

type EpisodeResult

type EpisodeResult struct {
	ID       int       `json:"id"`
	URL      string    `json:"url"`
	Name     string    `json:"name"`
	Season   int       `json:"season"`
	Number   int       `json:"number"`
	Type     string    `json:"type"`
	Airdate  string    `json:"airdate"`
	Airtime  string    `json:"airtime"`
	Airstamp time.Time `json:"airstamp"`
	Runtime  int       `json:"runtime"`
	Image    struct {
		Medium   string `json:"medium"`
		Original string `json:"original"`
	} `json:"image"`
	Summary string `json:"summary"`
	Links   struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
	} `json:"_links"`
}

type EpisodeResults

type EpisodeResults []EpisodeResult

type ErrImdbIDNotFound

type ErrImdbIDNotFound struct {
	ImdbID string
	Agent  string
}

func (ErrImdbIDNotFound) Error

func (e ErrImdbIDNotFound) Error() string

type SeriesAPI

type SeriesAPI interface {
	GetEpisodes(imdbID string) ([]Episode, error)
}

type TVMaze

type TVMaze struct{}

func (*TVMaze) GetEpisodes

func (t *TVMaze) GetEpisodes(imdbID string) ([]Episode, error)

type TVMazeShowResult

type TVMazeShowResult struct {
	ID             int      `json:"id"`
	URL            string   `json:"url"`
	Name           string   `json:"name"`
	Type           string   `json:"type"`
	Language       string   `json:"language"`
	Genres         []string `json:"genres"`
	Status         string   `json:"status"`
	Runtime        int      `json:"runtime"`
	AverageRuntime int      `json:"averageRuntime"`
	Premiered      string   `json:"premiered"`
	OfficialSite   string   `json:"officialSite"`
	Schedule       struct {
		Time string   `json:"time"`
		Days []string `json:"days"`
	} `json:"schedule"`
	Rating struct {
		Average float64 `json:"average"`
	} `json:"rating"`
	Weight  int `json:"weight"`
	Network struct {
		ID      int    `json:"id"`
		Name    string `json:"name"`
		Country struct {
			Name     string `json:"name"`
			Code     string `json:"code"`
			Timezone string `json:"timezone"`
		} `json:"country"`
	} `json:"network"`
	WebChannel interface{} `json:"webChannel"`
	DvdCountry interface{} `json:"dvdCountry"`
	Externals  struct {
		Tvrage  int    `json:"tvrage"`
		Thetvdb int    `json:"thetvdb"`
		Imdb    string `json:"imdb"`
	} `json:"externals"`
	Image struct {
		Medium   string `json:"medium"`
		Original string `json:"original"`
	} `json:"image"`
	Summary string `json:"summary"`
	Updated int    `json:"updated"`
	Links   struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
		Previousepisode struct {
			Href string `json:"href"`
		} `json:"previousepisode"`
	} `json:"_links"`
}

Jump to

Keyboard shortcuts

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