Documentation
¶
Index ¶
- type ApiClient
- func (a *ApiClient) Connect(ctx context.Context) error
- func (a *ApiClient) GetLiveCategories(ctx context.Context) ([]*Category, error)
- func (a *ApiClient) GetLiveStreamUri(streamId int, extension string) string
- func (a *ApiClient) GetLiveStreams(ctx context.Context, category int) ([]*LiveStream, error)
- func (a *ApiClient) GetSeries(ctx context.Context, category int) ([]*Series, error)
- func (a *ApiClient) GetSeriesCategories(ctx context.Context) ([]*Category, error)
- func (a *ApiClient) GetSeriesInfo(ctx context.Context, id int) (*SeriesInfo, error)
- func (a *ApiClient) GetSeriesUri(id int, extension string) string
- func (a *ApiClient) GetShortEpg(ctx context.Context, streamId int) (*EpgListings, error)
- func (a *ApiClient) GetSimpleDataTable(ctx context.Context, streamId int) (*EpgListings, error)
- func (a *ApiClient) GetVodCategories(ctx context.Context) ([]*Category, error)
- func (a *ApiClient) GetVodInfo(ctx context.Context, id int) (*VodInfo, error)
- func (a *ApiClient) GetVodStreams(ctx context.Context, category int) ([]*VodStream, error)
- func (a *ApiClient) GetVodUri(id int, extension string) string
- func (a *ApiClient) Login(ctx context.Context) (*LoginInfo, error)
- type ApiTransport
- type Audio
- type BackdropPath
- type Category
- type CategoryType
- type Disposition
- type EpgListing
- type EpgListings
- type Episode
- type EpisodeInfo
- type LiveStream
- type LoginInfo
- type ModelBase
- type ModelStream
- type ModelVideo
- type Movie
- type MovieData
- type Option
- type Season
- type Series
- type SeriesInfo
- type ServerInfo
- type Tags
- type UserInfo
- type Video
- type VodInfo
- type VodStream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
func (*ApiClient) GetLiveCategories ¶
func (*ApiClient) GetLiveStreamUri ¶
func (*ApiClient) GetLiveStreams ¶
func (*ApiClient) GetSeriesCategories ¶
func (*ApiClient) GetSeriesInfo ¶
func (*ApiClient) GetSeriesUri ¶
GetSeriesUri build series url
var series *Series ... client.GetSeriesUri(series.Id, series.ContainerExtension)
func (*ApiClient) GetShortEpg ¶
func (*ApiClient) GetSimpleDataTable ¶
func (*ApiClient) GetVodCategories ¶
func (*ApiClient) GetVodInfo ¶
func (*ApiClient) GetVodStreams ¶
type ApiTransport ¶
type ApiTransport struct {
// contains filtered or unexported fields
}
type Audio ¶
type Audio struct {
Index int `json:"index"`
CodecName string `json:"codec_name"`
CodecLongName string `json:"codec_long_name"`
CodecType string `json:"codec_type"`
CodecTagString string `json:"codec_tag_string"`
CodecTag string `json:"codec_tag"`
SampleFmt string `json:"sample_fmt"`
SampleRate string `json:"sample_rate"`
Channels int `json:"channels"`
ChannelLayout string `json:"channel_layout"`
BitsPerSample int `json:"bits_per_sample"`
RFrameRate string `json:"r_frame_rate"`
AvgFrameRate string `json:"avg_frame_rate"`
TimeBase string `json:"time_base"`
StartPts int `json:"start_pts"`
StartTime string `json:"start_time"`
Disposition *Disposition `json:"disposition"`
Tags Tags `json:"tags"`
// Vod
Profile string `json:"profile"`
CodecTimeBase string `json:"codec_time_base"`
// Series
BitRate string `json:"bit_rate"`
}
type BackdropPath ¶
type BackdropPath []string
func (*BackdropPath) UnmarshalJSON ¶
func (b *BackdropPath) UnmarshalJSON(data []byte) error
type CategoryType ¶
type CategoryType string
const ( CategoryTypeLive CategoryType = "live" CategoryTypeVod CategoryType = "vod" CategoryTypeSeries CategoryType = "series" )
type Disposition ¶
type Disposition struct {
Default int `json:"default"`
Dub int `json:"dub"`
Original int `json:"original"`
Comment int `json:"comment"`
Lyrics int `json:"lyrics"`
Karaoke int `json:"karaoke"`
Forced int `json:"forced"`
HearingImpaired int `json:"hearing_impaired"`
VisualImpaired int `json:"visual_impaired"`
CleanEffects int `json:"clean_effects"`
AttachedPic int `json:"attached_pic"`
TimedThumbnails int `json:"timed_thumbnails"`
// Series...
Captions int `json:"captions,omitempty"`
Descriptions int `json:"descriptions,omitempty"`
Metadata int `json:"metadata,omitempty"`
Dependent int `json:"dependent,omitempty"`
StillImage int `json:"still_image,omitempty"`
}
type EpgListing ¶
type EpgListing struct {
EpgId int `json:"epg_id,string"`
Title base64string `json:"title"`
Lang string `json:"lang"`
Start date `json:"start"`
End date `json:"end"`
Description base64string `json:"description"`
ChannelId string `json:"channel_id"`
StartTimestamp int `json:"start_timestamp,string"`
StopTimestamp int `json:"stop_timestamp,string"`
//short
StreamId int `json:"stream_id,string"`
// long
Id int `json:"id,string"`
NowPlaying boolean `json:"now_playing"`
HasArchive boolean `json:"has_archive"`
}
type EpgListings ¶
type EpgListings struct {
EpgListings []*EpgListing `json:"epg_listings"`
}
type Episode ¶
type Episode struct {
Id int `json:"id,string"`
EpisodeNum int `json:"episode_num"`
Title string `json:"title"`
ContainerExtension string `json:"container_extension"`
Info *EpisodeInfo `json:"info"`
}
type EpisodeInfo ¶
type EpisodeInfo struct {
AirDate string `json:"air_date"`
Crew string `json:"crew"`
Rating float `json:"rating"`
Id numeric `json:"id"`
MovieImage string `json:"movie_image"`
DurationSecs int `json:"duration_secs"`
Duration string `json:"duration"`
Bitrate int `json:"bitrate"`
Video *Video `json:"video"`
Audio *Video `json:"audio"`
}
type LiveStream ¶
type LiveStream struct {
ModelBase
ModelStream
EpgChannelId string `json:"epg_channel_id"`
TvArchive boolean `json:"tv_archive"`
TvArchiveDuration numeric `json:"tv_archive_duration"`
}
type LoginInfo ¶
type LoginInfo struct {
UserInfo *UserInfo `json:"user_info"`
ServerInfo *ServerInfo `json:"server_info"`
}
type ModelStream ¶
type ModelVideo ¶
type ModelVideo struct {
Rating float `json:"rating"`
Rating5Based float `json:"rating_5based"`
Tmdb varchar `json:"tmdb"`
}
type Movie ¶
type Movie struct {
TmdbUrl string `json:"tmdb_url"`
TmdbId string `json:"tmdb_id"`
Name string `json:"name"`
OName string `json:"o_name"`
CoverBig string `json:"cover_big"`
MovieImage string `json:"movie_image"`
Releasedate string `json:"releasedate"`
EpisodeRunTime string `json:"episode_run_time"`
YoutubeTrailer string `json:"youtube_trailer"`
Director string `json:"director"`
Actors string `json:"actors"`
Cast string `json:"cast"`
Description string `json:"description"`
Plot string `json:"plot"`
Age string `json:"age"`
MpaaRating string `json:"mpaa_rating"`
RatingCountKinopoisk int `json:"rating_count_kinopoisk"`
Country string `json:"country"`
Genre string `json:"genre"`
BackdropPath []string `json:"backdrop_path"`
DurationSecs int `json:"duration_secs"`
Duration string `json:"duration"`
Video *Video `json:"video"`
Audio *Audio `json:"audio"`
Bitrate int `json:"bitrate"`
Rating string `json:"rating"`
}
type MovieData ¶
type MovieData struct {
StreamId int `json:"stream_id"`
Name string `json:"name"`
Added string `json:"added"`
CategoryId string `json:"category_id"`
CategoryIds []int `json:"category_ids"`
ContainerExtension string `json:"container_extension"`
CustomSid string `json:"custom_sid"`
DirectSource string `json:"direct_source"`
}
type Option ¶
type Option func(*options) error
func WithAPIPath ¶
func WithDumper ¶
func WithHTTPClient ¶
func WithLogger ¶
type Season ¶
type Season struct {
Name string `json:"name"`
EpisodeCount numeric `json:"episode_count"`
Overview string `json:"overview"`
AirDate string `json:"air_date"`
Cover string `json:"cover"`
CoverTmdb string `json:"cover_tmdb"`
SeasonNumber numeric `json:"season_number"`
CoverBig string `json:"cover_big"`
ReleaseDate string `json:"releaseDate"`
Duration string `json:"duration"`
}
type Series ¶
type Series struct {
ModelBase
ModelVideo
SeriesId int `json:"series_id"`
Cover string `json:"cover"`
Plot string `json:"plot"`
Cast string `json:"cast"`
Director string `json:"director"`
Genre string `json:"genre"`
ReleaseDate string `json:"releaseDate"`
LastModified string `json:"last_modified"`
BackdropPath BackdropPath `json:"backdrop_path"`
YoutubeTrailer string `json:"youtube_trailer"`
EpisodeRunTime int `json:"episode_run_time,string"`
}
type SeriesInfo ¶
type ServerInfo ¶
type ServerInfo struct {
Url string `json:"url"`
Port int `json:"port,string"`
HttpsPort int `json:"https_port,string"`
ServerProtocol string `json:"server_protocol"`
RtmpPort int `json:"rtmp_port,string"`
Timezone string `json:"timezone"`
TimestampNow int `json:"timestamp_now"`
TimeNow string `json:"time_now"`
Process boolean `json:"process"`
}
type UserInfo ¶
type UserInfo struct {
Username string `json:"username"`
Password string `json:"password"`
Message string `json:"message"`
Auth boolean `json:"auth"`
Status string `json:"status"`
ExpDate int `json:"exp_date,string"`
IsTrial boolean `json:"is_trial"`
ActiveCons int `json:"active_cons,string"`
CreatedAt int `json:"created_at,string"`
MaxConnections int `json:"max_connections,string"`
AllowedOutputFormats []string `json:"allowed_output_formats"`
}
type Video ¶
type Video struct {
Index int `json:"index"`
CodecName string `json:"codec_name"`
CodecLongName string `json:"codec_long_name"`
Profile string `json:"profile"`
CodecType string `json:"codec_type"`
CodecTagString string `json:"codec_tag_string"`
CodecTag string `json:"codec_tag"`
Width int `json:"width"`
Height int `json:"height"`
CodedWidth int `json:"coded_width"`
CodedHeight int `json:"coded_height"`
ClosedCaptions int `json:"closed_captions"`
FilmGrain int `json:"film_grain"`
HasBFrames int `json:"has_b_frames"`
SampleAspectRatio string `json:"sample_aspect_ratio"`
DisplayAspectRatio string `json:"display_aspect_ratio"`
PixFmt string `json:"pix_fmt"`
Level int `json:"level"`
ChromaLocation string `json:"chroma_location"`
FieldOrder string `json:"field_order"`
Refs int `json:"refs"`
IsAvc string `json:"is_avc"`
NalLengthSize string `json:"nal_length_size"`
RFrameRate string `json:"r_frame_rate"`
AvgFrameRate string `json:"avg_frame_rate"`
TimeBase string `json:"time_base"`
StartPts int `json:"start_pts"`
StartTime string `json:"start_time"`
BitsPerRawSample string `json:"bits_per_raw_sample"`
Disposition *Disposition `json:"disposition"`
Tags Tags `json:"tags"`
Bitrate int `json:"bitrate"`
Rating string `json:"rating"`
// Series
ExtradataSize int `json:"extradata_size"`
// Video
ColorRange string `json:"color_range"`
ColorSpace string `json:"color_space"`
ColorTransfer string `json:"color_transfer"`
ColorPrimaries string `json:"color_primaries"`
}
type VodStream ¶
type VodStream struct {
ModelBase
ModelStream
ModelVideo
Trailer string `json:"trailer"`
ContainerExtension string `json:"container_extension"`
}
Click to show internal directories.
Click to hide internal directories.