Documentation
¶
Index ¶
- Variables
- func GetPid(url string) string
- type Item
- type Pixiv
- func (p *Pixiv) Config() *config.SourceCommonConfig
- func (p *Pixiv) FetchNewArtworks(limit int) ([]*types.Artwork, error)
- func (p *Pixiv) FetchNewArtworksWithCh(artworkCh chan *types.Artwork, limit int) error
- func (p *Pixiv) GetArtworkInfo(sourceURL string) (*types.Artwork, error)
- func (p *Pixiv) GetCommonSourceURL(url string) string
- func (p *Pixiv) GetFileName(artwork *types.Artwork, picture *types.Picture) string
- func (p *Pixiv) GetPictureInfo(sourceURL string, index uint) (*types.Picture, error)
- func (p *Pixiv) GetSourceURLRegexp() *regexp.Regexp
- func (p *Pixiv) Init(s types.Service)
- type PixivAjaxResp
- type PixivAjaxRespBody
- type PixivAjaxRespBodyTagTranslation
- type PixivAjaxRespBodyTags
- type PixivAjaxRespBodyTagsTag
- type PixivIllustPages
- type PixivIllustPagesBody
- type PixivRss
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnmarshalPixivAjax = errors.New("error decoding artwork info, maybe the artwork is deleted")
)
Functions ¶
Types ¶
type Pixiv ¶
type Pixiv struct{}
func (*Pixiv) Config ¶
func (p *Pixiv) Config() *config.SourceCommonConfig
func (*Pixiv) FetchNewArtworks ¶
func (*Pixiv) FetchNewArtworksWithCh ¶
func (*Pixiv) GetArtworkInfo ¶
func (*Pixiv) GetCommonSourceURL ¶
func (*Pixiv) GetFileName ¶
func (*Pixiv) GetPictureInfo ¶
func (*Pixiv) GetSourceURLRegexp ¶
type PixivAjaxResp ¶
type PixivAjaxResp struct {
Err bool `json:"error"`
Message string `json:"message"`
Body *PixivAjaxRespBody `json:"body"`
}
type PixivAjaxRespBody ¶
type PixivAjaxRespBody struct {
IllustId string `json:"illustId"`
IlustTitle string `json:"illustTitle"`
IllustType int `json:"illustType"`
Urls struct {
Mini string `json:"mini"`
Thumb string `json:"thumb"`
Small string `json:"small"`
Regular string `json:"regular"`
Original string `json:"original"`
} `json:"urls"`
Tags PixivAjaxRespBodyTags `json:"tags"`
UserId string `json:"userId"`
Username string `json:"userName"`
UserAccount string `json:"userAccount"`
Description string `json:"description"`
}
type PixivAjaxRespBodyTagTranslation ¶
type PixivAjaxRespBodyTagTranslation struct {
En string `json:"en"` // 实际上会出现其他语言翻译
}
type PixivAjaxRespBodyTags ¶
type PixivAjaxRespBodyTags struct {
Tags []PixivAjaxRespBodyTagsTag `json:"tags"`
}
type PixivAjaxRespBodyTagsTag ¶
type PixivAjaxRespBodyTagsTag struct {
// 返回里确实就是这么套的
Tag string `json:"tag"`
Translation *PixivAjaxRespBodyTagTranslation `json:"translation"`
}
type PixivIllustPages ¶
type PixivIllustPages struct {
Err bool `json:"error"`
Message string `json:"message"`
Body []*PixivIllustPagesBody `json:"body"`
}
type PixivIllustPagesBody ¶
Click to show internal directories.
Click to hide internal directories.