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

Index

Functions

func GetEntity(urlData 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

func RefreshToken(refresh *Token) error

expires: 4 hours request: Account

Types

type AuthenticateWithOtp

type AuthenticateWithOtp struct {
	ActionGrant string
}

type Error

type Error struct {
	Code        string // 2026-04-05
	Description string // 2026-04-05
}

Methods

func (e *Error) Error() string

type Hls

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

type Login

type Login struct {
	Account struct {
		Profiles []Profile
	}
}

type LoginWithActionGrant

type LoginWithActionGrant struct {
	Account struct {
		Profiles []Profile
	}
}

type Page

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

Methods

func (p *Page) String() string

type Profile

type Profile struct {
	Name string
	Id   string
}

Methods

func (p *Profile) String() string

type RequestOtp

type RequestOtp struct {
	Accepted bool
}

Methods

func (r *RequestOtp) 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)

type Token

type Token struct {
	AccessTokenType string
	AccessToken     string
	RefreshToken    string
}

Functions

func RegisterDevice() (*Token, error)

Response: Device

Methods

func (t *Token) AuthenticateWithOtp(email, passcode string) (*AuthenticateWithOtp, error)

request: Device

func (t *Token) Login(email, password string) (*Login, error)

request: Device response: AccountWithoutActiveProfile

func (t *Token) LoginWithActionGrant(actionGrant string) (*LoginWithActionGrant, error)

request: Device response: AccountWithoutActiveProfile

func (t *Token) Page(entity string) (*Page, error)

request: Account

func (t *Token) PlayReady(body []byte) ([]byte, error)

SL2000: 720p SL3000: 2160p request: Account

func (t *Token) RequestOtp(email string) (*RequestOtp, error)

request: Device

func (t *Token) Season(id string) (*Season, error)

request: Account

func (t *Token) Stream(mediaId string) (*Stream, error)

request: Account

func (t *Token) String() string
func (t *Token) SwitchProfile(profileId string) error

THIS REQUEST SETS THE LOCATION BASED ON YOUR IP request: AccountWithoutActiveProfile response: Account

func (t *Token) Widevine(body []byte) ([]byte, error)

L1: 2160p L3: 720p request: Account