Package kanopy (v1.11.4) [up] [repository]

Index

Functions

func CreateLicense(loginData *Login, manifestData *Manifest, challenge []byte) ([]byte, error)

Types

type Caption

type Caption struct {
	Language string `json:"language"`
	Files    []File `json:"files"`
	Label    string `json:"label"`
}

type File

type File struct {
	Type string `json:"type"`
	Url  string
}

type Login

type Login struct {
	Jwt               string `json:"jwt"`
	VisitorId         string `json:"visitorId"`
	UserId            int    `json:"userId"`
	KanopyKidsEnabled bool   `json:"kanopyKidsEnabled"`
	WebshopId         int    `json:"webshopId"`
	WebshopCode       string `json:"webshopCode"`
	UserRole          string `json:"userRole"`
}

Functions

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

Methods

func (*Login) CachePath() string

type Manifest

type Manifest struct {
	Url            *Url
	ManifestType   string `json:"manifestType"`
	DrmType        string `json:"drmType"`
	StorageService string `json:"storageService"`
	Cdn            string `json:"cdn"`
	DrmLicenseId   string `json:"drmLicenseID"`
}

Methods

func (*Manifest) CachePath() string

type Membership

type Membership struct {
	IdentityId         int    `json:"identityId"`
	DomainId           int    `json:"domainId"`
	UserId             int    `json:"userId"`
	Status             string `json:"status"`
	IsDefault          bool   `json:"isDefault"`
	Sitename           string `json:"sitename"`
	Subdomain          string `json:"subdomain"`
	TicketsAvailable   int    `json:"ticketsAvailable"`
	MaxTicketsPerMonth int    `json:"maxTicketsPerMonth"`
}

Functions

func GetMemberships(loginData *Login) ([]Membership, error)

type PlayRequest

type PlayRequest struct {
	DomainId int `json:"domainId"`
	UserId   int `json:"userId"`
	VideoId  int `json:"videoId"`
}

type PlayResponse

type PlayResponse struct {
	Captions  []Caption
	Manifests []Manifest
	PlayId    string
}

Functions

func CreatePlay(loginData *Login, membershipData *Membership, videoData *Video) (*PlayResponse, error)

Methods

func (p *PlayResponse) GetDash() (*Manifest, error)

type Url

type Url struct {
	Url url.URL
}

Methods

func (u *Url) MarshalText() ([]byte, error)
func (u *Url) UnmarshalText(text []byte) error

type Video

type Video struct {
	VideoId         int    `json:"videoId"`
	Title           string `json:"title"`
	DescriptionHtml string `json:"descriptionHtml"`
	DurationSeconds int    `json:"durationSeconds"`
	Alias           string `json:"alias"`
}

Functions

func GetVideo(loginData *Login, alias string) (*Video, error)
func ParseVideo(rawUrl string) (*Video, error)

https://kanopy.com/product/6440418 https://kanopy.com/en/product/6440418 https://kanopy.com/video/6440418 https://kanopy.com/en/irving/product/6440418 https://kanopy.com/en/irving/product/genius-party https://kanopy.com/en/irving/video/6440418 https://kanopy.com/en/irving/video/genius-party https://kanopy.com/en/irving/video/justwatch-6440418 https://kanopy.com/en/product/genius-party https://kanopy.com/en/video/6440418 https://kanopy.com/en/video/genius-party https://kanopy.com/en/video/justwatch-6440418 https://kanopy.com/irving/product/6440418 https://kanopy.com/irving/product/genius-party https://kanopy.com/irving/video/6440418 https://kanopy.com/irving/video/genius-party https://kanopy.com/irving/video/justwatch-6440418 https://kanopy.com/product/genius-party https://kanopy.com/product/justwatch-6440418 https://kanopy.com/video/genius-party https://kanopy.com/video/justwatch-6440418