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

Index

Variables

var Language = "EN"

Types

type Account

type Account struct {
	AccessToken  string `json:"access_token"`
	AccountId    string `json:"account_id"`
	RefreshToken string `json:"refresh_token"`
}

Functions

func Login(username, password string) (*Account, error)

Methods

func (a *Account) FetchProfiles() ([]*Profile, error)
func (a *Account) FetchSubscriptions() ([]Subscription, error)
func (a *Account) Login(profileId string) error

699710369328da351ac33c63

type ContentPackage

type ContentPackage struct {
	Id            int
	DestinationId int
}

Methods

func (c *ContentPackage) LicensePlayReady(contentId int, accessToken string, payload []byte) ([]byte, error)

SL2000 max 2160p

func (c *ContentPackage) LicenseWidevine(contentId int, accessToken string, payload []byte) ([]byte, error)

L3 max 720p

func (c *ContentPackage) ManifestPlayReady(contentId int, accessToken string) (*Manifest, error)
func (c *ContentPackage) ManifestWidevine(contentId int, accessToken string) (*Manifest, error)

type Dash

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

type Manifest

type Manifest struct {
	Message  string
	Playback string
}

Methods

func (m *Manifest) FetchDash() (*Dash, error)

type Media

type Media struct {
	FirstContent struct {
		Id int `json:"id,string"`
	}
	Id int `json:"id,string"`
}

Functions

func FetchMedia(id int) (*Media, error)
func ParseMedia(rawUrl string) (*Media, error)

Methods

func (m *Media) FetchContentPackage() (*ContentPackage, error)

type Profile

type Profile struct {
	Nickname string `json:"nickname"`
	HasPin   bool   `json:"hasPin"`
	Master   bool
	Maturity string
	Id       string `json:"id"`
}

Methods

func (p *Profile) String() string

type Subscription

type Subscription struct {
	Experience struct {
		DisplayName string
	}
	ExpirationDate string
}

Methods

func (s *Subscription) String() string