-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcommon.go
148 lines (132 loc) · 3.26 KB
/
common.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package jikan
import "time"
// Pagination struct
type Pagination struct {
LastVisiblePage int `json:"last_visible_page"`
HasNextPage bool `json:"has_next_page"`
}
// MalItem struct
type MalItem struct {
MalId int `json:"mal_id"`
Type string `json:"type"`
Name string `json:"name"`
Url string `json:"url"`
}
// MalItemCount struct
type MalItemCount struct {
MalId int `json:"mal_id"`
Name string `json:"name"`
Url string `json:"url"`
Count int `json:"count"`
}
// UserItem struct
type UserItem struct {
Username string `json:"username"`
Url string `json:"url"`
Images Images1 `json:"images"`
}
// DateRange struct
type DateRange struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
Prop struct {
From struct {
Day int `json:"day"`
Month int `json:"month"`
Year int `json:"year"`
} `json:"from"`
To struct {
Day int `json:"day"`
Month int `json:"month"`
Year int `json:"year"`
} `json:"to"`
String string `json:"string"`
} `json:"prop"`
}
// Images1 struct
type Images1 struct {
Jpg struct {
ImageUrl string `json:"image_url"`
} `json:"jpg"`
Webp struct {
ImageUrl string `json:"image_url"`
} `json:"webp"`
}
// Images2 struct
type Images2 struct {
Jpg struct {
ImageUrl string `json:"image_url"`
SmallImageUrl string `json:"small_image_url"`
} `json:"jpg"`
Webp struct {
ImageUrl string `json:"image_url"`
SmallImageUrl string `json:"small_image_url"`
} `json:"webp"`
}
// Images3 struct
type Images3 struct {
Jpg struct {
ImageUrl string `json:"image_url"`
SmallImageUrl string `json:"small_image_url"`
LargeImageUrl string `json:"large_image_url"`
} `json:"jpg"`
Webp struct {
ImageUrl string `json:"image_url"`
SmallImageUrl string `json:"small_image_url"`
LargeImageUrl string `json:"large_image_url"`
} `json:"webp"`
}
// Comment struct
type Comment struct {
Url string `json:"url"`
AuthorUsername string `json:"author_username"`
AuthorUrl string `json:"author_url"`
Date time.Time `json:"date"`
}
// ScoresShort struct
type ScoresShort struct {
Score float64 `json:"score"`
Votes int `json:"votes"`
Percentage float64 `json:"percentage"`
}
// ScoresAnime struct
type ScoresAnime struct {
Overall int `json:"overall"`
Story int `json:"story"`
Animation int `json:"animation"`
Sound int `json:"sound"`
Character int `json:"character"`
Enjoyment int `json:"enjoyment"`
}
// ScoresManga struct
type ScoresManga struct {
Overall int `json:"overall"`
Story int `json:"story"`
Art int `json:"art"`
Character int `json:"character"`
Enjoyment int `json:"enjoyment"`
}
// ScoresLong struct
type ScoresLong struct {
Overall int `json:"overall"`
Story int `json:"story"`
Art int `json:"art"`
Character int `json:"character"`
Enjoyment int `json:"enjoyment"`
Animation int `json:"animation"`
Sound int `json:"sound"`
}
// EntryName2 struct
type EntryName2 struct {
MalId int `json:"mal_id"`
Url string `json:"url"`
Images Images2 `json:"images"`
Name string `json:"title"`
}
// EntryTitle3 struct
type EntryTitle3 struct {
MalId int `json:"mal_id"`
Url string `json:"url"`
Images Images3 `json:"images"`
Title string `json:"title"`
}