Documentation ¶
Index ¶
- Variables
- func GetPostID(url string) string
- type Yandere
- func (y *Yandere) Config() *config.SourceCommonConfig
- func (y *Yandere) FetchNewArtworks(limit int) ([]*types.Artwork, error)
- func (y *Yandere) FetchNewArtworksWithCh(artworkCh chan *types.Artwork, limit int) error
- func (y *Yandere) GetArtworkInfo(sourceURL string) (*types.Artwork, error)
- func (y *Yandere) GetCommonSourceURL(url string) string
- func (y *Yandere) GetFileName(artwork *types.Artwork, picture *types.Picture) string
- func (y *Yandere) GetPictureInfo(sourceURL string, _ uint) (*types.Picture, error)
- func (y *Yandere) GetSourceURLRegexp() *regexp.Regexp
- func (y *Yandere) Init(s types.Service)
- type YandereJsonResp
- type YanderePostJsonResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidYanderePostURL = errors.New("invalid yandere post url") ErrYandereAPIError = errors.New("yandere api error") )
Functions ¶
Types ¶
type Yandere ¶
type Yandere struct{}
func (*Yandere) Config ¶
func (y *Yandere) Config() *config.SourceCommonConfig
func (*Yandere) FetchNewArtworks ¶
func (*Yandere) FetchNewArtworksWithCh ¶
func (*Yandere) GetArtworkInfo ¶
func (*Yandere) GetCommonSourceURL ¶
func (*Yandere) GetFileName ¶
func (*Yandere) GetPictureInfo ¶
func (*Yandere) GetSourceURLRegexp ¶
type YandereJsonResp ¶
type YandereJsonResp []YanderePostJsonResp
func (YandereJsonResp) ToArtwork ¶
func (resp YandereJsonResp) ToArtwork() *types.Artwork
type YanderePostJsonResp ¶
type YanderePostJsonResp struct { ID int `json:"id"` Tags string `json:"tags"` Author string `json:"author"` Source string `json:"source"` // title, maybe? FileURL string `json:"file_url"` // original SampleURL string `json:"sample_url"` // thumbnail Width int `json:"width"` Height int `json:"height"` ParentID int `json:"parent_id"` }
Click to show internal directories.
Click to hide internal directories.