src

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CTAGS = map[string]string{
	"all":     "111",
	"anime":   "010",
	"general": "100",
	"people":  "001",
	"ga":      "110",
	"gp":      "101",
}

Categories tags

View Source
var PTAGS = map[string]string{
	"sfw":     "100",
	"sketchy": "010",
	"nsfw":    "001",
	"ws":      "110",
	"wn":      "101",
	"sn":      "011",
	"all":     "111",
}

Purity tags

View Source
var SORTING = map[string]string{
	"relevance":  "relevance",
	"random":     "random",
	"date_added": "date_added",
	"favorites":  "favorites",
	"views":      "views",
	"toplist":    "toplist",
	"hot":        "hot",
}

Functions

This section is empty.

Types

type Config

type Config struct {
	APIURL string
	APIKEY string
	DIR    string
}
var BASE_CONFIG Config

Base Config

func (Config) GetURL

func (c Config) GetURL(query string) string

type ImageInfo

type ImageInfo struct {
	Id         string `json:"id"`
	Url        string `json:"url"`
	ShortUrl   string `json:"short_url"`
	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   int64  `json:"file_size"`
	FileType   string `json:"file_type"`
	CreatedAt  string `json:"created_at"`
	Colors     []string
	Path       string       `json:"path"`
	Thumbs     ThumbsStruct `json:"thumbs"`
}

type MetaStruct

type MetaStruct struct {
	CurrentPage int    `json:"current_page"`
	LastPage    int    `json:"last_page"`
	PerPage     string `json:"per_page"`
	Total       int    `json:"total"`
}

type SearchList

type SearchList struct {
	Data []ImageInfo
	Meta MetaStruct
}

type ThumbsStruct

type ThumbsStruct struct {
	Large    string `json:"large"`
	Original string `json:"original"`
	Small    string `json:"small"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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