imdbtools

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicTsvId             = "tconst"
	BasicTsvType           = "titleType"
	BasicTsvPrimaryTitle   = "primaryTitle"
	BasicTsvOriginalTitle  = "originalTitle"
	BasicTsvIsAdult        = "isAdult"
	BasicTsvStartYear      = "startYear"
	BasicTsvEndYear        = "endYear"
	BasicTsvRuntimeMinutes = "runtimeMinutes"
	BasicTsvGenres         = "genres"
)

Variables

This section is empty.

Functions

func UnmarshalImdbMetadata

func UnmarshalImdbMetadata(data []byte, meta *ImdbMetadata) error

Types

type ImdbAggregateRating

type ImdbAggregateRating struct {
	Type        string `json:"@type"`
	RatingCount int    `json:"ratingCount"`
	BestRating  string `json:"bestRating"`
	WorstRating string `json:"worstRating"`
	RatingValue string `json:"ratingValue"`
}

type ImdbBasicsTitleTsvEntry

type ImdbBasicsTitleTsvEntry struct {
	Id             string // tconst
	Type           string // titleType
	PrimaryTitle   string // primaryTitle
	OriginalTitle  string // originalTitle
	IsAdult        bool   // isAdult
	StartYear      int    // startYear
	EndYear        int    // endYear
	RuntimeMinutes int    // runtimeMinutes
	Genres         string // genres
}

type ImdbMetadata

type ImdbMetadata struct {
	Context string `json:"@context"`
	Type    string `json:"@type"`
	Url     string `json:"url"`
	Name    string `json:"name"`
	Image   string `json:"image"`
	//Genre           []string             `json:"genre"`
	ContentRating string `json:"contentRating"`
	//Actor           []ImdbMetadataEntity `json:"actor"`
	//Director        ImdbMetadataEntity   `json:"director"`
	//Creator         []ImdbMetadataEntity `json:"creator"`
	Description     string              `json:"description"`
	DatePublished   string              `json:"datePublished"`
	Keywords        string              `json:"keywords"`
	AggregateRating ImdbAggregateRating `json:"aggregateRating"`
}

func GetImdbMetadata

func GetImdbMetadata(titleId string) (ImdbMetadata, error)

type ImdbMetadataEntity

type ImdbMetadataEntity struct {
	Type string `json:"@type"`
	Url  string `json:"url"`
	Name string `json:"name"`
}

type ImdbTsvParser

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

func NewImdbTsvParser

func NewImdbTsvParser(reader io.Reader) ImdbTsvParser

func (*ImdbTsvParser) GetReadBytesSize

func (i *ImdbTsvParser) GetReadBytesSize() int64

func (*ImdbTsvParser) ReadBasicsTitleEntry

func (i *ImdbTsvParser) ReadBasicsTitleEntry() (ImdbBasicsTitleTsvEntry, error)

func (*ImdbTsvParser) Reset

func (i *ImdbTsvParser) Reset() bool

Jump to

Keyboard shortcuts

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