note

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

Documentation

Overview

Package note contains validated parameters and stable response models for Bilibili video notes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveList

type ArchiveList struct {
	NoteIDs []string `json:"noteIds"`
}

type ArchiveListParams

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

func NewArchiveListParams

func NewArchiveListParams(aid ids.AID) ArchiveListParams

func (ArchiveListParams) EncodeQuery

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

type Client

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

Client provides promoted public, authenticated, and private note reads.

func NewClient

func NewClient(client *core.Client) Client

NewClient binds the note module to a shared client.

func (Client) ArchiveList

func (n Client) ArchiveList(ctx context.Context, params ArchiveListParams) (ArchiveList, error)

func (Client) IsForbid

func (n Client) IsForbid(ctx context.Context, params IsForbidParams) (IsForbid, error)

func (Client) PrivateInfo

func (n Client) PrivateInfo(ctx context.Context, params PrivateInfoParams) (PrivateInfo, error)

func (Client) PublicArchiveList

func (n Client) PublicArchiveList(ctx context.Context, params PublicArchiveListParams) (PublicArchiveList, error)

func (Client) PublicInfo

func (n Client) PublicInfo(ctx context.Context, params PublicInfoParams) (PublicInfo, error)

func (Client) UserPrivateList

func (n Client) UserPrivateList(ctx context.Context, params Pagination) (PrivateList, error)

func (Client) UserPublicList

func (n Client) UserPublicList(ctx context.Context, params Pagination) (PublicUserList, error)

type IsForbid

type IsForbid struct {
	ForbidNoteEntrance bool `json:"forbid_note_entrance"`
}

type IsForbidParams

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

func NewIsForbidParams

func NewIsForbidParams(aid ids.AID) IsForbidParams

func (IsForbidParams) EncodeQuery

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

type Page

type Page struct {
	Total uint32 `json:"total"`
	Size  uint32 `json:"size"`
	Page  uint32 `json:"num"`
}

type Pagination

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

func NewPagination

func NewPagination() Pagination

func (Pagination) EncodeQuery

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

func (Pagination) WithPage

func (p Pagination) WithPage(page uint32) (Pagination, error)

func (Pagination) WithPageSize

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

type PrivateArc

type PrivateArc struct {
	OID         uint64 `json:"oid"`
	OIDType     uint8  `json:"oid_type"`
	Title       string `json:"title"`
	Picture     string `json:"pic"`
	Status      uint32 `json:"status"`
	Description string `json:"desc"`
}

type PrivateInfo

type PrivateInfo struct {
	Arc                PrivateArc `json:"arc"`
	AuditStatus        uint8      `json:"audit_status"`
	CIDCount           uint32     `json:"cid_count"`
	Content            string     `json:"content"`
	ForbidNoteEntrance bool       `json:"forbid_note_entrance"`
	PublishReason      *string    `json:"pub_reason"`
	PublishStatus      uint8      `json:"pub_status"`
	PublishVersion     uint32     `json:"pub_version"`
	Summary            string     `json:"summary"`
	Tags               []Tag      `json:"tags"`
	Title              string     `json:"title"`
}

type PrivateInfoParams

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

func NewPrivateInfoParams

func NewPrivateInfoParams(aid ids.AID, noteID ids.NoteID) PrivateInfoParams

func (PrivateInfoParams) EncodeQuery

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

type PrivateList

type PrivateList struct {
	Items []PrivateListItem `json:"list"`
	Page  *Page             `json:"page"`
}

type PrivateListArc

type PrivateListArc struct {
	OID         uint64  `json:"oid"`
	Status      uint8   `json:"status"`
	OIDType     uint8   `json:"oid_type"`
	AID         uint64  `json:"aid"`
	BVID        *string `json:"bvid"`
	Picture     *string `json:"pic"`
	Description *string `json:"desc"`
}

type PrivateListItem

type PrivateListItem struct {
	Title              string         `json:"title"`
	Summary            string         `json:"summary"`
	ModifiedTime       string         `json:"mtime"`
	Arc                PrivateListArc `json:"arc"`
	NoteID             uint64         `json:"note_id"`
	AuditStatus        uint8          `json:"audit_status"`
	WebURL             string         `json:"web_url"`
	NoteIDString       string         `json:"note_id_str"`
	Message            string         `json:"message"`
	ForbidNoteEntrance *bool          `json:"forbid_note_entrance"`
	Likes              uint64         `json:"likes"`
	HasLiked           bool           `json:"has_like"`
}

type PublicArc

type PublicArc struct {
	OID         uint64 `json:"oid"`
	OIDType     uint8  `json:"oid_type"`
	Title       string `json:"title"`
	Status      uint32 `json:"status"`
	Picture     string `json:"pic"`
	Description string `json:"desc"`
}

type PublicArchiveList

type PublicArchiveList struct {
	Items          []PublicListItem `json:"list"`
	Page           *Page            `json:"page"`
	ShowPublicNote bool             `json:"show_public_note"`
	Message        string           `json:"message"`
}

type PublicArchiveListParams

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

func NewPublicArchiveListParams

func NewPublicArchiveListParams(aid ids.AID) PublicArchiveListParams

func (PublicArchiveListParams) EncodeQuery

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

func (PublicArchiveListParams) WithPage

func (PublicArchiveListParams) WithPageSize

type PublicAuthor

type PublicAuthor struct {
	MID     uint64          `json:"mid"`
	Name    string          `json:"name"`
	Face    string          `json:"face"`
	Level   uint8           `json:"level"`
	VIP     json.RawMessage `json:"vip_info"`
	Pendant json.RawMessage `json:"pendant"`
}

type PublicInfo

type PublicInfo struct {
	CVID               uint64       `json:"cvid"`
	NoteID             uint64       `json:"note_id"`
	Title              string       `json:"title"`
	Summary            string       `json:"summary"`
	Content            string       `json:"content"`
	CIDCount           uint32       `json:"cid_count"`
	PublishStatus      uint8        `json:"pub_status"`
	Tags               []Tag        `json:"tags"`
	Arc                PublicArc    `json:"arc"`
	Author             PublicAuthor `json:"author"`
	ForbidNoteEntrance bool         `json:"forbid_note_entrance"`
}

type PublicInfoParams

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

func NewPublicInfoParams

func NewPublicInfoParams(cvid ids.CVID) PublicInfoParams

func (PublicInfoParams) EncodeQuery

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

type PublicListItem

type PublicListItem struct {
	CVID        uint64       `json:"cvid"`
	Title       string       `json:"title"`
	Summary     string       `json:"summary"`
	PublishTime string       `json:"pubtime"`
	WebURL      string       `json:"web_url"`
	Message     string       `json:"message"`
	Author      PublicAuthor `json:"author"`
	Likes       uint64       `json:"likes"`
	HasLiked    bool         `json:"has_like"`
}

type PublicUserList

type PublicUserList struct {
	Items []PublicListItem `json:"list"`
	Page  *Page            `json:"page"`
}

type Tag

type Tag struct {
	CID      uint64 `json:"cid"`
	Status   uint8  `json:"status"`
	Index    uint32 `json:"index"`
	Seconds  uint32 `json:"seconds"`
	Position uint32 `json:"pos"`
}

Jump to

Keyboard shortcuts

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