Documentation ¶
Index ¶
- Constants
- func EncodeSign(params map[string]string, secret string) (string, string)
- func Md5(formal string) string
- type ApiError
- type BCli
- type BangumiService
- type BannerElement
- type BaseParam
- type BaseService
- type HttpClient
- type OthersService
- func (o *OthersService) AppIndex() (*liveAppIndexResponse, error)
- func (o *OthersService) IndexBanner() ([]BannerElement, error)
- func (o *OthersService) Search(keyword string, page, pageSize int, order string) (*searchResponse, error)
- func (o *OthersService) SearchByType(keyword string, page, pageSize int, searchType int) (*searchByTypeResponse, error)
- type RankService
- type RankVideoElement
- type SpecialService
- type UserService
- type UserVideoElement
- type UserVideoResponse
- type VideoService
Constants ¶
View Source
const ( HTTP_TIMEOUT = 2 HTTP_BUFFER_SIZE = 2 * 1024 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BCli ¶
type BCli struct { Rank RankService Bangumi BangumiService Video VideoService Special SpecialService User UserService Others OthersService }
type BangumiService ¶
type BangumiService struct {
BaseService
}
func (*BangumiService) GetBangumiInfo ¶
func (b *BangumiService) GetBangumiInfo(seasonId string) (*bangumiInfoResponse, error)
func (*BangumiService) GetIndex ¶
func (b *BangumiService) GetIndex() (*bangumiIndexResponse, error)
func (*BangumiService) GetWeekList ¶
func (b *BangumiService) GetWeekList(bType string) (*weekBangumiResponse, error)
type BannerElement ¶
type BaseService ¶
type BaseService struct { Params BaseParam Client HttpClient }
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient() HttpClient
type OthersService ¶
type OthersService struct {
BaseService
}
func (*OthersService) AppIndex ¶
func (o *OthersService) AppIndex() (*liveAppIndexResponse, error)
func (*OthersService) IndexBanner ¶
func (o *OthersService) IndexBanner() ([]BannerElement, error)
func (*OthersService) Search ¶
func (o *OthersService) Search(keyword string, page, pageSize int, order string) (*searchResponse, error)
order:
"totalrank" "click" "pubdate" "dm"
searchType:
"all"
func (*OthersService) SearchByType ¶
func (o *OthersService) SearchByType(keyword string, page, pageSize int, searchType int) (*searchByTypeResponse, error)
type RankService ¶
type RankService struct {
BaseService
}
func (*RankService) SortRank ¶
func (r *RankService) SortRank(tid, page, pageSize int, order string) ([]RankVideoElement, error)
order:
"view", "senddate", "reply", "danmaku", "favorite",
type RankVideoElement ¶
type RankVideoElement struct { Title string `json:"title"` Cover string `json:"cover"` Uri string `json:"uri"` Param string `json:"param"` Goto string `json:"goto"` Name string `json:"name"` Play int `json:"play"` Reply int `json:"reply"` Favourite int `json:"favourite"` Danmaku int `json:"danmaku"` }
type SpecialService ¶
type SpecialService struct {
BaseService
}
func (*SpecialService) GetSpecialInfo ¶
func (s *SpecialService) GetSpecialInfo(spid int) (*specialInfoResponse, error)
func (*SpecialService) GetSpecialVideos ¶
func (s *SpecialService) GetSpecialVideos(spid int, isBangumi bool) (*specialVideosResponse, error)
isBangumi:
the result is "bangumi" or other videos
type UserService ¶
type UserService struct {
BaseService
}
func (*UserService) GetUserInfo ¶
func (u *UserService) GetUserInfo(mid int) (*userInfoResponse, error)
func (*UserService) GetUserVideos ¶
func (u *UserService) GetUserVideos(mid, page, pageSize int) (*userVideosResponse, error)
type UserVideoElement ¶
type UserVideoElement struct { Aid int `json:"aid"` Copyright string `json:"copyright"` TypeId int `json:"typeid"` Title string `json:"title"` Subtitle string `json:"subtitle"` Play int `json:"play"` Review int `json:"review"` VideoReview int `json:"video_review"` Favorites int `json:"favorites"` Mid int `json:"mid"` Author string `json:"author"` Description string `json:"description"` Created string `json:"created"` Pic string `json:"pic"` Comment int `json:"comment"` Length string `json:"length"` }
type UserVideoResponse ¶
type UserVideoResponse struct { }
type VideoService ¶
type VideoService struct {
BaseService
}
func (*VideoService) GetVideoInfo ¶
func (v *VideoService) GetVideoInfo(aid int) (*videoInfoResponse, error)
func (*VideoService) GetVideoPartPath ¶
func (v *VideoService) GetVideoPartPath(cid int, quality int) (*videoPathResponse, error)
* videoType:
"flv" "hdmp4" "mp4"
quality:
1,2,3
Click to show internal directories.
Click to hide internal directories.