Documentation ¶
Index ¶
- Variables
- type Bilibili
- func (b *Bilibili) Config() *config.SourceCommonConfig
- func (b *Bilibili) FetchNewArtworks(limit int) ([]*types.Artwork, error)
- func (b *Bilibili) FetchNewArtworksWithCh(artworkCh chan *types.Artwork, limit int) error
- func (b *Bilibili) GetArtworkInfo(sourceURL string) (*types.Artwork, error)
- func (b *Bilibili) GetCommonSourceURL(url string) string
- func (b *Bilibili) GetFileName(artwork *types.Artwork, picture *types.Picture) string
- func (b *Bilibili) GetPictureInfo(sourceURL string, index uint) (*types.Picture, error)
- func (b *Bilibili) GetSourceURLRegexp() *regexp.Regexp
- func (b *Bilibili) Init(_ types.Service)
- type BilibiliDesktopDynamicApiAuthor
- type BilibiliDesktopDynamicApiDesc
- type BilibiliDesktopDynamicApiDrawItem
- type BilibiliDesktopDynamicApiDynamic
- type BilibiliDesktopDynamicApiEmoji
- type BilibiliDesktopDynamicApiItem
- type BilibiliDesktopDynamicApiModule
- type BilibiliDesktopDynamicApiResp
- type BilibiliDesktopDynamicApiRichTextNode
- type BilibiliWebDynamicApiData
- type BilibiliWebDynamicApiItem
- type BilibiliWebDynamicApiModuleAuthor
- type BilibiliWebDynamicApiModuleDynamic
- type BilibiliWebDynamicApiPic
- type BilibiliWebDynamicApiResp
- type BilibiliWebDynamicApiSummary
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRequestFailed = errors.New("request bilibili dynamic url failed") ErrIndexOOB = errors.New("index out of artwork pictures bounds") ErrInvalidURL = errors.New("invalid bilibili dynamic url") )
View Source
var ErrInvalidArtwork = errors.New("invalid artwork")
Functions ¶
This section is empty.
Types ¶
type Bilibili ¶
type Bilibili struct{}
func (*Bilibili) Config ¶
func (b *Bilibili) Config() *config.SourceCommonConfig
func (*Bilibili) FetchNewArtworks ¶
func (*Bilibili) FetchNewArtworksWithCh ¶
func (*Bilibili) GetArtworkInfo ¶
func (*Bilibili) GetCommonSourceURL ¶
func (*Bilibili) GetFileName ¶
func (*Bilibili) GetPictureInfo ¶
func (*Bilibili) GetSourceURLRegexp ¶
type BilibiliDesktopDynamicApiAuthor ¶ added in v0.68.0
type BilibiliDesktopDynamicApiDesc ¶ added in v0.68.0
type BilibiliDesktopDynamicApiDesc struct { RichTextNodes []*BilibiliDesktopDynamicApiRichTextNode `json:"rich_text_nodes"` Text string `json:"text"` }
type BilibiliDesktopDynamicApiDrawItem ¶ added in v0.68.0
type BilibiliDesktopDynamicApiDynamic ¶ added in v0.68.0
type BilibiliDesktopDynamicApiDynamic struct { DynDraw *struct { Id int `json:"id"` Items []*BilibiliDesktopDynamicApiDrawItem `json:"items"` } `json:"dyn_draw"` Type string `json:"type"` }
type BilibiliDesktopDynamicApiEmoji ¶ added in v0.68.0
type BilibiliDesktopDynamicApiItem ¶ added in v0.68.0
type BilibiliDesktopDynamicApiItem struct { IdStr string `json:"id_str"` Type string `json:"type"` Modules []*BilibiliDesktopDynamicApiModule `json:"modules"` }
type BilibiliDesktopDynamicApiModule ¶ added in v0.68.0
type BilibiliDesktopDynamicApiModule struct { ModuleType string `json:"module_type"` ModuleAuthor *BilibiliDesktopDynamicApiAuthor `json:"module_author,omitempty"` ModuleDesc *BilibiliDesktopDynamicApiDesc `json:"module_desc,omitempty"` ModuleDynamic *BilibiliDesktopDynamicApiDynamic `json:"module_dynamic,omitempty"` }
type BilibiliDesktopDynamicApiResp ¶ added in v0.68.0
type BilibiliDesktopDynamicApiResp struct { Code int `json:"code"` Message string `json:"message"` Data *struct { Item *BilibiliDesktopDynamicApiItem `json:"item"` } `json:"data"` }
type BilibiliDesktopDynamicApiRichTextNode ¶ added in v0.68.0
type BilibiliDesktopDynamicApiRichTextNode struct { Type string `json:"type"` OrigText string `json:"orig_text"` Text string `json:"text"` Emoji *BilibiliDesktopDynamicApiEmoji `json:"emoji,omitempty"` }
type BilibiliWebDynamicApiData ¶ added in v0.68.0
type BilibiliWebDynamicApiData struct {
Item *BilibiliWebDynamicApiItem `json:"item"`
}
type BilibiliWebDynamicApiItem ¶ added in v0.68.0
type BilibiliWebDynamicApiItem struct { Modules *struct { ModuleAuthor *BilibiliWebDynamicApiModuleAuthor `json:"module_author"` ModuleDynamic *BilibiliWebDynamicApiModuleDynamic `json:"module_dynamic"` } `json:"modules"` Type string `json:"type"` IdStr string `json:"id_str"` }
type BilibiliWebDynamicApiModuleAuthor ¶ added in v0.68.0
type BilibiliWebDynamicApiModuleDynamic ¶ added in v0.68.0
type BilibiliWebDynamicApiModuleDynamic struct { Major *struct { Opus *struct { Pics []*BilibiliWebDynamicApiPic `json:"pics"` Summary *BilibiliWebDynamicApiSummary `json:"summary"` Title string `json:"title"` } `json:"opus"` Type string `json:"type"` } `json:"major"` }
type BilibiliWebDynamicApiPic ¶ added in v0.68.0
type BilibiliWebDynamicApiResp ¶ added in v0.68.0
type BilibiliWebDynamicApiResp struct { Code int `json:"code"` Message string `json:"message"` TTL int `json:"ttl"` Data *BilibiliWebDynamicApiData `json:"data"` }
type BilibiliWebDynamicApiSummary ¶ added in v0.68.0
type BilibiliWebDynamicApiSummary struct {
Text string `json:"text"`
}
Click to show internal directories.
Click to hide internal directories.