api154.pages.dev/api/justwatch Index | Files | Directories

package justwatch

import "154.pages.dev/api/justwatch"

Index

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

Source Files

justwatch.go offers.go

Directories

PathSynopsis
justwatch/justwatch
Version
v1.1.9 (latest)
Published
Jul 10, 2023
Platform
linux/amd64
Imports
7 packages
Last checked
2 weeks ago

Tools for package owners.