package roku

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

Index

Types

type AccountAuth

type AccountAuth struct {
	AuthToken string
	Raw       []byte `json:"-"`
}

func (*AccountAuth) Code

func (a *AccountAuth) Code() (*AccountCode, error)

func (*AccountAuth) New

func (a *AccountAuth) New(token *AccountToken) error

token can be nil

func (*AccountAuth) Playback

func (a *AccountAuth) Playback(roku_id string) (*Playback, error)

func (*AccountAuth) Token

func (a *AccountAuth) Token(code *AccountCode) (*AccountToken, error)

func (*AccountAuth) Unmarshal

func (a *AccountAuth) Unmarshal() error

type AccountCode

type AccountCode struct {
	Code string
	Raw  []byte `json:"-"`
}

func (*AccountCode) String

func (a *AccountCode) String() string

func (*AccountCode) Unmarshal

func (a *AccountCode) Unmarshal() error

type AccountToken

type AccountToken struct {
	Token string
	Raw   []byte `json:"-"`
}

func (*AccountToken) Unmarshal

func (a *AccountToken) Unmarshal() error

type HomeScreen

type HomeScreen struct {
	EpisodeNumber int       `json:",string"`
	ReleaseDate   time.Time // 2007-01-01T000000Z
	SeasonNumber  int       `json:",string"`
	Series        *struct {
		Title string
	}
	Title string
}

func (*HomeScreen) New

func (h *HomeScreen) New(id string) error

type Namer

type Namer struct {
	Home HomeScreen
}

func (Namer) Episode

func (n Namer) Episode() int

func (Namer) Season

func (n Namer) Season() int

func (Namer) Show

func (n Namer) Show() string

func (Namer) Title

func (n Namer) Title() string

func (Namer) Year

func (n Namer) Year() int

type Playback

type Playback struct {
	Drm struct {
		Widevine struct {
			LicenseServer string
		}
	}
	Url string
}

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)