Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- type Client
- func (c *Client) IllustDetail(ctx context.Context, id int64) (*model.IllustDetail, error)
- func (c *Client) IllustPages(ctx context.Context, id int64) ([]model.MetaPage, error)
- func (c *Client) IllustRanking(ctx context.Context, mode, date string, offset int) (*model.IllustList, error)
- func (c *Client) SearchIllust(ctx context.Context, word, target, sort, duration string, offset int) (*model.IllustList, error)
- func (c *Client) SearchUser(ctx context.Context, word string, offset int) (*model.UserPreviewList, error)
- func (c *Client) UgoiraMetadata(ctx context.Context, id int64) (*model.UgoiraMetadataResult, error)
- type EnvelopeError
- type IllustPagesError
- type Option
Constants ¶
View Source
const (
DefaultWebBase = "https://www.pixiv.net"
)
Variables ¶
View Source
var ErrMalformedResponse = errors.New("web api returned a malformed response")
ErrMalformedResponse 标识成功 HTTP 响应无法构成约定 JSON,不包含原始响应体。
View Source
var ErrUnrepresentablePagination = errors.New("web api pagination cannot represent cursor offset")
ErrUnrepresentablePagination 标识 cursor offset 无法安全换算为 Web 页码和下一页边界。
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) IllustDetail ¶
func (*Client) IllustPages ¶
func (*Client) IllustRanking ¶
func (*Client) SearchIllust ¶
func (*Client) SearchUser ¶
func (*Client) UgoiraMetadata ¶
type EnvelopeError ¶
type EnvelopeError struct {
Message string
}
EnvelopeError 表示 Web ajax envelope 主动报告失败。
func (EnvelopeError) Error ¶
func (e EnvelopeError) Error() string
type IllustPagesError ¶
type IllustPagesError struct {
// contains filtered or unexported fields
}
IllustPagesError 保留匿名详情流程中 pages 子阶段,供 facade 精确标注 operation。
func (*IllustPagesError) Error ¶
func (e *IllustPagesError) Error() string
func (*IllustPagesError) Unwrap ¶
func (e *IllustPagesError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.