Documentation
¶
Overview ¶
Package publicapi handles the default API functionality reverse engineered from the public API
Index ¶
Constants ¶
View Source
const ( // order of the search results SearchOrderAscending = "asc" SearchOrderDescending = "desc" // search modes SearchModePartialTagMatch = "tag" SearchModeExactTagMatch = "exact_tag" SearchModeText = "text" SearchModeTitleAndCaption = "caption" )
noinspection GoUnusedConst
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicAPI ¶
PublicAPI is the implementation of the public API
func NewPublicAPI ¶
NewPublicAPI initializes the public API and handles the whole OAuth2 and round tripper procedures
func (*PublicAPI) GetSearchIllust ¶
func (a *PublicAPI) GetSearchIllust( word string, searchMode string, searchOrder string, page int, ) (*SearchIllust, error)
GetSearchIllust returns the illustration search results from the API
type PublicIllustration ¶
type PublicIllustration struct {
ID int `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
ImageURLs struct {
Large string `json:"large"`
} `json:"image_urls"`
PageCount int `json:"page_count"`
}
PublicIllustration is the illustration response from the public API search
type SearchIllust ¶
type SearchIllust struct {
Illustrations []PublicIllustration `json:"response"`
Status string `json:"status"`
Count json.Number `json:"count"`
Pagination struct {
Previous *int `json:"previous"`
Current *int `json:"current"`
Next *int `json:"next"`
Total *int `json:"total"`
} `json:"pagination"`
}
SearchIllust contains all relevant information regarding the illustration search
Click to show internal directories.
Click to hide internal directories.