-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCataas.go
52 lines (44 loc) · 940 Bytes
/
Cataas.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package CataasAPI
import "net/url"
type Size string
type Filter string
// small or sm, medium or md, square or sq, original or or
const (
SIZE_SMALL Size = "sm"
SIZE_MEDIUM Size = "md"
SIZE_SQUARE Size = "sq"
SIZE_ORIGINAL Size = "or"
)
// blur, mono, sepia, negative, paint, pixel
const (
FILTER_BLUR Filter = "blur"
FILTER_MONO Filter = "mono"
FILTER_PAINT Filter = "paint"
FILTER_PIXEL Filter = "pixel"
FILTER_SEPIA Filter = "sepia"
FILTER_NEGATIVE Filter = "negative"
)
var uri = &url.URL{
Host: "cataas.com",
Scheme: "https",
}
type Cataas struct {
Gif bool
Tag string
Text string
Width uint
Height uint
TextSize uint
TextColor string
Size Size
Filter Filter
}
type CatByTag struct {
Id string `json:"id"`
CreatedAt string `json:"created_at"`
Tags []string `json:"tags"`
}
type GetCatsOptions struct {
Skip uint
Limit uint
}