Package roku (v1.11.4) [up] [repository]

Index

Types

type AccountActivation

type AccountActivation struct {
	Code string `json:"code"`
}

Functions

func CreateAccountActivation(token *AccountToken) (*AccountActivation, error)

Methods

func (*AccountActivation) CachePath() string
func (a *AccountActivation) String() string

type AccountToken

type AccountToken struct {
	AuthToken  string `json:"authToken"`
	IsLoggedIn bool   `json:"isLoggedIn"`
	Ip         string `json:"ip"`
	Rida       string `json:"rida"`
}

Functions

func GetAccountToken(status *ActivationStatus) (*AccountToken, error)

status can be nil

Methods

func (*AccountToken) CachePath() string

type ActivationStatus

type ActivationStatus struct {
	Code      string    `json:"code"`
	Token     string    `json:"token"`
	CreatedAt int64     `json:"createdAt"`
	Profiles  []Profile `json:"profiles"`
	Platform  string    `json:"platform"`
	Status    string    `json:"status"`
}

Functions

func GetActivationStatus(token *AccountToken, activation *AccountActivation) (*ActivationStatus, error)

Methods

func (*ActivationStatus) CachePath() string

type Drm

type Drm struct {
	Widevine Widevine `json:"widevine"`
}

type Playback

type Playback struct {
	Url         string // MPD
	Drm         Drm    `json:"drm"`
	MediaFormat string `json:"mediaFormat"`
	TraceId     string `json:"traceId"`
}

Functions

func GetPlayback(token *AccountToken, rokuId string) (*Playback, error)

Methods

func (*Playback) CachePath() string
func (p *Playback) LicenseWidevine(challenge []byte) ([]byte, error)

type Profile

type Profile struct {
	Id      string `json:"id"`
	IsKids  bool   `json:"isKids"`
	IsOwner bool   `json:"isOwner"`
}

type Widevine

type Widevine struct {
	LicenseServer string `json:"licenseServer"`
}