Documentation ¶
Index ¶
- Constants
- Variables
- func TrimSpaceAndSplit(str string) []string
- type AIArt
- type Category
- type Client
- func (c *Client) GetCollectionWallpapers(ctx context.Context, req *GetCollectionWallpapersReq) (*GetCollectionWallpapersRsp, error)
- func (c *Client) GetCollections(ctx context.Context, req *GetCollectionsReq) (*GetCollectionsRsp, error)
- func (c *Client) GetSettings(ctx context.Context) (*GetSettingsRsp, error)
- func (c *Client) GetTag(ctx context.Context, req *GetTagReq) (*Tag, error)
- func (c *Client) GetWallpaper(ctx context.Context, req *GetWallpaperReq) (*Wallpaper, error)
- func (c *Client) Search(ctx context.Context, req *SearchReq) (*SearchRsp, error)
- type Collection
- type Color
- type GetCollectionWallpapersReq
- type GetCollectionWallpapersRsp
- type GetCollectionsReq
- type GetCollectionsRsp
- type GetSettingsRsp
- type GetTagReq
- type GetWallpaperReq
- type Meta
- type MetaQuery
- type Order
- type Purity
- type Query
- func (q *Query) AddExclude(tag string)
- func (q *Query) AddFuzzy(tag string)
- func (q *Query) AddMust(tag string)
- func (q *Query) SetExact(tag int)
- func (q *Query) SetLike(like string)
- func (q *Query) SetType(typ Type)
- func (q *Query) SetUsername(username string)
- func (q *Query) String() (result string)
- type Ratio
- type Ratios
- type Resolution
- type Resolutions
- type SearchReq
- type SearchRsp
- type SetOption
- type Sorting
- type Tag
- type Thumbs
- type TopRange
- type Type
- type Uploader
- type Wallpaper
Constants ¶
View Source
const ( // Ultrawide R_2560x1080 Resolution = "2560x1080" R_3440x1440 Resolution = "3440x1440" R_3840x1600 Resolution = "3840x1600" // 16:9 R_1280x720 = "1280x720" R_1600x900 = "1600x900" R_1920x1080 = "1920x1080" R_2560x1440 = "2560x1440" R_3840x2160 = "3840x2160" // 16:10 R_1280x800 = "1280x800" R_1600x1000 = "1600x1000" R_1920x1200 = "1920x1200" R_2560x1600 = "2560x1600" R_3840x2400 = "3840x2400" // 4:3 R_1280x960 = "1280x960" R_1600x1200 = "1600x1200" R_1920x1440 = "1920x1440" R_2560x1920 = "2560x1920" R_3840x2880 = "3840x2880" // 5:4 R_1280x1024 = "1280x1024" R_1600x1280 = "1600x1280" R_1920x1536 = "1920x1536" R_2560x2048 = "2560x2048" R_3840x3072 = "3840x3072" )
Variables ¶
View Source
var (
ErrUnknown = errors.New("unknown err")
)
Functions ¶
func TrimSpaceAndSplit ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCollectionWallpapers ¶
func (c *Client) GetCollectionWallpapers(ctx context.Context, req *GetCollectionWallpapersReq) ( *GetCollectionWallpapersRsp, error)
func (*Client) GetCollections ¶
func (c *Client) GetCollections(ctx context.Context, req *GetCollectionsReq) (*GetCollectionsRsp, error)
func (*Client) GetSettings ¶
func (c *Client) GetSettings(ctx context.Context) (*GetSettingsRsp, error)
func (*Client) GetWallpaper ¶
type Collection ¶
type Color ¶
type Color = string
const ( C_660000 Color = "660000" C_990000 Color = "990000" C_cc0000 Color = "cc0000" C_cc3333 Color = "cc3333" C_ea4c88 Color = "ea4c88" C_993399 Color = "993399" C_663399 Color = "663399" C_333399 Color = "333399" C_0066cc Color = "0066cc" C_0099cc Color = "0099cc" C_66cccc Color = "66cccc" C_77cc33 Color = "77cc33" C_669900 Color = "669900" C_336600 Color = "336600" C_666600 Color = "666600" C_999900 Color = "999900" C_cccc33 Color = "cccc33" C_ffff00 Color = "ffff00" C_ffcc33 Color = "ffcc33" C_ff9900 Color = "ff9900" C_ff6600 Color = "ff6600" C_cc6633 Color = "cc6633" C_996633 Color = "996633" C_663300 Color = "663300" C_000000 Color = "000000" C_999999 Color = "999999" C_cccccc Color = "cccccc" C_ffffff Color = "ffffff" C_424153 Color = "424153" )
type GetCollectionWallpapersReq ¶
func (*GetCollectionWallpapersReq) API ¶
func (gcw *GetCollectionWallpapersReq) API() string
func (*GetCollectionWallpapersReq) Map ¶
func (gcw *GetCollectionWallpapersReq) Map() map[string]string
type GetCollectionsReq ¶
type GetCollectionsReq struct {
Username string
}
func (*GetCollectionsReq) API ¶
func (gcr *GetCollectionsReq) API() string
func (*GetCollectionsReq) Map ¶
func (gcr *GetCollectionsReq) Map() map[string]string
type GetCollectionsRsp ¶
type GetCollectionsRsp struct {
Collections []Collection `json:"data"`
}
type GetSettingsRsp ¶
type GetSettingsRsp struct { ThumbSize string `json:"thumb_size"` PerPage string `json:"per_page"` Purity []string `json:"purity"` Categories []string `json:"categories"` Resolutions []string `json:"resolutions"` AspectRatios []string `json:"aspect_ratios"` TopListRange string `json:"toplist_range"` TagBlacklist []string `json:"tag_blacklist"` UserBlacklist []string `json:"user_blacklist"` }
type GetWallpaperReq ¶
type GetWallpaperReq struct {
ID string
}
func (*GetWallpaperReq) API ¶
func (gwr *GetWallpaperReq) API() string
func (*GetWallpaperReq) Map ¶
func (gwr *GetWallpaperReq) Map() map[string]string
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) AddExclude ¶
func (*Query) SetUsername ¶
type Ratio ¶
type Ratio = string
const ( Landscape Ratio = "landscape" Portrait Ratio = "portrait" // Wide O_16x9 Ratio = "16x9" O_16x10 Ratio = "16x10" // Ultrawide O_21x9 Ratio = "21x9" O_32x9 Ratio = "32x9" O_48x9 Ratio = "48x9" // Portrait O_9x16 Ratio = "9x16" O_10x16 Ratio = "10x16" O_9x18 Ratio = "9x18" // Square O_1x1 Ratio = "1x1" O_3x2 Ratio = "3x2" O_4x3 Ratio = "4x3" O_5x4 Ratio = "5x4" )
type Resolution ¶
type Resolution = string
type Resolutions ¶
type Resolutions struct {
// contains filtered or unexported fields
}
func (*Resolutions) Map ¶
func (r *Resolutions) Map() map[string]string
func (*Resolutions) SetAtLeast ¶
func (r *Resolutions) SetAtLeast(al Resolution) *Resolutions
func (*Resolutions) SetCustom ¶
func (r *Resolutions) SetCustom(width, height int) *Resolutions
func (*Resolutions) SetExact ¶
func (r *Resolutions) SetExact(rs ...Resolution) *Resolutions
type SearchReq ¶
type Wallpaper ¶
type Wallpaper struct { Id string `json:"id"` Url string `json:"url"` ShortUrl string `json:"short_url"` Uploader Uploader `json:"uploader"` Views int `json:"views"` Favorites int `json:"favorites"` Source string `json:"source"` Purity string `json:"purity"` Category string `json:"category"` DimensionX int `json:"dimension_x"` DimensionY int `json:"dimension_y"` Resolution string `json:"resolution"` Ratio string `json:"ratio"` FileSize int `json:"file_size"` FileType string `json:"file_type"` CreatedAt string `json:"created_at"` Colors []string `json:"colors"` Path string `json:"path"` Thumbs Thumbs `json:"thumbs"` Tags []Tag `json:"tags"` }
Click to show internal directories.
Click to hide internal directories.