vip

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: 6 Imported by: 0

Documentation

Overview

Package vip contains parameters and stable response models for Bilibili VIP center endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Center

type Center struct {
	User     User   `json:"user"`
	Wallet   Wallet `json:"wallet"`
	InReview bool   `json:"in_review"`
}

type CenterParams

type CenterParams struct {
	// contains filtered or unexported fields
}

func NewCenterParams

func NewCenterParams() CenterParams

func (CenterParams) EncodeQuery

func (p CenterParams) EncodeQuery() (url.Values, error)

func (CenterParams) WithBuild

func (p CenterParams) WithBuild(build uint32) CenterParams

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides promoted VIP-center reads.

func NewClient

func NewClient(client *core.Client) Client

NewClient binds the vip module to a shared client.

func (Client) Center

func (v Client) Center(ctx context.Context, params CenterParams) (Center, error)

type TVVIP

type TVVIP struct {
	Type       uint32 `json:"type"`
	PayType    uint32 `json:"vip_pay_type"`
	Status     uint32 `json:"status"`
	Expiration uint64 `json:"due_date"`
}

type User

type User struct {
	Account              json.RawMessage `json:"account"`
	VIP                  json.RawMessage `json:"vip"`
	TV                   *TVVIP          `json:"tv"`
	BackgroundImageSmall string          `json:"background_image_small"`
	BackgroundImageBig   string          `json:"background_image_big"`
	PanelTitle           string          `json:"panel_title"`
	VIPOverdueExplain    string          `json:"vip_overdue_explain"`
	TVOverdueExplain     string          `json:"tv_overdue_explain"`
	AccountExceptionText string          `json:"account_exception_text"`
	AutoRenew            bool            `json:"is_auto_renew"`
	TVAutoRenew          bool            `json:"is_tv_auto_renew"`
	SurplusSeconds       uint64          `json:"surplus_seconds"`
	VIPKeepTime          uint64          `json:"vip_keep_time"`
}

type Wallet

type Wallet struct {
	Coupon            uint64 `json:"coupon"`
	Point             uint64 `json:"point"`
	PrivilegeReceived bool   `json:"privilege_received"`
}

Jump to

Keyboard shortcuts

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