Documentation
¶
Index ¶
- Variables
- func Init()
- type Item
- type Pixiv
- func (p *Pixiv) FetchNewArtworks(ctx context.Context, limit int) ([]*dto.FetchedArtwork, error)
- func (p *Pixiv) GetArtworkInfo(ctx context.Context, sourceURL string) (*dto.FetchedArtwork, error)
- func (p *Pixiv) MatchesSourceURL(text string) (string, bool)
- func (p *Pixiv) PrettyFileName(artwork shared.ArtworkLike, picture shared.PictureLike) string
- type PixivAjaxResp
- type PixivAjaxRespBody
- type PixivAjaxRespBodyTagTranslation
- type PixivAjaxRespBodyTags
- type PixivAjaxRespBodyTagsTag
- type PixivIllustPages
- type PixivIllustPagesBody
- type PixivRss
- type PixivUgoiraMeta
- type PixivUgoiraMetaBody
- type PixivUgoiraMetaFrame
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 {
// contains filtered or unexported fields
}
func (*Pixiv) FetchNewArtworks ¶
func (*Pixiv) GetArtworkInfo ¶
func (*Pixiv) PrettyFileName ¶
func (p *Pixiv) PrettyFileName(artwork shared.ArtworkLike, picture shared.PictureLike) string
type PixivAjaxResp ¶
type PixivAjaxResp struct {
Body *PixivAjaxRespBody `json:"body"`
Message string `json:"message"`
Err bool `json:"error"`
}
type PixivAjaxRespBody ¶
type PixivAjaxRespBody struct {
Urls struct {
Mini string `json:"mini"`
Thumb string `json:"thumb"`
Small string `json:"small"`
Regular string `json:"regular"`
Original string `json:"original"`
} `json:"urls"`
IllustId string `json:"illustId"`
IlustTitle string `json:"illustTitle"`
UserId string `json:"userId"`
Username string `json:"userName"`
UserAccount string `json:"userAccount"`
Description string `json:"description"`
Tags PixivAjaxRespBodyTags `json:"tags"`
IllustType int `json:"illustType"` // 2: ugoira (动图) 0: 普通图片
}
type PixivAjaxRespBodyTagTranslation ¶
type PixivAjaxRespBodyTagTranslation struct {
En string `json:"en"` // 实际上会出现其他语言翻译
}
type PixivAjaxRespBodyTags ¶
type PixivAjaxRespBodyTags struct {
Tags []PixivAjaxRespBodyTagsTag `json:"tags"`
}
type PixivAjaxRespBodyTagsTag ¶
type PixivAjaxRespBodyTagsTag struct {
Translation *PixivAjaxRespBodyTagTranslation `json:"translation"`
// 返回里确实就是这么套的
Tag string `json:"tag"`
}
type PixivIllustPages ¶
type PixivIllustPages struct {
Message string `json:"message"`
Body []*PixivIllustPagesBody `json:"body"`
Err bool `json:"error"`
}
type PixivIllustPagesBody ¶
type PixivUgoiraMeta ¶
type PixivUgoiraMeta struct {
Body *PixivUgoiraMetaBody `json:"body"`
Message string `json:"message"`
Error bool `json:"error"`
}
type PixivUgoiraMetaBody ¶
type PixivUgoiraMetaBody struct {
Src string `json:"src"`
OriginalSrc string `json:"originalSrc"`
MimeType string `json:"mimeType"`
Frames []PixivUgoiraMetaFrame `json:"frames"`
}
type PixivUgoiraMetaFrame ¶
Click to show internal directories.
Click to hide internal directories.