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
use serde::{Serialize, Deserialize};
use crate::album::Album;
use crate::annotation::Referent;
use crate::user::{User, UserMetadata};
use crate::{Body, Date};
#[derive(Serialize, Deserialize, Debug)]
pub struct Song {
/// Number of annotations on this song.
pub annotation_count: u32,
/// Path of the API.
pub api_path: String,
/// Id of the song in apple music.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub apple_music_id: Option<String>,
/// URL of the song in apple music.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub apple_music_player_url: Option<String>,
/// Number of comments on this song.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub comment_count: Option<u32>,
/// Custom header image.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_header_image_url: Option<String>,
/// Custom song art image.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_song_art_image_url: Option<String>,
/// Description of the music.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<Body>,
/// Preview of the description.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub description_preview: Option<String>,
/// HTML to embed the content in a web page.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub embed_content: Option<String>,
/// Facebook share message without url.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub facebook_share_message_without_url: Option<String>,
/// If has a video linked with this song.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub featured_video: Option<bool>,
/// Full song title is: "`name` by `author`".
pub full_title: String,
/// If has instagram reels annotations.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub has_instagram_reel_annotations: Option<bool>,
/// Header image with a smaller size.
pub header_image_thumbnail_url: String,
/// Header image.
pub header_image_url: String,
/// If this song is hidden?
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub hidden: Option<bool>,
/// Id of the song.
pub id: u32,
/// If is instrumental song.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub instrumental: Option<bool>,
/// If this song is a music lol
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub is_music: Option<bool>,
/// Literally lyrics.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub lyrics: Option<Body>,
/// Id of the user who requested the lyrics.
pub lyrics_owner_id: u32,
/// Lyrics state.
pub lyrics_state: String,
/// Lyrics updated timestamp.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub lyrics_updated_at: Option<u64>,
/// Path where is in genius.com website.
pub path: String,
/// Pending lyrics edits count.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub pending_lyrics_edits_count: Option<u32>,
/// If is published?
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub published: Option<bool>,
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub pusher_channel: Option<String>,
/// Release date of the album in struct format [`Date`].
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date_components: Option<Date>,
/// Number of pyongs in this song.
#[serde(skip_serializing_if = "Option::is_none")]
pub pyongs_count: Option<u32>,
/// The location of the recording.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub recording_location: Option<String>,
/// Release date of this song in ISO 8601 date format.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date: Option<String>,
/// Release date in `{Month name} {day}, {year}` format.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date_for_display: Option<String>,
/// Share url.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub share_url: Option<String>,
/// Song art image with a smaller size.
pub song_art_image_thumbnail_url: String,
/// Song art image.
pub song_art_image_url: String,
/// Soundcloud url.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub soundcloud_url: Option<String>,
/// Spotify uuid.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub spotify_uuid: Option<String>,
/// Information about contribution and views.
pub stats: SongStatus,
/// Title of the song.
pub title: String,
/// Title but with the featured artist if it exists.
pub title_with_featured: String,
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub tracking_paths: Option<TrackingPaths>,
/// Twitter share message
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub twitter_share_message: Option<String>,
/// Twitter share message without url.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub twitter_share_message_without_url: Option<String>,
/// Updated by a human timestamp.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_by_human_at: Option<u64>,
/// Url of the song page.
pub url: String,
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub viewable_by_roles: Option<Vec<String>>,
/// Youtube start.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub youtube_start: Option<String>,
/// Youtube url.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub youtube_url: Option<String>,
/// User permissions and interactions.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub current_user_metadata: Option<UserMetadata>,
/// Author of the song.
pub primary_artist: Artist,
/// Album of the song.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub album: Option<Album>,
/// All albums that this song appears, I don't know why but yes.
/// > Only in `get_song` with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub albums: Option<Vec<Album>>,
/// People who worked in the music.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_performances: Option<Vec<SongPerformance>>,
/// Description annotation.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub description_annotation: Option<Referent>,
/// Artists who featured in the song.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub featured_artists: Option<Vec<Artist>>,
/// Music platforms that host this song and its url.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<SongMedia>>,
/// Artists who produced this song.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub producer_artists: Option<Vec<Artist>>,
/// Songs that somehow relate to this.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub song_relationships: Option<Vec<SongRelationship>>,
/// All Verified Annotation contributors.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub verified_annotations_by: Option<Vec<User>>,
/// All verified contributors
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub verified_contributors: Option<Vec<SongContributor>>,
/// All Verified lyrics contributors.
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub verified_lyrics_by: Option<Vec<User>>,
/// Composers
/// > Only in `get_song`
#[serde(skip_serializing_if = "Option::is_none")]
pub writer_artists: Option<Vec<Artist>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TrackingPaths {
pub aggregate: String,
pub concurrent: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SongContributor {
pub contributions: Vec<String>,
pub artist: Artist,
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SongRelationship {
/// The type of relationship can be `samples`, `sampled_in`, `interpolates`, `interpolated_by`, `cover_of`, `covered_by`, `remix_of`, `remixed_by`, `live_version_of` and `performed_live_as`.
pub relationship_type: String,
/// Songs with this relationship type.
pub songs: Vec<Option<Song>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SongPerformance {
pub label: String,
pub artists: Vec<Artist>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SongMedia {
/// Spotify path of the song with `:` instead `/`, weird.
#[serde(skip_serializing_if = "Option::is_none")]
pub native_uri: Option<String>,
/// Soundcloud username.
#[serde(skip_serializing_if = "Option::is_none")]
pub attribution: Option<String>,
/// The song host provider `youtube`, `soundcloud` or `spotify`.
pub provider: String,
/// Youtube position of the video that starts the music.
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<u32>,
/// Media type `video` or `audio`
#[serde(rename = "type")]
pub media_type: String,
/// The url of the song in the media host.
pub url: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SongStatus {
/// Number of annotations accepted on this song.
#[serde(skip_serializing_if = "Option::is_none")]
pub accepted_annotations: Option<u32>,
/// Number of contributors.
#[serde(skip_serializing_if = "Option::is_none")]
pub contributors: Option<u32>,
/// Number of users who have earned iq.
#[serde(skip_serializing_if = "Option::is_none")]
pub iq_earners: Option<u32>,
/// Number of transcribers.
#[serde(skip_serializing_if = "Option::is_none")]
pub transcribers: Option<u32>,
/// Number of verified annotations.
#[serde(skip_serializing_if = "Option::is_none")]
pub verified_annotations: Option<u32>,
/// Number of unreviewed annotations.
pub unreviewed_annotations: u32,
/// If it's hot be careful with your hands.
pub hot: bool,
/// Number of page views
#[serde(skip_serializing_if = "Option::is_none")]
pub pageviews: Option<u32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct Artist {
/// Path of the API.
pub api_path: String,
/// Artist header image.
pub header_image_url: String,
/// Artist id.
pub id: u32,
/// Artist image.
pub image_url: String,
/// First letter of the artist name.
/// > Only with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub index_character: Option<char>,
/// Is this artist a meme?
pub is_meme_verified: bool,
/// If this artist is verified.
pub is_verified: bool,
/// Name of the artist.
pub name: String,
/// > Only with `user-core` level token
#[serde(skip_serializing_if = "Option::is_none")]
pub slug: Option<String>,
/// Url of the artist page.
pub url: String,
/// How much iq this artist has.
#[serde(skip_serializing_if = "Option::is_none")]
pub iq: Option<u32>,
}