Documentation
¶
Overview ¶
Package electric contains parameters and stable response models for Bilibili's public and account-scoped charging APIs.
Index ¶
- type ChallengeInfo
- type ChargeItem
- type ChargeRecord
- type ChargeRecordParams
- type ChargeUP
- type ChargeUser
- type ChargeVIPInfo
- type Client
- func (e Client) ChargeFollowInfo(ctx context.Context, params UpMIDParams) (FollowInfo, error)
- func (e Client) ChargeRecord(ctx context.Context, params ChargeRecordParams) (ChargeRecord, error)
- func (e Client) ItemDetail(ctx context.Context, params UpMIDParams) (ItemDetail, error)
- func (e Client) MemberRank(ctx context.Context, params MemberRankParams) (MemberRank, error)
- func (e Client) MonthUpList(ctx context.Context, params MonthUpListParams) (MonthUpList, error)
- func (e Client) RankRecent(ctx context.Context, params PaginationParams) (RecentRank, error)
- func (e Client) RechargeList(ctx context.Context, params RechargeListParams) (RechargeList, error)
- func (e Client) RemarkDetail(ctx context.Context, params RemarkDetailParams) (RemarkDetail, error)
- func (e Client) RemarkList(ctx context.Context, params RemarkListParams) (RemarkList, error)
- func (e Client) VideoShow(ctx context.Context, params VideoShowParams) (VideoShow, error)
- type FollowInfo
- type ItemDetail
- type ItemIntro
- type LevelInfo
- type MemberInfo
- type MemberRank
- type MemberRankParams
- type MonthUpList
- type MonthUpListParams
- type PaginationParams
- type RankPager
- type RankUser
- type RecentRank
- type RecentRankRecord
- type RechargeList
- type RechargeListParams
- type RechargePage
- type RechargeRecord
- type RemarkDetail
- type RemarkDetailParams
- type RemarkList
- type RemarkListParams
- type RemarkRecord
- type Renew
- type UPCard
- type UPInfo
- type UpMIDParams
- type UpowerRank
- type UserCard
- type VideoShow
- type VideoShowHighLevel
- type VideoShowInfo
- type VideoShowParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChallengeInfo ¶
type ChallengeInfo struct {
ID string `json:"challenge_id"`
Description string `json:"description"`
Type int64 `json:"challenge_type"`
RemainingDays int64 `json:"remaining_days"`
EndTime string `json:"end_time"`
Progress int64 `json:"progress"`
Targets []json.RawMessage `json:"targets"`
State int64 `json:"state"`
EndTimeUnix int64 `json:"end_time_unix"`
PublishedDynamic int64 `json:"pub_dyn"`
DynamicContent string `json:"dyn_content"`
}
type ChargeItem ¶
type ChargeRecord ¶
type ChargeRecordParams ¶
type ChargeRecordParams struct {
// contains filtered or unexported fields
}
func NewChargeRecordParams ¶
func NewChargeRecordParams(page uint64, chargeType uint32) (ChargeRecordParams, error)
func (ChargeRecordParams) EncodeQuery ¶
func (p ChargeRecordParams) EncodeQuery() (url.Values, error)
type ChargeUser ¶
type ChargeVIPInfo ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides charging-support operations.
func (Client) ChargeFollowInfo ¶
func (e Client) ChargeFollowInfo(ctx context.Context, params UpMIDParams) (FollowInfo, error)
func (Client) ChargeRecord ¶
func (e Client) ChargeRecord(ctx context.Context, params ChargeRecordParams) (ChargeRecord, error)
func (Client) ItemDetail ¶
func (e Client) ItemDetail(ctx context.Context, params UpMIDParams) (ItemDetail, error)
func (Client) MemberRank ¶
func (e Client) MemberRank(ctx context.Context, params MemberRankParams) (MemberRank, error)
func (Client) MonthUpList ¶
func (e Client) MonthUpList(ctx context.Context, params MonthUpListParams) (MonthUpList, error)
func (Client) RankRecent ¶
func (e Client) RankRecent(ctx context.Context, params PaginationParams) (RecentRank, error)
func (Client) RechargeList ¶
func (e Client) RechargeList(ctx context.Context, params RechargeListParams) (RechargeList, error)
func (Client) RemarkDetail ¶
func (e Client) RemarkDetail(ctx context.Context, params RemarkDetailParams) (RemarkDetail, error)
func (Client) RemarkList ¶
func (e Client) RemarkList(ctx context.Context, params RemarkListParams) (RemarkList, error)
type FollowInfo ¶
type FollowInfo struct {
Days uint64 `json:"days"`
UPCard UPCard `json:"up_card"`
UserCard UserCard `json:"user_card"`
RemainingDays int64 `json:"remain_days"`
RemainingLessDay uint8 `json:"remain_less_1day"`
Rank UpowerRank `json:"upower_rank"`
Icon string `json:"upower_icon"`
RightCount int64 `json:"upower_right_count"`
OnlyContainsMedal bool `json:"only_contain_medal"`
PrivilegeType uint64 `json:"privilege_type"`
Challenge ChallengeInfo `json:"challenge_info"`
}
type ItemDetail ¶
type ItemDetail struct {
Rank UpowerRank `json:"upower_rank"`
Item ItemIntro `json:"item"`
UserCard UserCard `json:"user_card"`
Level uint8 `json:"upower_level"`
ReplyState uint8 `json:"elec_reply_state"`
VoucherState json.RawMessage `json:"voucher_state"`
RightCounts map[string]uint64 `json:"upower_right_count"`
OnlyContainsMedal bool `json:"only_contain_medal"`
PrivilegeType uint64 `json:"privilege_type"`
}
type MemberInfo ¶
type MemberRank ¶
type MemberRank struct {
UPInfo UPInfo `json:"up_info"`
RankInfo []MemberInfo `json:"rank_info"`
UserInfo MemberInfo `json:"user_info"`
MemberTotal uint64 `json:"member_total"`
PrivilegeType uint64 `json:"privilege_type"`
Charged bool `json:"is_charge"`
Tabs []uint64 `json:"tabs"`
Levels []LevelInfo `json:"level_info"`
}
type MemberRankParams ¶
type MemberRankParams struct {
// contains filtered or unexported fields
}
func NewMemberRankParams ¶
func NewMemberRankParams(upMID ids.MID, page, pageSize uint64) (MemberRankParams, error)
func (MemberRankParams) EncodeQuery ¶
func (p MemberRankParams) EncodeQuery() (url.Values, error)
func (MemberRankParams) WithPrivilegeType ¶
func (p MemberRankParams) WithPrivilegeType(privilegeType uint64) MemberRankParams
type MonthUpList ¶
type MonthUpList struct {
Count int32 `json:"count"`
List []ChargeUser `json:"list"`
TotalCount int32 `json:"total_count"`
}
type MonthUpListParams ¶
type MonthUpListParams struct {
// contains filtered or unexported fields
}
func NewMonthUpListParams ¶
func NewMonthUpListParams(upMID ids.MID) MonthUpListParams
func (MonthUpListParams) EncodeQuery ¶
func (p MonthUpListParams) EncodeQuery() (url.Values, error)
type PaginationParams ¶
type PaginationParams struct {
// contains filtered or unexported fields
}
func NewPaginationParams ¶
func NewPaginationParams(page, pageSize uint64) (PaginationParams, error)
func (PaginationParams) EncodeQuery ¶
func (p PaginationParams) EncodeQuery() (url.Values, error)
type RecentRank ¶
type RecentRank struct {
List []RecentRankRecord `json:"list"`
Pager RankPager `json:"pager"`
}
type RecentRankRecord ¶
type RechargeList ¶
type RechargeList struct {
Page RechargePage `json:"page"`
Result []RechargeRecord `json:"result"`
}
type RechargeListParams ¶
type RechargeListParams struct {
// contains filtered or unexported fields
}
func NewRechargeListParams ¶
func NewRechargeListParams(page, pageSize uint64) (RechargeListParams, error)
func (RechargeListParams) EncodeQuery ¶
func (p RechargeListParams) EncodeQuery() (url.Values, error)
func (RechargeListParams) WithDateRange ¶
func (p RechargeListParams) WithDateRange(begin, end time.Time) (RechargeListParams, error)
type RechargePage ¶
type RechargeRecord ¶
type RemarkDetail ¶
type RemarkDetail = RemarkRecord
type RemarkDetailParams ¶
type RemarkDetailParams struct {
// contains filtered or unexported fields
}
func NewRemarkDetailParams ¶
func NewRemarkDetailParams(id uint64) (RemarkDetailParams, error)
func (RemarkDetailParams) EncodeQuery ¶
func (p RemarkDetailParams) EncodeQuery() (url.Values, error)
type RemarkList ¶
type RemarkList struct {
List []RemarkRecord `json:"list"`
Pager RankPager `json:"pager"`
}
type RemarkListParams ¶
type RemarkListParams struct {
// contains filtered or unexported fields
}
func NewRemarkListParams ¶
func NewRemarkListParams(page, pageSize uint64) (RemarkListParams, error)
func (RemarkListParams) EncodeQuery ¶
func (p RemarkListParams) EncodeQuery() (url.Values, error)
func (RemarkListParams) WithDateRange ¶
func (p RemarkListParams) WithDateRange(begin, end time.Time) (RemarkListParams, error)
type RemarkRecord ¶
type RemarkRecord struct {
AID uint64 `json:"aid"`
BVID string `json:"bvid"`
ID uint64 `json:"id"`
MID uint64 `json:"mid"`
ReplyMID uint64 `json:"reply_mid"`
Electric uint64 `json:"elec_num"`
State uint8 `json:"state"`
Message string `json:"msg"`
ArchiveName string `json:"aname"`
UserName string `json:"uname"`
Avatar string `json:"avator"`
ReplyName string `json:"reply_name"`
ReplyAvatar string `json:"reply_avator"`
ReplyMessage string `json:"reply_msg"`
CreatedAt uint64 `json:"ctime"`
ReplyTime uint64 `json:"reply_time"`
}
type Renew ¶
type Renew struct {
UID uint64 `json:"uid"`
RUID uint64 `json:"ruid"`
GoodsID uint64 `json:"goods_id"`
Status uint8 `json:"status"`
NextExecuteTime uint64 `json:"next_execute_time"`
SignedTime uint64 `json:"signed_time"`
SignedPrice uint64 `json:"signed_price"`
PayChannel uint8 `json:"pay_channel"`
Period uint64 `json:"period"`
MobileApp string `json:"mobile_app"`
}
type UpMIDParams ¶
type UpMIDParams struct {
// contains filtered or unexported fields
}
func NewUpMIDParams ¶
func NewUpMIDParams(upMID ids.MID) UpMIDParams
func (UpMIDParams) EncodeQuery ¶
func (p UpMIDParams) EncodeQuery() (url.Values, error)
type UpowerRank ¶
type VideoShow ¶
type VideoShow struct {
ShowInfo VideoShowInfo `json:"show_info"`
AVCount int32 `json:"av_count"`
Count int32 `json:"count"`
TotalCount int32 `json:"total_count"`
List []ChargeUser `json:"list"`
}
type VideoShowHighLevel ¶
type VideoShowInfo ¶
type VideoShowParams ¶
type VideoShowParams struct {
// contains filtered or unexported fields
}
func NewVideoShowParams ¶
func NewVideoShowParams(mid ids.MID) VideoShowParams
func (VideoShowParams) EncodeQuery ¶
func (p VideoShowParams) EncodeQuery() (url.Values, error)
func (VideoShowParams) WithAID ¶
func (p VideoShowParams) WithAID(aid ids.AID) VideoShowParams
func (VideoShowParams) WithBVID ¶
func (p VideoShowParams) WithBVID(bvid ids.BVID) VideoShowParams
Click to show internal directories.
Click to hide internal directories.