package draken

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

Index

Types

type AuthLogin

type AuthLogin struct {
	Token string
	Raw   []byte `json:"-"`
}

func (*AuthLogin) Entitlement

func (a *AuthLogin) Entitlement(movie *FullMovie) (*Entitlement, error)

func (*AuthLogin) New

func (a *AuthLogin) New(identity, key string) error

func (*AuthLogin) Playback

func (a *AuthLogin) Playback(
	movie *FullMovie, title *Entitlement,
) (*Playback, error)

func (*AuthLogin) Unmarshal

func (a *AuthLogin) Unmarshal() error

type Entitlement

type Entitlement struct {
	Token string
}

type FullMovie

type FullMovie struct {
	DefaultPlayable struct {
		Id string
	}
	ProductionYear int `json:",string"`
	Title          string
}

func (*FullMovie) New

func (f *FullMovie) New(custom_id string) error

type Namer

type Namer struct {
	Movie *FullMovie
}

func (Namer) Episode

func (Namer) Episode() int

func (Namer) Season

func (Namer) Season() int

func (Namer) Show

func (Namer) Show() string

func (Namer) Title

func (n Namer) Title() string

func (Namer) Year

func (n Namer) Year() int

type Playback

type Playback struct {
	Headers  map[string]string
	Playlist string
}

type Poster

type Poster struct {
	Login *AuthLogin
	Play  *Playback
}

func (*Poster) RequestHeader

func (p *Poster) RequestHeader() (http.Header, error)

func (*Poster) RequestUrl

func (*Poster) RequestUrl() (string, bool)

func (*Poster) UnwrapResponse

func (*Poster) UnwrapResponse(b []byte) ([]byte, error)

func (*Poster) WrapRequest

func (*Poster) WrapRequest(b []byte) ([]byte, error)