Documentation ¶
Overview ¶
Package pixivapi offers shared functionality for the public API and the mobile API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRequestError ¶
type APIRequestError struct {
ErrorMessage string `json:"error"`
}
APIRequestError is the error struct of invalid requests
func (APIRequestError) Error ¶
func (e APIRequestError) Error() string
Error returns the occurred API error message
type IllustrationUnavailableError ¶
type IllustrationUnavailableError struct {
}IllustrationUnavailableError will get returned from the illustration detail API request if the illustration got either deleted or made unavailable in general
type MobileAPIError ¶
type MobileAPIError struct { ErrorDetails struct { UserMessage string `json:"user_message"` Message string `json:"message"` Reason string `json:"reason"` } `json:"error"` }
MobileAPIError is the error struct of the mobile API
func (MobileAPIError) Error ¶
func (e MobileAPIError) Error() string
Error returns the occurred API error message
type PixivAPI ¶
type PixivAPI struct { Session watcherHttp.SessionInterface OAuth2Config *oauth2.Config // contains filtered or unexported fields }
PixivAPI is the struct offering shared functionality for the public API and the mobile API
func NewPixivAPI ¶
NewPixivAPI returned a pixiv API struct with already configured round trips
func (*PixivAPI) AddRoundTrippers ¶
AddRoundTrippers adds the required round trippers for the OAuth2 pixiv APIs
func (*PixivAPI) ApplyRateLimit ¶
func (a *PixivAPI) ApplyRateLimit()
ApplyRateLimit waits until the leaky bucket can pass another request again
type UserUnavailableError ¶
type UserUnavailableError struct {
}UserUnavailableError will get returned from the user information API request if the user got deleted or made unavailable in general