type Dash struct { Body []byte Url *url.URL }
type File struct { DrmAuthorizationToken string `json:"drm_authorization_token"` Links struct { Source struct { Href string // MPD } } `json:"_links"` Method string }
func (f *File) FetchDash() (*Dash, error)
func (f *File) FetchWidevine(data []byte) ([]byte, error)
type Files []File
func (f Files) GetDash() (*File, error)
type Item struct { Links struct { Files struct { Href string // https://api.vhx.tv/videos/3460957/files } } `json:"_links"` }
type Token struct { AccessToken string `json:"access_token"` Error string ErrorDescription string `json:"error_description"` RefreshToken string `json:"refresh_token"` }
func FetchToken(username, password string) (*Token, error)
func (t *Token) AsError() error
AsError returns a standard Go error if the token response was an error, otherwise it returns nil.
func (t *Token) FetchFiles(filesHref string) (Files, error)
func (t *Token) FetchItem(slug string) (*Item, error)
func (t *Token) Refresh() error