provider

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: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RSS   = "rss"
	IMDB  = "imdb"
	TRAKT = "trakt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ListConfig

type ListConfig struct {
	Url     string
	Type    ListType
	GuessIt bool
	Filter  ListFilter
}

type ListFilter

type ListFilter struct {
	Limit    int
	Exclude  []string
	Revision []string
}

type ListItem

type ListItem struct {
	Title        string
	Year         int
	Imdb         string
	Tmdb         int
	ImdbVotes    int
	Genre        []string
	Language     []string
	Runtime      int
	Ratings      Ratings
	CountRatings int
}

type ListProvider

type ListProvider interface {
	GetItems(config ListConfig) ([]ListItem, error)
}

type ListType

type ListType string

type Ratings

type Ratings struct {
	RottenTomatoes int
	Imdb           float64
	Metacritic     int
}

type Registry

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

func NewProviderRegistry

func NewProviderRegistry() *Registry

func (*Registry) GetProvider

func (r *Registry) GetProvider(listType ListType) (provider ListProvider, ok bool)

func (*Registry) RegisterProvider

func (r *Registry) RegisterProvider(listType ListType, provider ListProvider)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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