-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjects.go
344 lines (307 loc) · 11.8 KB
/
objects.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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
package spotify
type Album struct {
AlbumType string `json:"album_type"`
Artists []ArtistSimple `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
Copyrights []Copyright `json:"copyrights"`
ExternalIds map[string]string `json:"external_ids"`
ExternalUrls map[string]string `json:"external_urls"`
Genres []string `json:"genres"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Label string `json:"label"`
Name string `json:"name"`
Popularity int `json:"popularity"`
ReleaseDate string `json:"release_date"`
ReleaseDatePrecision string `json:"release_date_precision"`
Restrictions Restrictions `json:"restrictions"`
Tracks []TrackSimple `json:"tracks"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type AlbumSimple struct {
AlbumGroup string `json:"album_group"`
AlbumType string `json:"album_type"`
Artists []ArtistSimple `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
ExternalUrls map[string]string `json:"external_url"`
Genres []string `json:"genres"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Name string `json:"name"`
ReleaseDate string `json:"release_date"`
ReleaseDatePrecision string `json:"release_date_precision"`
Restrictions Restrictions `json:"restrictions"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type Artist struct {
ExternalUrls map[string]string `json:"external_url"`
Followers Followers `json:"followers"`
Genres []string `json:"genres"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Name string `json:"name"`
Popularity int `json:"popularity"`
Uri string `json:"uri"`
Type string `json:"type"`
}
type ArtistSimple struct {
ExternalUrls map[string]string `json:"external_url"`
Href string `json:"href"`
Id string `json:"id"`
Name string `json:"name"`
Uri string `json:"uri"`
Type string `json:"type"`
}
type AudioFeatures struct {
Acousticness float32 `json:"acousticness"`
AnalysisUrl string `json:"analysis_url"`
Danceability float32 `json:"danceability"`
DurationMs int `json:"duration_ms"`
Energy float32 `json:"energy"`
Id string `json:"id"`
Instrumentalness float32 `json:"instrumentalness"`
Key int `json:"key"`
Liveness float32 `json:"liveness"`
Loudness float32 `json:"loudness"`
Mode int `json:"mode"`
Speechiness float32 `json:"speechiness"`
Tempo float32 `json:"tempo"`
TimeSignature int `json:"time_signature"`
TrackHref string `json:"track_href"`
Type string `json:"type"`
Uri string `json:"uri"`
Valence float32 `json:"valence"`
}
type Category struct {
Href string `json:"href"`
Icons []Image `json:"icons"`
Id string `json:"id"`
Name string `json:"name"`
}
type Context struct {
Type string `json:"type"`
Href string `json:"href"`
ExternalUrls map[string]string `json:"external_urls"`
Uri string `json:"uri"`
}
type Copyright struct {
Text string `json:"text"`
Type string `json:"type"`
}
type Cursor struct {
After string `json:"after"`
}
type Disallows map[string]string
type Error struct {
Status int `json:"status"`
Message string `json:"message"`
}
type ExternalUrls map[string]string
type ExternalIds map[string]string
type PlayerError struct {
Status int `json:"status"`
Message string `json:"message"`
Reason string `json:"reason"`
}
type Followers struct {
Href string `json:"href"`
Total int `json:"total"`
}
type Image struct {
Height int `json:"height"`
Url string `json:"url"`
Width int `json:"width"`
}
type Paging struct {
Href string `json:"href"`
Items interface{} `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Offset int `json:"offset"`
Previous string `json:"previous"`
Total int `json:"total"`
}
type TrackPaging struct {
Href string `json:"href"`
Items []Track `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Offset int `json:"offset"`
Previous string `json:"previous"`
Total int `json:"total"`
}
type AlbumPaging struct {
Href string `json:"href"`
Items []AlbumSimple `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Offset int `json:"offset"`
Previous string `json:"previous"`
Total int `json:"total"`
}
type ArtistPaging struct {
Href string `json:"href"`
Items []Artist `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Offset int `json:"offset"`
Previous string `json:"previous"`
Total int `json:"total"`
}
type PlaylistPaging struct {
Href string `json:"href"`
Items []PlaylistSimple `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Offset int `json:"offset"`
Previous string `json:"previous"`
Total int `json:"total"`
}
type CursorBasedPaging struct {
Href string `json:"href"`
Items interface{} `json:"items"`
Limit int `json:"limit"`
Next string `json:"next"`
Cursors Cursor `json:"cursors"`
Total int `json:"total"`
}
type Playlist struct {
Collaborative bool `json:"collaborative"`
Descriptions string `json:"descriptions"`
ExternalUrls map[string]string `json:"external_urls"`
Followers Followers `json:"followers"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Name string `json:"name"`
Owner User `json:"owner"`
Public bool `json:"public"`
SnapshotId string `json:"snapshot_id"`
Tracks Paging `json:"tracks"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type PlaylistSimple struct {
Collaborative bool `json:"collaborative"`
Descriptions string `json:"descriptions"`
ExternalUrls map[string]string `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Name string `json:"name"`
Owner User `json:"owner"`
Public bool `json:"public"`
SnapshotId string `json:"snapshot_id"`
Tracks Paging `json:"tracks"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type PlaylistTrack struct {
AddedAt Timestamp `json:"added_at"`
AddedBy User `json:"added_by"`
IsLocal bool `json:"is_local"`
Track Track `json:"track"`
}
type Recommendations struct {
Seeds []RecommendationSeed `json:"seeds"`
Tracks []TrackSimple `json:"tracks"`
}
type RecommendationSeed struct {
AfterFilteringSize int `json:"after_filtering_size"`
AfterRelinkingSize int `json:"after_relinking_size"`
Href string `json:"href"`
Id string `json:"id"`
InitialPoolSize int `json:"initial_pool_size"`
Type string `json:"type"`
}
type Restrictions interface{}
type SavedTrack struct {
AddedAt Timestamp `json:"added_at"`
Track Track `json:"track"`
}
type SavedAlbum struct {
AddedAt Timestamp `json:"added_at"`
Album Album `json:"album"`
}
type Timestamp string
type Track struct {
Album AlbumSimple `json:"album"`
Artists []ArtistSimple `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
DiscNumber int `json:"disc_number"`
DurationMs int `json:"duration_ms"`
Explicit bool `json:"explicit"`
ExternalIds map[string]string `json:"external_ids"`
Href string `json:"href"`
Id string `json:"id"`
IsPlayable bool `json:"is_playable"`
LinkedFrom TrackLink `json:"linked_from"`
Restrictions Restrictions `json:"restrictions"`
Name string `json:"name"`
Popularity int `json:"popularity"`
PreviewUrl string `json:"preview_url"`
TrackNumber int `json:"track_number"`
Type string `json:"type"`
Uri string `json:"uri"`
IsLocal bool `json:"is_local"`
}
type TrackSimple struct {
Artists []ArtistSimple `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
DiscNumber int `json:"disc_number"`
DurationMs int `json:"duration_ms"`
Explicit bool `json:"explicit"`
ExternalIds map[string]string `json:"external_ids"`
Href string `json:"href"`
Id string `json:"id"`
IsPlayable bool `json:"is_playable"`
LinkedFrom TrackLink `json:"linked_from"`
Restrictions Restrictions `json:"restrictions"`
Name string `json:"name"`
PreviewUrl string `json:"preview_url"`
TrackNumber int `json:"track_number"`
Type string `json:"type"`
Uri string `json:"uri"`
IsLocal bool `json:"is_local"`
}
type TrackLink struct {
ExternalUrls map[string]string `json:"external_urls"`
Href string `json:"href"`
Id string `json:"id"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type User struct {
DisplayName string `json:"display_name"`
ExternalUrls map[string]string `json:"external_urls"`
Followers Followers `json:"followers"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type UserPrivate struct {
Country string `json:"country"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
ExternalUrls map[string]string `json:"external_urls"`
Followers Followers `json:"followers"`
Href string `json:"href"`
Id string `json:"id"`
Images []Image `json:"images"`
Product string `json:"product"`
Type string `json:"type"`
Uri string `json:"uri"`
}
type State struct {
CurrentTrack Track `json:"currentTrack"`
Position int `json:"position"`
Duration int `json:"duration"`
Paused bool `json:"paused"`
}