-
Notifications
You must be signed in to change notification settings - Fork 3
/
declaration.d.ts
68 lines (63 loc) · 1.2 KB
/
declaration.d.ts
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
// Only wrote the necessary types from the Spotify responses
interface ArtistObject {
id: string;
name: string;
}
interface NowPlayingTrack {
device: {
id: string;
name: string;
type: string;
volume_percent: number;
};
shuffle_state: boolean;
repeat_state: string;
timestamp: number;
item: {
album: {
album_type: string;
id: string;
name: string;
release_date: string;
release_date_precision: string;
total_tracks: number;
};
explicit: boolean;
name: string;
artists: Array<ArtistObject>;
id: string;
popularity: number;
};
is_playing: boolean;
progress_ms: number;
}
interface TrackFeatures {
danceability: number;
energy: number;
key: number;
loudness: number;
mode: number;
speechiness: number;
acousticness: number;
instrumentalness: number;
liveness: number;
valence: number;
tempo: number;
type: string;
id: string;
uri: string;
track_href: string;
analysis_url: string;
duration_ms: number;
time_signature: number;
}
interface ArtistInfo {
genres: Array<string>;
popularity: number;
followers: {
total: number;
};
}
interface AlbumInfo {
popularity: number;
}