Documentation
¶
Overview ¶
Package fav contains parameters and stable response models for Bilibili favorite-folder read endpoints.
Index ¶
- type Client
- func (f Client) CollectedList(ctx context.Context, params CollectedListParams) (CollectedList, error)
- func (f Client) CreatedList(ctx context.Context, params CreatedListParams) (CreatedList, error)
- func (f Client) FolderInfo(ctx context.Context, params FolderInfoParams) (FolderInfo, error)
- func (f Client) ListDetail(ctx context.Context, params ListDetailParams) (ListDetail, error)
- func (f Client) ResourceIDs(ctx context.Context, params ResourceIDsParams) ([]ResourceID, error)
- func (f Client) ResourceInfos(ctx context.Context, params ResourceInfosParams) ([]ResourceInfo, error)
- type CollectedFolder
- type CollectedList
- type CollectedListParams
- type CollectedUpper
- type CountInfo
- type CreatedFolder
- type CreatedList
- type CreatedListParams
- func (p CreatedListParams) EncodeQuery() (url.Values, error)
- func (p CreatedListParams) WithResourceID(resourceID uint64) (CreatedListParams, error)
- func (p CreatedListParams) WithType(typeID uint8) CreatedListParams
- func (p CreatedListParams) WithWebLocation(webLocation string) (CreatedListParams, error)
- type FolderInfo
- type FolderInfoParams
- type FolderUpper
- type ListDetail
- type ListDetailParams
- func (p ListDetailParams) EncodeQuery() (url.Values, error)
- func (p ListDetailParams) WithContentType(typeID uint8) ListDetailParams
- func (p ListDetailParams) WithKeyword(keyword string) (ListDetailParams, error)
- func (p ListDetailParams) WithOrder(order string) (ListDetailParams, error)
- func (p ListDetailParams) WithPage(page uint32) (ListDetailParams, error)
- func (p ListDetailParams) WithPageSize(pageSize uint32) (ListDetailParams, error)
- func (p ListDetailParams) WithTID(tid uint32) ListDetailParams
- type ResourceID
- type ResourceIDsParams
- type ResourceInfo
- type ResourceInfosParams
- type ResourceUpper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides favorites-domain operations.
func (Client) CollectedList ¶
func (f Client) CollectedList(ctx context.Context, params CollectedListParams) (CollectedList, error)
func (Client) CreatedList ¶
func (f Client) CreatedList(ctx context.Context, params CreatedListParams) (CreatedList, error)
func (Client) FolderInfo ¶
func (f Client) FolderInfo(ctx context.Context, params FolderInfoParams) (FolderInfo, error)
func (Client) ListDetail ¶
func (f Client) ListDetail(ctx context.Context, params ListDetailParams) (ListDetail, error)
func (Client) ResourceIDs ¶
func (f Client) ResourceIDs(ctx context.Context, params ResourceIDsParams) ([]ResourceID, error)
func (Client) ResourceInfos ¶
func (f Client) ResourceInfos(ctx context.Context, params ResourceInfosParams) ([]ResourceInfo, error)
type CollectedFolder ¶
type CollectedFolder struct {
ID uint64 `json:"id"`
FID uint64 `json:"fid"`
MID uint64 `json:"mid"`
Attribute uint32 `json:"attr"`
Title string `json:"title"`
Cover string `json:"cover"`
Upper CollectedUpper `json:"upper"`
CoverType uint8 `json:"cover_type"`
Intro string `json:"intro"`
CreatedAt uint64 `json:"ctime"`
ModifiedAt uint64 `json:"mtime"`
State uint8 `json:"state"`
FavState uint8 `json:"fav_state"`
MediaCount uint32 `json:"media_count"`
}
type CollectedList ¶
type CollectedList struct {
Count uint32 `json:"count"`
List []CollectedFolder `json:"list"`
}
type CollectedListParams ¶
type CollectedListParams struct {
// contains filtered or unexported fields
}
func NewCollectedListParams ¶
func NewCollectedListParams(upMID ids.MID) CollectedListParams
func (CollectedListParams) EncodeQuery ¶
func (p CollectedListParams) EncodeQuery() (url.Values, error)
func (CollectedListParams) WithPage ¶
func (p CollectedListParams) WithPage(page uint32) (CollectedListParams, error)
func (CollectedListParams) WithPageSize ¶
func (p CollectedListParams) WithPageSize(pageSize uint32) (CollectedListParams, error)
type CollectedUpper ¶
type CreatedFolder ¶
type CreatedList ¶
type CreatedList struct {
Count uint32 `json:"count"`
List []CreatedFolder `json:"list"`
}
type CreatedListParams ¶
type CreatedListParams struct {
// contains filtered or unexported fields
}
func NewCreatedListParams ¶
func NewCreatedListParams(upMID ids.MID) CreatedListParams
func (CreatedListParams) EncodeQuery ¶
func (p CreatedListParams) EncodeQuery() (url.Values, error)
func (CreatedListParams) WithResourceID ¶
func (p CreatedListParams) WithResourceID(resourceID uint64) (CreatedListParams, error)
func (CreatedListParams) WithType ¶
func (p CreatedListParams) WithType(typeID uint8) CreatedListParams
func (CreatedListParams) WithWebLocation ¶
func (p CreatedListParams) WithWebLocation(webLocation string) (CreatedListParams, error)
type FolderInfo ¶
type FolderInfo struct {
ID uint64 `json:"id"`
FID uint64 `json:"fid"`
MID uint64 `json:"mid"`
Attribute uint32 `json:"attr"`
Title string `json:"title"`
Cover string `json:"cover"`
Upper FolderUpper `json:"upper"`
CoverType uint8 `json:"cover_type"`
CountInfo CountInfo `json:"cnt_info"`
Type uint32 `json:"type"`
Intro string `json:"intro"`
CreatedAt uint64 `json:"ctime"`
ModifiedAt uint64 `json:"mtime"`
State uint8 `json:"state"`
FavState uint8 `json:"fav_state"`
LikeState uint8 `json:"like_state"`
MediaCount uint32 `json:"media_count"`
}
type FolderInfoParams ¶
type FolderInfoParams struct {
// contains filtered or unexported fields
}
func NewFolderInfoParams ¶
func NewFolderInfoParams(mediaID ids.MediaID) FolderInfoParams
func (FolderInfoParams) EncodeQuery ¶
func (p FolderInfoParams) EncodeQuery() (url.Values, error)
type FolderUpper ¶
type ListDetail ¶
type ListDetail struct {
Info FolderInfo `json:"info"`
Medias []ResourceInfo `json:"medias"`
HasMore bool `json:"has_more"`
TTL uint64 `json:"ttl"`
}
type ListDetailParams ¶
type ListDetailParams struct {
// contains filtered or unexported fields
}
func NewListDetailParams ¶
func NewListDetailParams(mediaID ids.MediaID) ListDetailParams
func (ListDetailParams) EncodeQuery ¶
func (p ListDetailParams) EncodeQuery() (url.Values, error)
func (ListDetailParams) WithContentType ¶
func (p ListDetailParams) WithContentType(typeID uint8) ListDetailParams
func (ListDetailParams) WithKeyword ¶
func (p ListDetailParams) WithKeyword(keyword string) (ListDetailParams, error)
func (ListDetailParams) WithOrder ¶
func (p ListDetailParams) WithOrder(order string) (ListDetailParams, error)
func (ListDetailParams) WithPage ¶
func (p ListDetailParams) WithPage(page uint32) (ListDetailParams, error)
func (ListDetailParams) WithPageSize ¶
func (p ListDetailParams) WithPageSize(pageSize uint32) (ListDetailParams, error)
func (ListDetailParams) WithTID ¶
func (p ListDetailParams) WithTID(tid uint32) ListDetailParams
type ResourceID ¶
type ResourceIDsParams ¶
type ResourceIDsParams struct {
// contains filtered or unexported fields
}
func NewResourceIDsParams ¶
func NewResourceIDsParams(mediaID ids.MediaID) ResourceIDsParams
func (ResourceIDsParams) EncodeQuery ¶
func (p ResourceIDsParams) EncodeQuery() (url.Values, error)
type ResourceInfo ¶
type ResourceInfo struct {
ID uint64 `json:"id"`
Type uint8 `json:"type"`
Title string `json:"title"`
Cover string `json:"cover"`
Intro string `json:"intro"`
Page *uint32 `json:"page"`
Duration uint32 `json:"duration"`
Upper ResourceUpper `json:"upper"`
Attribute uint8 `json:"attr"`
CountInfo CountInfo `json:"cnt_info"`
Link string `json:"link"`
CreatedAt uint64 `json:"ctime"`
PublishedAt uint64 `json:"pubtime"`
FavoritedAt uint64 `json:"fav_time"`
BVID *string `json:"bvid"`
BVIDLegacy *string `json:"bv_id"`
Season json.RawMessage `json:"season"`
}
type ResourceInfosParams ¶
type ResourceInfosParams struct {
// contains filtered or unexported fields
}
func NewResourceInfosParams ¶
func NewResourceInfosParams(resources string) (ResourceInfosParams, error)
func (ResourceInfosParams) EncodeQuery ¶
func (p ResourceInfosParams) EncodeQuery() (url.Values, error)
type ResourceUpper ¶
Click to show internal directories.
Click to hide internal directories.