Documentation
¶
Overview ¶
Package videoranking contains validated parameters and response models for Bilibili video-ranking endpoints.
Index ¶
- type Client
- func (v Client) PopularList(ctx context.Context, params PopularListParams) (PopularList, error)
- func (v Client) PopularSeries(ctx context.Context, params PopularSeriesParams) (PopularSeries, error)
- func (v Client) PopularSeriesList(ctx context.Context) (PopularSeriesList, error)
- func (v Client) Precious(ctx context.Context) (PreciousVideos, error)
- func (v Client) RankingList(ctx context.Context, params RankingListParams) (RankingList, error)
- func (v Client) RegionDynamic(ctx context.Context, params RegionDynamicParams) (RegionArchives, error)
- func (v Client) RegionNewList(ctx context.Context, params RegionNewListParams) (RegionArchives, error)
- func (v Client) RegionNewListRank(ctx context.Context, params RegionNewListRankParams) (NewListRank, error)
- func (v Client) RegionTagDynamic(ctx context.Context, params RegionTagDynamicParams) (RegionArchives, error)
- type NewListRank
- type NewListRankItem
- type NewListRankOrder
- type PopularList
- type PopularListParams
- type PopularSeries
- type PopularSeriesConfig
- type PopularSeriesItem
- type PopularSeriesList
- type PopularSeriesParams
- type PreciousVideos
- type RankingList
- type RankingListParams
- type RankingType
- type RegionArchives
- type RegionDynamicParams
- type RegionNewListParams
- func (p RegionNewListParams) EncodeQuery() (url.Values, error)
- func (p RegionNewListParams) WithPage(page uint32) (RegionNewListParams, error)
- func (p RegionNewListParams) WithPageSize(size uint32) (RegionNewListParams, error)
- func (p RegionNewListParams) WithType(typ uint32) (RegionNewListParams, error)
- type RegionNewListRankParams
- type RegionPage
- type RegionTagDynamicParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides video-ranking operations.
func (Client) PopularList ¶
func (v Client) PopularList(ctx context.Context, params PopularListParams) (PopularList, error)
func (Client) PopularSeries ¶
func (v Client) PopularSeries(ctx context.Context, params PopularSeriesParams) (PopularSeries, error)
func (Client) PopularSeriesList ¶
func (v Client) PopularSeriesList(ctx context.Context) (PopularSeriesList, error)
func (Client) RankingList ¶
func (v Client) RankingList(ctx context.Context, params RankingListParams) (RankingList, error)
func (Client) RegionDynamic ¶
func (v Client) RegionDynamic(ctx context.Context, params RegionDynamicParams) (RegionArchives, error)
func (Client) RegionNewList ¶
func (v Client) RegionNewList(ctx context.Context, params RegionNewListParams) (RegionArchives, error)
func (Client) RegionNewListRank ¶
func (v Client) RegionNewListRank(ctx context.Context, params RegionNewListRankParams) (NewListRank, error)
func (Client) RegionTagDynamic ¶
func (v Client) RegionTagDynamic(ctx context.Context, params RegionTagDynamicParams) (RegionArchives, error)
type NewListRank ¶
type NewListRank struct {
Result *[]NewListRankItem `json:"result"`
NumResults uint32 `json:"numResults"`
Page uint32 `json:"page"`
PageSize uint32 `json:"pagesize"`
Message string `json:"msg"`
}
type NewListRankItem ¶
type NewListRankItem struct {
PublishDate string `json:"pubdate"`
Picture string `json:"pic"`
Tag string `json:"tag"`
Duration uint32 `json:"duration"`
ID uint64 `json:"id"`
RankScore *uint64 `json:"rank_score"`
BadgePay bool `json:"badgepay"`
SendDate *uint64 `json:"senddate"`
Author string `json:"author"`
Review uint64 `json:"review"`
MID uint64 `json:"mid"`
IsUnionVideo uint8 `json:"is_union_video"`
RankIndex *uint64 `json:"rank_index"`
Type string `json:"type"`
Play string `json:"play"`
Danmaku uint64 `json:"video_review"`
IsPay uint8 `json:"is_pay"`
Favorites uint64 `json:"favorites"`
ArchiveURL string `json:"arcurl"`
BVID string `json:"bvid"`
Title string `json:"title"`
Description string `json:"description"`
}
type NewListRankOrder ¶
type NewListRankOrder string
const ( NewListRankClick NewListRankOrder = "click" NewListRankScores NewListRankOrder = "scores" NewListRankPublish NewListRankOrder = "pubdate" )
type PopularList ¶
type PopularList struct {
Items []json.RawMessage `json:"list"`
NoMore bool `json:"no_more"`
}
type PopularListParams ¶
type PopularListParams struct {
// contains filtered or unexported fields
}
func NewPopularListParams ¶
func NewPopularListParams() PopularListParams
func (PopularListParams) EncodeQuery ¶
func (p PopularListParams) EncodeQuery() (url.Values, error)
func (PopularListParams) WithPage ¶
func (p PopularListParams) WithPage(page uint32) (PopularListParams, error)
func (PopularListParams) WithPageSize ¶
func (p PopularListParams) WithPageSize(size uint32) (PopularListParams, error)
type PopularSeries ¶
type PopularSeries struct {
Config PopularSeriesConfig `json:"config"`
Reminder *string `json:"reminder"`
Items []json.RawMessage `json:"list"`
}
type PopularSeriesConfig ¶
type PopularSeriesConfig struct {
ID uint64 `json:"id"`
Type string `json:"type"`
Number uint32 `json:"number"`
Subject string `json:"subject"`
StartTime uint64 `json:"stime"`
EndTime uint64 `json:"etime"`
Status uint8 `json:"status"`
Name string `json:"name"`
Label string `json:"label"`
Hint string `json:"hint"`
Color uint32 `json:"color"`
Cover string `json:"cover"`
MediaID uint64 `json:"media_id"`
}
type PopularSeriesItem ¶
type PopularSeriesList ¶
type PopularSeriesList struct {
Items []PopularSeriesItem `json:"list"`
}
type PopularSeriesParams ¶
type PopularSeriesParams struct {
// contains filtered or unexported fields
}
func NewPopularSeriesParams ¶
func NewPopularSeriesParams(number uint32) (PopularSeriesParams, error)
func (PopularSeriesParams) EncodeQuery ¶
func (p PopularSeriesParams) EncodeQuery() (url.Values, error)
type PreciousVideos ¶
type PreciousVideos struct {
Title string `json:"title"`
MediaID uint64 `json:"media_id"`
Explain string `json:"explain"`
Items []json.RawMessage `json:"list"`
}
type RankingList ¶
type RankingList struct {
Note string `json:"note"`
Items []json.RawMessage `json:"list"`
}
type RankingListParams ¶
type RankingListParams struct {
// contains filtered or unexported fields
}
func NewRankingListParams ¶
func NewRankingListParams() RankingListParams
func (RankingListParams) EncodeQuery ¶
func (p RankingListParams) EncodeQuery() (url.Values, error)
func (RankingListParams) WithRegionID ¶
func (p RankingListParams) WithRegionID(regionID uint32) (RankingListParams, error)
func (RankingListParams) WithType ¶
func (p RankingListParams) WithType(typ RankingType) (RankingListParams, error)
type RankingType ¶
type RankingType string
const ( RankingAll RankingType = "all" RankingRookie RankingType = "rookie" RankingOrigin RankingType = "origin" )
type RegionArchives ¶
type RegionArchives struct {
Archives []json.RawMessage `json:"archives"`
Page RegionPage `json:"page"`
}
type RegionDynamicParams ¶
type RegionDynamicParams struct {
// contains filtered or unexported fields
}
func NewRegionDynamicParams ¶
func NewRegionDynamicParams(regionID uint32) (RegionDynamicParams, error)
func (RegionDynamicParams) EncodeQuery ¶
func (p RegionDynamicParams) EncodeQuery() (url.Values, error)
func (RegionDynamicParams) WithPage ¶
func (p RegionDynamicParams) WithPage(page uint32) (RegionDynamicParams, error)
func (RegionDynamicParams) WithPageSize ¶
func (p RegionDynamicParams) WithPageSize(size uint32) (RegionDynamicParams, error)
type RegionNewListParams ¶
type RegionNewListParams struct {
// contains filtered or unexported fields
}
func NewRegionNewListParams ¶
func NewRegionNewListParams(regionID uint32) (RegionNewListParams, error)
func (RegionNewListParams) EncodeQuery ¶
func (p RegionNewListParams) EncodeQuery() (url.Values, error)
func (RegionNewListParams) WithPage ¶
func (p RegionNewListParams) WithPage(page uint32) (RegionNewListParams, error)
func (RegionNewListParams) WithPageSize ¶
func (p RegionNewListParams) WithPageSize(size uint32) (RegionNewListParams, error)
func (RegionNewListParams) WithType ¶
func (p RegionNewListParams) WithType(typ uint32) (RegionNewListParams, error)
type RegionNewListRankParams ¶
type RegionNewListRankParams struct {
// contains filtered or unexported fields
}
func NewRegionNewListRankParams ¶
func NewRegionNewListRankParams(categoryID, pageSize uint32, from, to string) (RegionNewListRankParams, error)
func (RegionNewListRankParams) EncodeQuery ¶
func (p RegionNewListRankParams) EncodeQuery() (url.Values, error)
func (RegionNewListRankParams) WithOrder ¶
func (p RegionNewListRankParams) WithOrder(order NewListRankOrder) (RegionNewListRankParams, error)
func (RegionNewListRankParams) WithPage ¶
func (p RegionNewListRankParams) WithPage(page uint32) (RegionNewListRankParams, error)
type RegionPage ¶
type RegionTagDynamicParams ¶
type RegionTagDynamicParams struct {
// contains filtered or unexported fields
}
func NewRegionTagDynamicParams ¶
func NewRegionTagDynamicParams(regionID uint32, tagID uint64) (RegionTagDynamicParams, error)
func (RegionTagDynamicParams) EncodeQuery ¶
func (p RegionTagDynamicParams) EncodeQuery() (url.Values, error)
func (RegionTagDynamicParams) WithPage ¶
func (p RegionTagDynamicParams) WithPage(page uint32) (RegionTagDynamicParams, error)
func (RegionTagDynamicParams) WithPageSize ¶
func (p RegionTagDynamicParams) WithPageSize(size uint32) (RegionTagDynamicParams, error)
Click to show internal directories.
Click to hide internal directories.