Documentation ¶
Index ¶
- Variables
- type Danbooru
- func (d *Danbooru) Config() *config.SourceCommonConfig
- func (d *Danbooru) FetchNewArtworks(limit int) ([]*types.Artwork, error)
- func (d *Danbooru) FetchNewArtworksWithCh(artworkCh chan *types.Artwork, limit int) error
- func (d *Danbooru) GetArtworkInfo(sourceURL string) (*types.Artwork, error)
- func (d *Danbooru) GetCommonSourceURL(url string) string
- func (d *Danbooru) GetFileName(artwork *types.Artwork, picture *types.Picture) string
- func (d *Danbooru) GetPictureInfo(sourceURL string, _ uint) (*types.Picture, error)
- func (d *Danbooru) GetSourceURLRegexp() *regexp.Regexp
- func (d *Danbooru) Init()
- type DanbooruFailJsonResp
- type DanbooruJsonResp
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidDanbooruPostURL = errors.New("invalid danbooru post url")
)
Functions ¶
This section is empty.
Types ¶
type Danbooru ¶
type Danbooru struct{}
func (*Danbooru) Config ¶
func (d *Danbooru) Config() *config.SourceCommonConfig
func (*Danbooru) FetchNewArtworks ¶
func (*Danbooru) FetchNewArtworksWithCh ¶
func (*Danbooru) GetArtworkInfo ¶
func (*Danbooru) GetCommonSourceURL ¶
func (*Danbooru) GetFileName ¶
func (*Danbooru) GetPictureInfo ¶
func (*Danbooru) GetSourceURLRegexp ¶
type DanbooruFailJsonResp ¶
type DanbooruJsonResp ¶
type DanbooruJsonResp struct { ID int `json:"id"` ImageWidth int `json:"image_width"` ImageHeight int `json:"image_height"` TagString string `json:"tag_string"` FileURL string `json:"file_url"` LargeFileURL string `json:"large_file_url"` DanbooruFailJsonResp }
func (*DanbooruJsonResp) ToArtwork ¶
func (resp *DanbooruJsonResp) ToArtwork() *types.Artwork
Click to show internal directories.
Click to hide internal directories.