package hulu

import "41.neocities.org/media/hulu"

Index

Types

type Authenticate

type Authenticate struct {
	UserToken string `json:"user_token"`
	Raw       []byte `json:"-"`
}
func (a *Authenticate) DeepLink(id *EntityId) (*DeepLink, error)

func (*Authenticate) Details

func (a *Authenticate) Details(link *DeepLink) (*Details, error)

func (*Authenticate) New

func (a *Authenticate) New(email, password string) error

func (*Authenticate) Playlist

func (a *Authenticate) Playlist(link *DeepLink) (*Playlist, error)

func (*Authenticate) Unmarshal

func (a *Authenticate) Unmarshal() error
type DeepLink struct {
	EabId string `json:"eab_id"`
}

type Details

type Details struct {
	EpisodeName   string `json:"episode_name"`
	EpisodeNumber int    `json:"episode_number"`
	Headline      string
	PremiereDate  time.Time `json:"premiere_date"`
	SeasonNumber  int       `json:"season_number"`
	SeriesName    string    `json:"series_name"`
}

func (*Details) Episode

func (d *Details) Episode() int

func (*Details) Season

func (d *Details) Season() int

func (*Details) Show

func (d *Details) Show() string

func (*Details) Title

func (d *Details) Title() string

func (*Details) Year

func (d *Details) Year() int

type EntityId

type EntityId struct {
	// contains filtered or unexported fields
}

func (*EntityId) Set

func (e *EntityId) Set(s string) error

hulu.com/watch/023c49bf-6a99-4c67-851c-4c9e7609cc1d

func (*EntityId) String

func (e *EntityId) String() string

type Playlist

type Playlist struct {
	StreamUrl string `json:"stream_url"`
	WvServer  string `json:"wv_server"`
}

func (Playlist) RequestHeader

func (Playlist) RequestHeader() (http.Header, error)

func (*Playlist) RequestUrl

func (p *Playlist) RequestUrl() (string, bool)

func (Playlist) UnwrapResponse

func (Playlist) UnwrapResponse(b []byte) ([]byte, error)

func (Playlist) WrapRequest

func (Playlist) WrapRequest(b []byte) ([]byte, error)