subtitle_best_api

package
v0.52.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeReplyData

type CodeReplyData struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	Code    string `json:"code"`
}

type CodeReqData

type CodeReqData struct {
	NowTime string `json:"now_time"`
}

type FeedReply

type FeedReply struct {
	Status  int    `json:"status"` // 0 失败,1 成功
	Message string `json:"message"`
}

type FeedReq

type FeedReq struct {
	Id           string `json:"id"`             // 当前用户的id,这个需要在用户缓存中随机生成
	Version      string `json:"version"`        // 当前版本号
	MediaServer  string `json:"media_server"`   // 媒体服务的名称,没有使用则是 None
	EnableShare  bool   `json:"enable_share"`   // 是否开启了共享功能
	EnableApiKey bool   `json:"enable_api_key"` // 是否开启本地 http api 功能
}

type IdConvertReply

type IdConvertReply struct {
	Status  int    `json:"status"` // 0 失败,1 成功
	Message string `json:"message"`
	IMDBId  string `json:"imdb_id,omitempty"`
	TVDBId  string `json:"tvdb_id,omitempty"`
}

type IdConvertReq

type IdConvertReq struct {
	Id        string `json:"id"`
	Source    string `json:"source"`     // options=imdb|tmdb
	VideoType string `json:"video_type"` // ,options=movie|series
}

type MediaInfoReply

type MediaInfoReply struct {
	Status           int    `json:"status"` // 0 失败,1 成功,2 在队列中等待查询
	Message          string `json:"message"`
	TMDBId           string `json:"tmdb_id,omitempty"`
	OriginalTitle    string `json:"original_title,omitempty"`
	OriginalLanguage string `json:"original_language,omitempty"`
	TitleEN          string `json:"title_en,omitempty"`
	TitleCN          string `json:"title_cn,omitempty"`
	Year             string `json:"year,omitempty"`
}
{
	"status": 1,
	"message": "",
	"tmdb_id": "503235",
	"original_title": "邪不压正",
	"original_language": "zh",
	"title_en": "Hidden Man",
	"title_cn": "邪不压正",
	"year": "2018-07-13"
}
{
	"status": 1,
	"message": "",
	"tmdb_id": "78154",
	"original_title": "L'amica geniale",
	"original_language": "it",
	"title_en": "My Brilliant Friend",
	"title_cn": "我的天才女友",
	"year": "2018-11-18"
}

type MediaInfoReq

type MediaInfoReq struct {
	Id        string `json:"id"`
	Source    string `json:"source"`     // options=imdb|tmdb
	VideoType string `json:"video_type"` // ,options=movie|series
}
{
	"id": "tt7278862",
	"source": "imdb",
	"video_type": "series"
}
{
	"id": "503235",
	"source": "tmdb",
	"video_type": "movie"
}

type SubtitleBestApi

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

func NewSubtitleBestApi

func NewSubtitleBestApi(log *logrus.Logger, inAuthKey random_auth_key.AuthKey) *SubtitleBestApi

func (*SubtitleBestApi) CheckAlive

func (s *SubtitleBestApi) CheckAlive() error

func (*SubtitleBestApi) ConvertId

func (s *SubtitleBestApi) ConvertId(id, source, videoType string) (*IdConvertReply, error)

ConvertId 目前仅仅支持 TMDB ID 转 IMDB ID

func (*SubtitleBestApi) FeedBack

func (s *SubtitleBestApi) FeedBack(id, version, MediaServer string, EnableShare, EnableApiKey bool) (*FeedReply, error)

func (*SubtitleBestApi) GetCode

func (s *SubtitleBestApi) GetCode() (string, error)

func (*SubtitleBestApi) GetMediaInfo

func (s *SubtitleBestApi) GetMediaInfo(id, source, videoType string) (*MediaInfoReply, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL