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

Index

Functions

func FetchFilesHref(accessToken, slug string) (*url.URL, error)

Types

type File

type File struct {
	DrmAuthorizationToken string `json:"drm_authorization_token"`
	Links                 struct {
		Source struct {
			Href *Url // MPD
		}
	} `json:"_links"`
	Method string
}

Functions

func FetchFiles(accessToken string, files *url.URL) ([]File, error)
func GetDash(files []File) (*File, error)

Methods

func (*File) CachePath() string
func (f *File) FetchWidevine(body []byte) ([]byte, error)

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

Functions

func FetchToken(username, password string) (*Token, error)

Methods

func (*Token) CachePath() string
func (t *Token) Refresh() error

type Url

type Url struct {
	Url url.URL
}

Methods

func (u *Url) MarshalText() ([]byte, error)
func (u *Url) UnmarshalText(text []byte) error