Documentation
¶
Overview ¶
Package creativecenter contains parameters and stable response models for Bilibili's authenticated creator-center read APIs.
Index ¶
- type Archive
- type ArchiveAudit
- type ArchiveCompare
- type ArchiveCompareItem
- type ArchiveCompareParams
- type ArchiveStat
- type ArchiveVideos
- type ArchiveVideosParams
- type ArchivesList
- type ArchivesListParams
- type ArticleStat
- type ArticleTrendMetric
- type ArticleTrendParams
- type Client
- func (c Client) ArchiveCompare(ctx context.Context, params ArchiveCompareParams) (ArchiveCompare, error)
- func (c Client) ArchiveVideos(ctx context.Context, params ArchiveVideosParams) (ArchiveVideos, error)
- func (c Client) ArchivesList(ctx context.Context, params ArchivesListParams) (ArchivesList, error)
- func (c Client) ArticleStat(ctx context.Context) (ArticleStat, error)
- func (c Client) ArticleTrend(ctx context.Context, params ArticleTrendParams) ([]Trend, error)
- func (c Client) ElectromagneticInfo(ctx context.Context) (ElectromagneticInfo, error)
- func (c Client) PlaySource(ctx context.Context) (*PlaySource, error)
- func (c Client) SeasonByAID(ctx context.Context, params SeasonByAIDParams) (Season, error)
- func (c Client) SeasonInfo(ctx context.Context, params SeasonInfoParams) (SeasonInfo, error)
- func (c Client) SeasonList(ctx context.Context, params SeasonListParams) (SeasonList, error)
- func (c Client) SeasonSection(ctx context.Context, params SectionParams) (SectionEpisodes, error)
- func (c Client) UpStat(ctx context.Context) (UpStat, error)
- func (c Client) VideoTrend(ctx context.Context, params VideoTrendParams) ([]Trend, error)
- func (c Client) ViewerData(ctx context.Context) (ViewerData, error)
- type ElectromagneticInfo
- type Episode
- type Page
- type PlaySource
- type Season
- type SeasonByAIDParams
- type SeasonInfo
- type SeasonInfoParams
- type SeasonItem
- type SeasonList
- type SeasonListOrder
- type SeasonListParams
- type SeasonStat
- type Section
- type SectionEpisodes
- type SectionParams
- type Sections
- type SortOrder
- type Trend
- type UpStat
- type VideoPart
- type VideoTrendMetric
- type VideoTrendParams
- type ViewerBaseDetail
- type ViewerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveAudit ¶
type ArchiveAudit struct {
Archive *Archive `json:"Archive"`
Videos json.RawMessage `json:"Videos"`
Stat ArchiveStat `json:"stat"`
State int64 `json:"state_panel"`
TypeName *string `json:"typename"`
}
type ArchiveCompare ¶
type ArchiveCompare struct {
List []ArchiveCompareItem `json:"list"`
}
type ArchiveCompareItem ¶
type ArchiveCompareItem struct {
AID int64 `json:"aid"`
BVID string `json:"bvid"`
Cover string `json:"cover"`
Title string `json:"title"`
PublishedAt int64 `json:"pubtime"`
Duration int64 `json:"duration"`
Stat json.RawMessage `json:"stat"`
HourStat json.RawMessage `json:"hour_stat"`
}
ArchiveCompareStat is intentionally retained as raw JSON: the upstream diagnose schema contains dozens of experimental, frequently changing rates.
type ArchiveCompareParams ¶
type ArchiveCompareParams struct {
// contains filtered or unexported fields
}
func NewArchiveCompareParams ¶
func NewArchiveCompareParams() ArchiveCompareParams
func (ArchiveCompareParams) EncodeQuery ¶
func (p ArchiveCompareParams) EncodeQuery() (url.Values, error)
func (ArchiveCompareParams) WithSize ¶
func (p ArchiveCompareParams) WithSize(size uint32) (ArchiveCompareParams, error)
func (ArchiveCompareParams) WithTimestamp ¶
func (p ArchiveCompareParams) WithTimestamp(timestamp uint64) (ArchiveCompareParams, error)
type ArchiveStat ¶
type ArchiveStat struct {
AID int64 `json:"aid"`
View int64 `json:"view"`
Danmaku int64 `json:"danmaku"`
Reply int64 `json:"reply"`
Favorite int64 `json:"favorite"`
Coin int64 `json:"coin"`
NowRank int64 `json:"now_rank"`
HistoryRank int64 `json:"his_rank"`
Like int64 `json:"like"`
Dislike int64 `json:"dislike"`
VT int64 `json:"vt"`
VV int64 `json:"vv"`
}
type ArchiveVideos ¶
type ArchiveVideosParams ¶
type ArchiveVideosParams struct {
// contains filtered or unexported fields
}
func NewArchiveVideosParams ¶
func NewArchiveVideosParams(aid ids.AID) ArchiveVideosParams
func (ArchiveVideosParams) EncodeQuery ¶
func (p ArchiveVideosParams) EncodeQuery() (url.Values, error)
type ArchivesList ¶
type ArchivesList struct {
Archives []ArchiveAudit `json:"arc_audits"`
Page Page `json:"page"`
PlayType int64 `json:"play_type"`
}
type ArchivesListParams ¶
type ArchivesListParams struct {
// contains filtered or unexported fields
}
func NewArchivesListParams ¶
func NewArchivesListParams(page, pageSize uint32) (ArchivesListParams, error)
func (ArchivesListParams) EncodeQuery ¶
func (p ArchivesListParams) EncodeQuery() (url.Values, error)
type ArticleStat ¶
type ArticleStat struct {
View int64 `json:"view"`
Reply int64 `json:"reply"`
Like int64 `json:"like"`
Coin int64 `json:"coin"`
Favorite int64 `json:"fav"`
IncrementView int64 `json:"incr_view"`
IncrementReply int64 `json:"incr_reply"`
IncrementLike int64 `json:"incr_like"`
IncrementCoin int64 `json:"incr_coin"`
IncrementFavorite int64 `json:"incr_fav"`
}
type ArticleTrendMetric ¶
type ArticleTrendMetric uint8
const ( ArticleTrendRead ArticleTrendMetric = iota + 1 ArticleTrendReply ArticleTrendCoin ArticleTrendFavorite ArticleTrendLike )
type ArticleTrendParams ¶
type ArticleTrendParams struct {
// contains filtered or unexported fields
}
func NewArticleTrendParams ¶
func NewArticleTrendParams(metric ArticleTrendMetric) ArticleTrendParams
func (ArticleTrendParams) EncodeQuery ¶
func (p ArticleTrendParams) EncodeQuery() (url.Values, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides creator-center operations.
func (Client) ArchiveCompare ¶
func (c Client) ArchiveCompare(ctx context.Context, params ArchiveCompareParams) (ArchiveCompare, error)
func (Client) ArchiveVideos ¶
func (c Client) ArchiveVideos(ctx context.Context, params ArchiveVideosParams) (ArchiveVideos, error)
func (Client) ArchivesList ¶
func (c Client) ArchivesList(ctx context.Context, params ArchivesListParams) (ArchivesList, error)
func (Client) ArticleStat ¶
func (c Client) ArticleStat(ctx context.Context) (ArticleStat, error)
func (Client) ArticleTrend ¶
func (Client) ElectromagneticInfo ¶
func (c Client) ElectromagneticInfo(ctx context.Context) (ElectromagneticInfo, error)
func (Client) PlaySource ¶
func (c Client) PlaySource(ctx context.Context) (*PlaySource, error)
func (Client) SeasonByAID ¶
func (Client) SeasonInfo ¶
func (c Client) SeasonInfo(ctx context.Context, params SeasonInfoParams) (SeasonInfo, error)
func (Client) SeasonList ¶
func (c Client) SeasonList(ctx context.Context, params SeasonListParams) (SeasonList, error)
func (Client) SeasonSection ¶
func (c Client) SeasonSection(ctx context.Context, params SectionParams) (SectionEpisodes, error)
func (Client) VideoTrend ¶
func (Client) ViewerData ¶
func (c Client) ViewerData(ctx context.Context) (ViewerData, error)
type ElectromagneticInfo ¶
type Episode ¶
type Episode struct {
ID uint64 `json:"id"`
Title string `json:"title"`
AID uint64 `json:"aid"`
BVID string `json:"bvid"`
CID uint64 `json:"cid"`
SeasonID uint64 `json:"seasonId"`
SectionID uint64 `json:"sectionId"`
Order uint32 `json:"order"`
VideoTitle *string `json:"videoTitle"`
ArchiveTitle *string `json:"archiveTitle"`
ArchiveState int32 `json:"archiveState"`
RejectReason *string `json:"rejectReason"`
State int32 `json:"state"`
Cover string `json:"cover"`
Free uint32 `json:"is_free"`
AIDOwner bool `json:"aid_owner"`
ChargingPay uint32 `json:"charging_pay"`
}
type PlaySource ¶
type Season ¶
type Season struct {
ID uint64 `json:"id"`
Title string `json:"title"`
Description string `json:"desc"`
Cover string `json:"cover"`
Ended uint32 `json:"isEnd"`
MID uint64 `json:"mid"`
Activity uint32 `json:"isAct"`
Paid uint32 `json:"is_pay"`
State int32 `json:"state"`
PartState uint32 `json:"partState"`
SignState uint32 `json:"signState"`
RejectReason *string `json:"rejectReason"`
CreatedAt uint64 `json:"ctime"`
ModifiedAt uint64 `json:"mtime"`
NoSection uint32 `json:"no_section"`
Forbidden uint32 `json:"forbid"`
ProtocolID *string `json:"protocol_id"`
EpisodeCount uint32 `json:"ep_num"`
Price uint32 `json:"season_price"`
Opened uint32 `json:"is_opened"`
ChargingPay uint32 `json:"has_charging_pay"`
PUGVPay *uint32 `json:"has_pugv_pay"`
SeasonUpFrom *uint32 `json:"SeasonUpfrom"`
}
type SeasonByAIDParams ¶
type SeasonByAIDParams struct {
// contains filtered or unexported fields
}
func NewSeasonByAIDParams ¶
func NewSeasonByAIDParams(aid ids.AID) SeasonByAIDParams
func (SeasonByAIDParams) EncodeQuery ¶
func (p SeasonByAIDParams) EncodeQuery() (url.Values, error)
type SeasonInfo ¶
type SeasonInfo struct {
Season Season `json:"season"`
Course json.RawMessage `json:"course"`
CheckIn json.RawMessage `json:"checkin"`
Stat json.RawMessage `json:"seasonStat"`
Sections Sections `json:"sections"`
PartEpisodes json.RawMessage `json:"part_episodes"`
}
type SeasonInfoParams ¶
type SeasonInfoParams struct {
// contains filtered or unexported fields
}
func NewSeasonInfoParams ¶
func NewSeasonInfoParams(seasonID ids.SeasonID) SeasonInfoParams
func (SeasonInfoParams) EncodeQuery ¶
func (p SeasonInfoParams) EncodeQuery() (url.Values, error)
type SeasonItem ¶
type SeasonItem struct {
Season Season `json:"season"`
CheckIn json.RawMessage `json:"checkin"`
Stat *SeasonStat `json:"seasonStat"`
Sections *Sections `json:"sections"`
PartEpisodes []Episode `json:"part_episodes"`
}
type SeasonList ¶
type SeasonList struct {
Seasons []SeasonItem `json:"seasons"`
Tip json.RawMessage `json:"tip"`
Total uint32 `json:"total"`
PlayType uint32 `json:"play_type"`
}
type SeasonListOrder ¶
type SeasonListOrder string
const ( SeasonOrderCreated SeasonListOrder = "ctime" SeasonOrderUpdated SeasonListOrder = "mtime" )
type SeasonListParams ¶
type SeasonListParams struct {
// contains filtered or unexported fields
}
func NewSeasonListParams ¶
func NewSeasonListParams(page, pageSize uint32) (SeasonListParams, error)
func (SeasonListParams) EncodeQuery ¶
func (p SeasonListParams) EncodeQuery() (url.Values, error)
func (SeasonListParams) WithOrder ¶
func (p SeasonListParams) WithOrder(order SeasonListOrder) SeasonListParams
func (SeasonListParams) WithSort ¶
func (p SeasonListParams) WithSort(sort SortOrder) SeasonListParams
type SeasonStat ¶
type SeasonStat struct {
View uint64 `json:"view"`
Danmaku uint64 `json:"danmaku"`
Reply uint64 `json:"reply"`
Favorite uint64 `json:"fav"`
Coin uint64 `json:"coin"`
Like uint64 `json:"like"`
Subscription uint64 `json:"subscription"`
NowRank uint32 `json:"nowRank"`
HistoryRank uint32 `json:"hisRank"`
}
type Section ¶
type Section struct {
ID uint64 `json:"id"`
Type uint32 `json:"type"`
SeasonID uint64 `json:"seasonId"`
Title string `json:"title"`
Order uint32 `json:"order"`
State int32 `json:"state"`
PartState int32 `json:"partState"`
CreatedAt int64 `json:"ctime"`
ModifiedAt int64 `json:"mtime"`
EpisodeCount int64 `json:"epCount"`
Cover string `json:"cover"`
Episodes json.RawMessage `json:"Episodes"`
}
type SectionEpisodes ¶
type SectionParams ¶
type SectionParams struct {
// contains filtered or unexported fields
}
func NewSectionParams ¶
func NewSectionParams(seasonID ids.SeasonID) SectionParams
func (SectionParams) EncodeQuery ¶
func (p SectionParams) EncodeQuery() (url.Values, error)
type UpStat ¶
type UpStat struct {
IncrementCoin int64 `json:"inc_coin"`
IncrementElectric int64 `json:"inc_elec"`
IncrementFavorite int64 `json:"inc_fav"`
IncrementLike int64 `json:"inc_like"`
IncrementClick int64 `json:"incr_click"`
IncrementDanmaku int64 `json:"incr_dm"`
IncrementFans int64 `json:"incr_fans"`
IncrementReply int64 `json:"incr_reply"`
TotalClick int64 `json:"total_click"`
TotalCoin int64 `json:"total_coin"`
TotalDanmaku int64 `json:"total_dm"`
TotalElectric int64 `json:"total_elec"`
TotalFans int64 `json:"total_fans"`
TotalFavorite int64 `json:"total_fav"`
TotalLike int64 `json:"total_like"`
TotalReply int64 `json:"total_reply"`
}
type VideoTrendMetric ¶
type VideoTrendMetric uint8
const ( VideoTrendPlay VideoTrendMetric = iota + 1 VideoTrendDanmaku VideoTrendReply VideoTrendCoin VideoTrendFavorite VideoTrendCharge VideoTrendLike )
type VideoTrendParams ¶
type VideoTrendParams struct {
// contains filtered or unexported fields
}
func NewVideoTrendParams ¶
func NewVideoTrendParams(metric VideoTrendMetric) VideoTrendParams
func (VideoTrendParams) EncodeQuery ¶
func (p VideoTrendParams) EncodeQuery() (url.Values, error)
type ViewerBaseDetail ¶
type ViewerBaseDetail struct {
Male int64 `json:"male"`
Female int64 `json:"female"`
AgeOne int64 `json:"age_one"`
AgeTwo int64 `json:"age_two"`
AgeThree int64 `json:"age_three"`
AgeFour int64 `json:"age_four"`
PC int64 `json:"plat_pc"`
H5 int64 `json:"plat_h5"`
Out int64 `json:"plat_out"`
IOS int64 `json:"plat_ios"`
Android int64 `json:"plat_android"`
OtherApp int64 `json:"plat_other_app"`
}
type ViewerData ¶
type ViewerData struct {
Period map[string]string `json:"period"`
ViewerArea struct {
Fan map[string]int64 `json:"fan"`
NotFan map[string]int64 `json:"not_fan"`
} `json:"viewer_area"`
ViewerBase struct {
Fan ViewerBaseDetail `json:"fan"`
NotFan ViewerBaseDetail `json:"not_fan"`
} `json:"viewer_base"`
}
Click to show internal directories.
Click to hide internal directories.