package max

import "41.neocities.org/media/max"

Index

Types

type Address

type Address struct {
	EditId  string
	VideoId string
}

func (*Address) MarshalText

func (a *Address) MarshalText() ([]byte, error)

func (*Address) UnmarshalText

func (a *Address) UnmarshalText(text []byte) error

type BoltToken

type BoltToken struct {
	St string
}

func (*BoltToken) Initiate

func (b *BoltToken) Initiate() (*LinkInitiate, error)

func (*BoltToken) Login

func (b *BoltToken) Login() (*LinkLogin, error)

you must /authentication/linkDevice/initiate first or this will always fail

func (*BoltToken) New

func (b *BoltToken) New() error

type DefaultRoutes

type DefaultRoutes struct {
	Data struct {
		Attributes struct {
			Url Address
		}
	}
	Included []RouteInclude
}

func (*DefaultRoutes) Episode

func (d *DefaultRoutes) Episode() int

func (*DefaultRoutes) Season

func (d *DefaultRoutes) Season() int

func (*DefaultRoutes) Show

func (d *DefaultRoutes) Show() string

func (*DefaultRoutes) Title

func (d *DefaultRoutes) Title() string

func (*DefaultRoutes) Year

func (d *DefaultRoutes) Year() int

type LinkInitiate

type LinkInitiate struct {
	Data struct {
		Attributes struct {
			LinkingCode string
			TargetUrl   string
		}
	}
}

type LinkLogin

type LinkLogin struct {
	Raw   []byte
	State string
	// contains filtered or unexported fields
}

func (*LinkLogin) Playback

func (v *LinkLogin) Playback(web Address) (*Playback, error)

func (*LinkLogin) Routes

func (v *LinkLogin) Routes(web Address) (*DefaultRoutes, error)

func (*LinkLogin) Unmarshal

func (v *LinkLogin) Unmarshal() error

type Manifest

type Manifest struct {
	Url string
}

func (*Manifest) UnmarshalText

func (m *Manifest) UnmarshalText(text []byte) error

type Playback

type Playback struct {
	Drm struct {
		Schemes struct {
			Widevine struct {
				LicenseUrl string
			}
		}
	}
	Fallback struct {
		Manifest struct {
			Url Manifest
		}
	}
}

func (*Playback) RequestHeader

func (*Playback) RequestHeader() (http.Header, error)

func (*Playback) RequestUrl

func (p *Playback) RequestUrl() (string, bool)

func (*Playback) UnwrapResponse

func (*Playback) UnwrapResponse(b []byte) ([]byte, error)

func (*Playback) WrapRequest

func (*Playback) WrapRequest(b []byte) ([]byte, error)

type RouteInclude

type RouteInclude struct {
	Attributes struct {
		AirDate       time.Time
		Name          string
		EpisodeNumber int
		SeasonNumber  int
	}
	Id            string
	Relationships *struct {
		Show *struct {
			Data struct {
				Id string
			}
		}
	}
}