summary refs log tree commit diff stats
path: root/cmd/cetus-wallhaven/cetus-wallhaven.go
diff options
context:
space:
mode:
authorAndinus <andinus@inventati.org>2020-03-16 14:09:43 +0530
committerAndinus <andinus@inventati.org>2020-03-16 14:09:43 +0530
commit5d15226d9d6891ae611aa7922f24ed5f0dd13cde (patch)
treee08c247319166686a7b01f5640ca8656f6c3c367 /cmd/cetus-wallhaven/cetus-wallhaven.go
parent259f47d1a22329844724e6e909b574de606cdbdc (diff)
downloadcetus-5d15226d9d6891ae611aa7922f24ed5f0dd13cde.tar.gz
cetus-wallhaven: Print additional information, fix logical error
Diffstat (limited to 'cmd/cetus-wallhaven/cetus-wallhaven.go')
-rw-r--r--cmd/cetus-wallhaven/cetus-wallhaven.go47
1 files changed, 24 insertions, 23 deletions
diff --git a/cmd/cetus-wallhaven/cetus-wallhaven.go b/cmd/cetus-wallhaven/cetus-wallhaven.go
index 5314db9..8c6c928 100644
--- a/cmd/cetus-wallhaven/cetus-wallhaven.go
+++ b/cmd/cetus-wallhaven/cetus-wallhaven.go
@@ -18,32 +18,32 @@ type wh struct {
 }
 
 // type meta struct {
-// 	CurrentPage int64  `json:"current_page"`
-// 	LastPage    int64  `json:"last_page"`
-// 	PerPage     int64  `json:"per_page"`
-// 	Total       int64  `json:"total"`
+// 	CurrentPage int    `json:"current_page"`
+// 	LastPage    int    `json:"last_page"`
+// 	PerPage     int    `json:"per_page"`
+// 	Total       int    `json:"total"`
 // 	Query       string `json:"query"`
 // 	Seed        string `json:"seed"`
 // }
 
 type photo 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:"general"`
-	// DimensionX int      `json:"dimension_x"`
-	// DimensionY int      `json:"dimension_y"`
-	Resolution string `json:"resolution"`
-	Ratio      string `json:"ratio"`
-	// FileSize   int      `json:"file_size"`
-	FileType  string   `json:"file_type"`
-	CreatedAt string   `json:"created_at"`
-	Path      string   `json:"path"`
-	Colors    []string `json:"colors"`
+	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   int      `json:"file_size"`
+	FileType   string   `json:"file_type"`
+	CreatedAt  string   `json:"created_at"`
+	Path       string   `json:"path"`
+	Colors     []string `json:"colors"`
 	// Thumbs     []thumb  `json:"thumbs"`
 }
 
@@ -134,8 +134,9 @@ func printDetails(whPhoto photo) {
 	fmt.Printf("Date: %s\n\n", whPhoto.CreatedAt)
 	fmt.Printf("Resolution: %s\n", whPhoto.Resolution)
 	fmt.Printf("Ratio: %s\n", whPhoto.Ratio)
-	// fmt.Printf("Views: %s\n", whPhoto.Views)
-	// fmt.Printf("Favorites: %s\n", whPhoto.Favorites)
+	fmt.Printf("Views: %d\n", whPhoto.Views)
+	fmt.Printf("Favorites: %d\n", whPhoto.Favorites)
+	fmt.Printf("File Size: %d KiB\n", whPhoto.FileSize/1024)
 	fmt.Printf("Category: %s\n", whPhoto.Category)
 }
 
ame/apidocs/c/profhooks.h?id=44cba5019a944bfb2d9d8b70210186daa9bd7a77'>^
5d6b2d0b ^
9d782fa6 ^

43b1d7f7 ^

5d6b2d0b ^
43b1d7f7 ^
9d782fa6 ^
5d6b2d0b ^
9d782fa6 ^

43b1d7f7 ^


83385cdb ^
9d782fa6 ^
30e96b2d ^
9d782fa6 ^

43b1d7f7 ^


9d782fa6 ^
30e96b2d ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^


9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^

9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^
83385cdb ^
9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^
9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^



a948d741 ^
43b1d7f7 ^


a948d741 ^
43b1d7f7 ^


9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^

9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^

83385cdb ^
9d782fa6 ^
a948d741 ^
9d782fa6 ^

43b1d7f7 ^
a948d741 ^
43b1d7f7 ^

9d782fa6 ^
a948d741 ^
43b1d7f7 ^




































































a948d741 ^
43b1d7f7 ^
a948d741 ^
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220