Documentation
¶
Overview ¶
Package wallhaven implements search and download functionality for wallhaven.cc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Categories ¶
type Categories uint32
Categories specifies the enabled wallpaper categories of a search query.
const ( CatGeneral Categories = 1 << iota CatAnime CatPeople )
Wallpaper categories.
func (Categories) Key ¶
func (v Categories) Key() string
Key returns the key of the search parameter.
func (*Categories) Set ¶
func (v *Categories) Set(s string) error
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- general
- anime
- people
func (Categories) String ¶
func (v Categories) String() string
String returns a string representation of the search option.
func (Categories) Value ¶
func (v Categories) Value() string
Value returns the value of the search parameter.
type ID ¶
type ID string
ID represents the wallpaper ID of a specific wallpaper on wallhaven.cc.
type Option ¶
type Option interface { // Key returns the key of the search parameter. Key() string // Value returns the value of the search parameter. Value() string }
An Option represents a search option.
type Order ¶
type Order int
Order specifies the sorting order used in search queries.
func (*Order) Set ¶
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- asc
- desc
type Page ¶
type Page int
Page specifies the result page number.
type Purity ¶
type Purity uint32
Purity specifies the enabled purity modes of a search query.
func (*Purity) Set ¶
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- SFW
- sketchy
- NSFW
type Ratios ¶
type Ratios uint32
Ratio specifies the enabled aspect ratios of a search query.
Aspect ratios.
func (*Ratios) Set ¶
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- 4x3
- 5x4
- 16x9
- 16x10
- 21x9
- 32x9
- 48x9
type Resolutions ¶
type Resolutions uint32
Resolutions specifies the enabled screen resolution of a search query.
const ( Res1024x768 Resolutions = 1 << iota Res1280x800 Res1366x768 Res1280x960 Res1440x900 Res1600x900 Res1280x1024 Res1600x1200 Res1680x1050 Res1920x1080 Res1920x1200 Res2560x1440 Res2560x1600 Res3840x1080 Res5760x1080 Res3840x2160 )
Screen resolutions.
func (Resolutions) Key ¶
func (v Resolutions) Key() string
Key returns the key of the search parameter.
func (*Resolutions) Set ¶
func (v *Resolutions) Set(s string) error
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- 1024x768
- 1280x800
- 1366x768
- 1280x960
- 1440x900
- 1600x900
- 1280x1024
- 1600x1200
- 1680x1050
- 1920x1080
- 1920x1200
- 2560x1440
- 2560x1600
- 3840x1080
- 5760x1080
- 3840x2160
func (Resolutions) String ¶
func (v Resolutions) String() string
String returns a string representation of the search option.
func (Resolutions) Value ¶
func (v Resolutions) Value() string
Value returns the value of the search parameter.
type Sorting ¶
type Sorting int
Sorting specifies the sorting method used in search queries.
Sorting methods.
func (*Sorting) Set ¶
Set implements the flag.Value interface. A comma-separated list of the following options is valid:
- relevance
- random
- date_added
- views
- favorites