Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Novel ¶
type Novel struct { ID string Title string Description string CoverURL string Content string Created time.Time Uploaded time.Time Author user.User Series Series Tags []string TextCount int64 PageCount int64 CommentCount int64 LikeCount int64 ViewCount int64 BookmarkCount int64 }
Novel data
type SearchOption ¶ added in v0.4.0
type SearchOption func(*SearchOptions)
SearchOption mutate SearchOptions
func SearchOptionPage ¶ added in v0.4.0
func SearchOptionPage(page int) SearchOption
SearchOptionPage change page to retrive
type SearchOptions ¶ added in v0.4.0
type SearchOptions struct {
Page int
}
SearchOptions for Search
type SearchResult ¶
SearchResult holds search data and provide useful methods.
func Search ¶
func Search(ctx context.Context, query string, opts ...SearchOption) (result SearchResult, err error)
Search calls pixiv novel search api.
func (SearchResult) ForEach ¶
func (r SearchResult) ForEach(iterator func(key, value gjson.Result) bool)
ForEach iterates through novel data items.
func (SearchResult) Novels ¶
func (r SearchResult) Novels() []Novel
Novels appeared in the search result.
Click to show internal directories.
Click to hide internal directories.