videoranking

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package videoranking contains validated parameters and response models for Bilibili video-ranking endpoints.

Index

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 NewClient

func NewClient(client *core.Client) Client

NewClient binds the videoranking module to a shared client.

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) Precious

func (v Client) Precious(ctx context.Context) (PreciousVideos, 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"`
	ShareTitle    string `json:"share_title"`
	ShareSubtitle string `json:"share_subtitle"`
	MediaID       uint64 `json:"media_id"`
}

type PopularSeriesItem

type PopularSeriesItem struct {
	Number  uint32 `json:"number"`
	Subject string `json:"subject"`
	Status  uint8  `json:"status"`
	Name    string `json:"name"`
}

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

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 (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 (RegionNewListParams) WithPageSize

func (p RegionNewListParams) WithPageSize(size uint32) (RegionNewListParams, error)

func (RegionNewListParams) WithType

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 (RegionNewListRankParams) WithPage

type RegionPage

type RegionPage struct {
	Count uint32 `json:"count"`
	Page  uint32 `json:"num"`
	Size  uint32 `json:"size"`
}

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 (RegionTagDynamicParams) WithPageSize

Jump to

Keyboard shortcuts

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