type Asset struct { Drm struct { Token string } Error *AssetError Stream struct { Url string // MPD } }
func (a *Asset) Dash() (*Dash, error)
func (a *Asset) Widevine(data []byte) ([]byte, error)
type AssetError struct { DeveloperMessage string `json:"developer_message"` UserMessage string `json:"user_message"` }
func (a *AssetError) Error() string
type Dash struct { Body []byte Url *url.URL }
type Login struct { Auth struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` } }
func (l *Login) Asset(view *ProgramView) (*Asset, error)
func (l *Login) Fetch(email, password string) error
func (l *Login) ProgramView(rosso *MediaId) (*ProgramView, error)
func (l *Login) Refresh() error
authorization server issues a new refresh token, in which case the client MUST discard the old refresh token and replace it with the new refresh token
type MediaId struct { Program int Channel int }
func (m *MediaId) Parse(link string) error
Parse extracts the IDs from a Molotov URL and populates the MediaId struct. It maps the first number in the URL to Program and the second to Channel.
type ProgramView struct { Program struct { Actions struct { Play *struct { Url string // fapi.molotov.tv/v2/me/assets } } } }