Package rakuten (v1.11.4) [up] [repository]

Index

Types

type Address

type Address struct {
	MarketCode  string
	ContentType string
	ContentId   string
}

Functions

func ParseAddress(targetUrl string) (*Address, error)

Methods

func (*Address) CachePath() string
func (a *Address) IsMovie() bool
func (a *Address) IsTvShow() bool

type Classification

type Classification struct {
	NumericalId int `json:"numerical_id"`
}

type DeviceMetadata

type DeviceMetadata struct {
	AppVersion   string `json:"app_version"`
	Brand        string `json:"brand"`
	Model        string `json:"model"`
	Os           string `json:"os"`
	SerialNumber string `json:"serial_number"`
	Uid          string `json:"uid"`
	Year         int    `json:"year"`
}

type Episode

type Episode struct {
	Id          string      `json:"id"`
	Title       string      `json:"title"`
	ViewOptions ViewOptions `json:"view_options"`
}

Methods

func (e *Episode) String() string

type Language

type Language struct {
	Id string `json:"id"`
}

type Market

type Market struct {
	Code string `json:"code"`
}

type Movie

type Movie struct {
	Id          string      `json:"id"`
	Title       string      `json:"title"`
	ViewOptions ViewOptions `json:"view_options"`
}

Functions

func FetchMovie(movieId string, userClassification Classification, targetMarket Market) (*Movie, error)

Methods

func (targetMovie *Movie) String() string

type Private

type Private struct {
	Streams []Stream `json:"streams"`
}

type Profile

type Profile struct {
	Classification Classification `json:"classification"`
	AudioLanguage  Language       `json:"audio_language"`
}

type Season

type Season struct {
	Id       string    `json:"id"`
	Title    string    `json:"title"`
	Episodes []Episode `json:"episodes"`
}

Functions

func FetchSeason(id string, userClassification Classification, targetMarket Market) (*Season, error)

type Start

type Start struct {
	Profile Profile
	Market  Market
}

Functions

func FetchStart(marketCode string) (*Start, error)

Methods

func (*Start) CachePath() string

type StartRequest

type StartRequest struct {
	DeviceIdentifier string         `json:"device_identifier"`
	DeviceMetadata   DeviceMetadata `json:"device_metadata"`
}

type Stream

type Stream struct {
	AudioLanguages []Language `json:"audio_languages"`
}

type StreamInfo

type StreamInfo struct {
	LicenseUrl *Url `json:"license_url"`
	Url        *Url // MPD
}

Functions

func FetchEpisodeStreaming(contentId string, userClassification Classification, audioLanguage string) (*StreamInfo, error)
func FetchMovieStreaming(contentId string, userClassification Classification, audioLanguage string) (*StreamInfo, error)

Methods

func (*StreamInfo) CachePath() string
func (s *StreamInfo) FetchLicense(challenge []byte) ([]byte, error)

type StreamingRequest

type StreamingRequest struct {
	AudioLanguage            string `json:"audio_language"`
	AudioQuality             string `json:"audio_quality"`
	ClassificationId         int    `json:"classification_id"`
	ContentId                string `json:"content_id"`
	ContentType              string `json:"content_type"`
	DeviceIdentifier         string `json:"device_identifier"`
	DeviceSerial             string `json:"device_serial"`
	DeviceStreamVideoQuality string `json:"device_stream_video_quality"`
	Player                   string `json:"player"`
	SubtitleLanguage         string `json:"subtitle_language"`
	VideoType                string `json:"video_type"`
}

type TvShow

type TvShow struct {
	Id      string   `json:"id"`
	Title   string   `json:"title"`
	Seasons []Season `json:"seasons"`
}

Functions

func FetchTvShow(tvShowId string, userClassification Classification, targetMarket Market) (*TvShow, error)

Methods

func (show *TvShow) String() string

type Url

type Url struct {
	Url url.URL
}

Methods

func (u *Url) MarshalText() ([]byte, error)
func (u *Url) UnmarshalText(text []byte) error

type ViewOptions

type ViewOptions struct {
	Private Private `json:"private"`
}