type Asset struct { Drm struct { Token string } Error *Error Stream struct { Url string // MPD } }
func (a *Asset) Dash() (*Dash, error)
func (a *Asset) Widevine(data []byte) ([]byte, error)
type Dash struct { Body []byte Url *url.URL }
type Error struct { DeveloperMessage string `json:"developer_message"` UserMessage string `json:"user_message"` }
func (e *Error) Error() string
type Login struct { Auth struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` } }
func FetchLogin(email, password string) (*Login, 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 Program struct { Actions struct { Play *struct { Url string // fapi.molotov.tv/v2/me/assets } } }
func (p Program) Asset(accessToken string) (*Asset, error)
type Url struct { Program int Channel int }
func ParseUrl(data string) (*Url, error)
https://molotov.tv/fr_fr/p/15301-2328 https://molotov.tv/fr_fr/p/15301-2328/closer-entre-adultes-consentants
func (u *Url) FetchProgram(accessToken string) (*Program, error)