/
model.go
65 lines (59 loc) · 1.57 KB
/
model.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
53
54
55
56
57
58
59
60
61
62
63
64
65
package frankerfacez
import "time"
/* Example JSON data generated from https://api.frankerfacez.com/v1/emote/131001 2020-11-18
{
"emote": {
"created_at": "2016-09-25T12:30:30.313Z",
"css": null,
"height": 21,
"hidden": false,
"id": 131001,
"last_updated": "2016-09-25T14:25:01.408Z",
"margins": null,
"modifier": false,
"name": "pajaE",
"offset": null,
"owner": {
"_id": 63119,
"display_name": "pajaSWA",
"name": "pajaswa"
},
"public": true,
"status": 1,
"urls": {
"1": "//cdn.frankerfacez.com/emote/131001/1",
"2": "//cdn.frankerfacez.com/emote/131001/2",
"4": "//cdn.frankerfacez.com/emote/131001/4"
},
"usage_count": 9,
"width": 32
}
}
*/
type FrankerFaceZUser struct {
DisplayName string `json:"display_name"`
ID int `json:"_id"`
Name string `json:"name"`
}
type FrankerFaceZEmoteAPIResponse struct {
Height int16 `json:"height"`
Modifier bool `json:"modifier"`
Status int `json:"status"`
Width int16 `json:"width"`
Hidden bool `json:"hidden"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"last_updated"`
ID int `json:"id"`
Name string `json:"name"`
Public bool `json:"public"`
Owner FrankerFaceZUser `json:"owner"`
URLs struct {
Size1 string `json:"1"`
Size2 string `json:"2"`
Size4 string `json:"4"`
} `json:"urls"`
}
type TooltipData struct {
Code string
Uploader string
}