justwatch

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: OSL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Country_Codes

type Country_Codes map[string]struct{}

type Details

type Details struct {
	Data struct {
		URL struct {
			Node struct {
				Offers []struct {
					Monetization_Type string `json:"monetizationType"`
					Presentation_Type string `json:"presentationType"`
					Standard_Web_URL  string `json:"standardWebURL"`
				}
			}
		}
	}
}

I am including `presentationType` to differentiate the different options, but the data seems to be incorrect in some cases. For example, JustWatch reports this as SD: fetchtv.com.au/movie/details/19285 when the site itself reports as HD.

type Lang_Tag

type Lang_Tag struct {
	Href      string // fullPath
	Href_Lang string // country
}

func (Lang_Tag) Country_Code

func (t Lang_Tag) Country_Code() string

func (Lang_Tag) Language

func (t Lang_Tag) Language() string

func (Lang_Tag) Variables

func (t Lang_Tag) Variables() Variables

type Offers

type Offers map[string]map[string]Country_Codes

map[monetizationType]map[standardWebURL]Country_Codes

func (Offers) Add

func (o Offers) Add(country_code string, detail *Details)

func (Offers) Stream

func (o Offers) Stream() Offers

func (Offers) Text

func (o Offers) Text() (string, error)

lets match Variables type

type URLs

type URLs struct {
	Href_Lang_Tags []Lang_Tag
}

func New_URLs

func New_URLs(ref string) (*URLs, error)

type Variables

type Variables struct {
	Country_Code string `json:"country"`
	Full_Path    string `json:"fullPath"`
}

func (Variables) Details

func (v Variables) Details() (*Details, error)

func (Variables) Text

func (v Variables) Text() (string, error)

cant use encoding.TextMarshaler because we are JSON marshalling this

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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