package criterion
import "41.neocities.org/media/criterion"
Index
Types
type AuthToken
type AuthToken struct {
AccessToken string `json:"access_token"`
Raw []byte `json:"-"`
}
func (*AuthToken) Files
func (a *AuthToken) Files(item *EmbedItem) (VideoFiles, error)
func (*AuthToken) New
func (a *AuthToken) New(username, password string) error
func (*AuthToken) Unmarshal
func (a *AuthToken) Unmarshal() error
func (*AuthToken) Video
func (a *AuthToken) Video(slug string) (*EmbedItem, error)
type EmbedItem
type EmbedItem struct {
Links struct {
Files struct {
Href string
}
} `json:"_links"`
Metadata struct {
YearReleased int `json:"year_released"`
}
Name string
}
func (*EmbedItem) Episode
func (*EmbedItem) Episode() int
func (*EmbedItem) Season
func (*EmbedItem) Season() int
func (*EmbedItem) Show
func (*EmbedItem) Show() string
func (*EmbedItem) Title
func (e *EmbedItem) Title() string
func (*EmbedItem) Year
func (e *EmbedItem) Year() int
type VideoFile
type VideoFile struct {
DrmAuthorizationToken string `json:"drm_authorization_token"`
Links struct {
Source struct {
Href string
}
} `json:"_links"`
Method string
}
func (*VideoFile) RequestHeader() (http.Header, error)
func (*VideoFile) RequestUrl
func (v *VideoFile) RequestUrl() (string, bool)
func (*VideoFile) UnwrapResponse
func (*VideoFile) UnwrapResponse(b []byte) ([]byte, error)
func (*VideoFile) WrapRequest
func (*VideoFile) WrapRequest(b []byte) ([]byte, error)
type VideoFiles
type VideoFiles []VideoFile
func (VideoFiles) Dash
func (v VideoFiles) Dash() (*VideoFile, bool)
func (*VideoFiles) DashError
func (*VideoFiles) DashError() error