Documentation ¶
Index ¶
- type Artwork
- func (i *Artwork) Fetch() (err error)
- func (i *Artwork) FetchPages() (err error)
- func (i *Artwork) FetchPagesWithClient(c client.Client) (err error)
- func (i *Artwork) FetchWithClient(c client.Client) (err error)
- func (i Artwork) URL() *url.URL
- func (i Artwork) URLWithClient(c client.Client) *url.URL
- type Page
- type Rank
- type RankItem
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artwork ¶
type Artwork struct { ID string Title string Type string Description string Image image.URLs Created time.Time Tags []string Author user.User Width int64 Height int64 PageCount int64 CommentCount int64 LikeCount int64 ViewCount int64 BookmarkCount int64 Pages []Page // contains filtered or unexported fields }
Artwork data
func (*Artwork) Fetch ¶
Fetch additional data from pixiv single artwork api, only fetch once for same struct.
func (*Artwork) FetchPages ¶
FetchPages get all pages for artwork from pixiv artwork pages api, only fetch once for same struct.
func (*Artwork) FetchPagesWithClient ¶
FetchPagesWithClient do request with given client.
func (*Artwork) FetchWithClient ¶
FetchWithClient do fetch with given client.
type Rank ¶
type Rank struct { /* required, possible rank modes: - daily (default) - weekly - monthly - rookie - original - male - female - daily_r18 - weekly_r18 - male_r18 - female_r18 - r18g */ Mode string /* optional, possible rank content: - all (default) - illust - ugoira - manga */ Content string Date time.Time Page int Items []RankItem }
Rank contains data for one rank page.
func (*Rank) FetchWithClient ¶
FetchWithClient do request with given client
type SearchResult ¶
SearchResult holds search data and provide useful methods.
func Search ¶
func Search(query string, page int) (result SearchResult, err error)
Search calls pixiv artwork search api.
func SearchWithClient ¶
SearchWithClient do search with given client.
func (SearchResult) Artworks ¶
func (r SearchResult) Artworks() []Artwork
Artworks appeared in search result.
Click to show internal directories.
Click to hide internal directories.