package amc
import "41.neocities.org/media/amc"
Index
Types
type Address
type Address struct {
Nid string
Path string
}
func (*Address) Set
func (a *Address) Set(s string) error
func (*Address) String
func (a *Address) String() string
type Authorization
type Authorization struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
Raw []byte `json:"-"`
}
func (*Authorization) Content
func (a *Authorization) Content(path string) (*ContentCompiler, error)
func (*Authorization) Login
func (a *Authorization) Login(email, password string) error
func (*Authorization) Playback
func (a *Authorization) Playback(nid string) (*Playback, error)
func (*Authorization) Refresh
func (a *Authorization) Refresh() error
func (*Authorization) Unauth
func (a *Authorization) Unauth() error
func (*Authorization) Unmarshal
func (a *Authorization) Unmarshal() error
type ContentCompiler
type ContentCompiler struct {
Children []struct {
Properties struct {
CurrentVideo CurrentVideo
}
Type string
}
}
func (*ContentCompiler) Video
func (c *ContentCompiler) Video() (*CurrentVideo, bool)
func (*ContentCompiler) VideoError
func (*ContentCompiler) VideoError() error
type CurrentVideo
type CurrentVideo struct {
Meta struct {
Airdate time.Time // 1996-01-01T00:00:00.000Z
EpisodeNumber int
Season int `json:",string"`
ShowTitle string
}
Text struct {
Title string
}
}
func (*CurrentVideo) Episode
func (c *CurrentVideo) Episode() int
func (*CurrentVideo) Season
func (c *CurrentVideo) Season() int
func (*CurrentVideo) Show
func (c *CurrentVideo) Show() string
func (*CurrentVideo) Title
func (c *CurrentVideo) Title() string
func (*CurrentVideo) Year
func (c *CurrentVideo) Year() int
type DataSource
type DataSource struct {
KeySystems *struct {
Widevine struct {
LicenseUrl string `json:"license_url"`
} `json:"com.widevine.alpha"`
} `json:"key_systems"`
Src string
Type string
}
type Playback
type Playback struct {
AmcnBcJwt string `json:"-"`
Data struct {
PlaybackJsonData struct {
Sources []DataSource
}
}
}
func (*Playback) Dash
func (p *Playback) Dash() (*DataSource, bool)
func (*Playback) DashError
func (*Playback) DashError() error
func (p *Playback) RequestHeader() (http.Header, error)
func (*Playback) RequestUrl
func (p *Playback) RequestUrl() (string, bool)
func (*Playback) UnwrapResponse
func (*Playback) UnwrapResponse(b []byte) ([]byte, error)
func (*Playback) WrapRequest
func (*Playback) WrapRequest(b []byte) ([]byte, error)