pixiv

package
v1.0.1-0...-b16c9cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Papi   *papi.Client
	Aapi   *aapi.AppPixivAPI
	Logger *zap.Logger
}

func NewClient

func NewClient(config *ClientConfig) *Client

func (*Client) Ranking

func (c *Client) Ranking(ctx context.Context, mode, content string, date time.Time, page int) ([]artwork.RankItem, error)

Ranking return ranking with ppai without login status. required, possible rank modes:

  • daily (default)
  • weekly
  • monthly
  • rookie
  • original
  • male
  • female
  • daily_r18
  • weekly_r18
  • male_r18
  • female_r18
  • r18g

optional, possible rank content:

  • all (default)
  • illust
  • ugoira
  • manga

date: YYYYMMDD (default is yesterday) page: pages

func (*Client) Search

func (c *Client) Search(ctx context.Context,
	query string, order artwork.Order,
	contentRating artwork.ContentRating,
	searchmode artwork.SearchMode,
	offset int) (art []artwork.Artwork, err error)

Search offset would only be 1+. For example, if set offset = 0, would be 1. []artwork.Artwork,只有部分数据,通过 `Fetch` `FetchPages` 方法获取完整数据。 search mode - s_tc: title & word - s_tag: partial consistent

type ClientConfig

type ClientConfig struct {
	Username string
	Password string
	Cookies  string
	Logger   *zap.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL