Package molotov (v1.11.1) [up] [repository]

Index

Types

type Asset

type Asset struct {
	Drm struct {
		Token string
	}
	Error  *Error
	Stream struct {
		Url string // MPD
	}
}

Methods

func (a *Asset) Dash() (*Dash, error)
func (a *Asset) Widevine(data []byte) ([]byte, error)

type Dash

type Dash struct {
	Body []byte
	Url  *url.URL
}

type Error

type Error struct {
	DeveloperMessage string `json:"developer_message"`
	UserMessage      string `json:"user_message"`
}

Methods

func (e *Error) Error() string

type Login

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

Functions

func FetchLogin(email, password string) (*Login, error)

Methods

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

type Program struct {
	Actions struct {
		Play *struct {
			Url string // fapi.molotov.tv/v2/me/assets
		}
	}
}

Methods

func (p Program) Asset(accessToken string) (*Asset, error)

type Url

type Url struct {
	Program int
	Channel int
}

Functions

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

Methods

func (u *Url) FetchProgram(accessToken string) (*Program, error)