package paramount

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

Index

Functions

func Location

func Location(content_id string, intl bool) (string, error)

must use IP address for correct location

Types

type AppToken

type AppToken struct {
	Values url.Values
}

func (*AppToken) ComCbsApp

func (at *AppToken) ComCbsApp() error

15.0.28

func (*AppToken) ComCbsCa

func (at *AppToken) ComCbsCa() error

15.0.28

func (*AppToken) Item

func (at *AppToken) Item(content_id string) (*VideoItem, error)

must use app token and IP address for correct location

func (*AppToken) New

func (at *AppToken) New(app_secret string) error

func (*AppToken) Session

func (at *AppToken) Session(content_id string) (*SessionToken, error)

must use app token and IP address for US

type Number

type Number int64

func (Number) MarshalText

func (n Number) MarshalText() ([]byte, error)

func (*Number) UnmarshalText

func (n *Number) UnmarshalText(text []byte) error

type SessionToken

type SessionToken struct {
	LsSession string `json:"ls_session"`
	Url       string
}

func (*SessionToken) RequestHeader

func (s *SessionToken) RequestHeader() (http.Header, error)

func (*SessionToken) RequestUrl

func (s *SessionToken) RequestUrl() (string, bool)

func (SessionToken) UnwrapResponse

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

func (SessionToken) WrapRequest

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

type VideoItem

type VideoItem struct {
	AirDateIso  time.Time `json:"_airDateISO"`
	EpisodeNum  Number
	Label       string
	MediaType   string
	SeasonNum   Number
	SeriesTitle string
	Raw         []byte `json:"-"`
}

func (*VideoItem) Episode

func (v *VideoItem) Episode() int

func (*VideoItem) Season

func (v *VideoItem) Season() int

func (*VideoItem) Show

func (v *VideoItem) Show() string

func (*VideoItem) Title

func (v *VideoItem) Title() string

func (*VideoItem) Unmarshal

func (v *VideoItem) Unmarshal() error

func (*VideoItem) Year

func (v *VideoItem) Year() int