Package disney (v1.10.9) [up] [repository]

to change location you must log in again

Index

Functions

func GetEntity(link string) (string, error)

https://disneyplus.com/browse/entity-7df81cf5-6be5-4e05-9ff6-da33baf0b94d https://disneyplus.com/cs-cz/browse/entity-7df81cf5-6be5-4e05-9ff6-da33baf0b94d https://disneyplus.com/play/7df81cf5-6be5-4e05-9ff6-da33baf0b94d

Types

type Account

type Account struct {
	Extensions struct {
		Sdk struct {
			Token struct {
				AccessToken     string
				AccessTokenType string // Account
			}
		}
	}
}

Methods

func (a *Account) Page(entity string) (*Page, error)
func (a *Account) PlayReady(data []byte) ([]byte, error)

SL2000 720p SL3000 1080p

func (a *Account) Season(id string) (*Season, error)
func (a *Account) Stream(mediaId string) (*Stream, error)
func (a *Account) Widevine(data []byte) ([]byte, error)

L3 720p

type AccountWithoutActiveProfile

type AccountWithoutActiveProfile struct {
	Data struct {
		Login struct {
			Account struct {
				Profiles []struct {
					Id string
				}
			}
		}
	}
	Errors     []Error
	Extensions struct {
		Sdk struct {
			Token struct {
				AccessToken     string
				AccessTokenType string // AccountWithoutActiveProfile
			}
		}
	}
}

Methods

func (a *AccountWithoutActiveProfile) SwitchProfile() (*Account, error)

type Device

type Device struct {
	Token struct {
		AccessToken     string
		RefreshToken    string
		AccessTokenType string // Device
	}
}

Functions

func RegisterDevice() (*Device, error)

Methods

func (d *Device) Login(email, password string) (*AccountWithoutActiveProfile, error)

type Error

type Error struct {
	Code        string
	Description string
	Extensions  *struct {
		Code string
	}
	Message string
}

Methods

func (e *Error) Error() string

type Hls

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

type Page

type Page struct {
	Actions []struct {
		InternalTitle string // movie
	}
	Containers []struct {
		Seasons []struct {
			Visuals struct {
				Name string
			}
			Id string
		}
	}
}

Methods

func (p *Page) String() string

type Season

type Season struct {
	Items []struct {
		Actions []struct {
			InternalTitle string
		}
	}
}

Methods

func (s Season) String() string

type Stream

type Stream struct {
	Sources []struct {
		Complete struct {
			Url string
		}
	}
}

Methods

func (s *Stream) Hls() (*Hls, error)