Documentation
¶
Overview ¶
Package note contains validated parameters and stable response models for Bilibili video notes.
Index ¶
- type ArchiveList
- type ArchiveListParams
- type Client
- func (n Client) ArchiveList(ctx context.Context, params ArchiveListParams) (ArchiveList, error)
- func (n Client) IsForbid(ctx context.Context, params IsForbidParams) (IsForbid, error)
- func (n Client) PrivateInfo(ctx context.Context, params PrivateInfoParams) (PrivateInfo, error)
- func (n Client) PublicArchiveList(ctx context.Context, params PublicArchiveListParams) (PublicArchiveList, error)
- func (n Client) PublicInfo(ctx context.Context, params PublicInfoParams) (PublicInfo, error)
- func (n Client) UserPrivateList(ctx context.Context, params Pagination) (PrivateList, error)
- func (n Client) UserPublicList(ctx context.Context, params Pagination) (PublicUserList, error)
- type IsForbid
- type IsForbidParams
- type Page
- type Pagination
- type PrivateArc
- type PrivateInfo
- type PrivateInfoParams
- type PrivateList
- type PrivateListArc
- type PrivateListItem
- type PublicArc
- type PublicArchiveList
- type PublicArchiveListParams
- type PublicAuthor
- type PublicInfo
- type PublicInfoParams
- type PublicListItem
- type PublicUserList
- type Tag
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 (Client) ArchiveList ¶
func (n Client) ArchiveList(ctx context.Context, params ArchiveListParams) (ArchiveList, 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 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 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 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 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 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 (p PublicArchiveListParams) WithPage(page uint32) (PublicArchiveListParams, error)
func (PublicArchiveListParams) WithPageSize ¶
func (p PublicArchiveListParams) WithPageSize(size uint32) (PublicArchiveListParams, error)
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"`
}
Click to show internal directories.
Click to hide internal directories.