tangled
alpha
login
or
join now
vielle.dev
/
site
0
fork
atom
Personal Site
0
fork
atom
overview
issues
pulls
pipelines
Create getTrack function
vielle.dev
7 months ago
a6b0a787
cc43861c
verified
This commit was signed with the committer's
known signature
.
vielle.dev
SSH Key Fingerprint:
SHA256:/4bvxqoEh9iMdjAPgcgAgXKZZQTROL3ULiPt6nH9RSs=
+20
1 changed file
expand all
collapse all
unified
split
src
components
playing
spotify.ts
+20
src/components/playing/spotify.ts
···
174
174
175
175
return trackID;
176
176
}
177
177
+
178
178
+
export async function getTrack(id: string) {
179
179
+
const res = await getSpotifyApi("/tracks/" + id);
180
180
+
if (res instanceof Error) return res;
181
181
+
return res as {
182
182
+
external_urls: {
183
183
+
spotify: string;
184
184
+
};
185
185
+
images: {
186
186
+
url: string;
187
187
+
width: string;
188
188
+
height: string;
189
189
+
}[];
190
190
+
name: string;
191
191
+
artists: {
192
192
+
id: string;
193
193
+
name: string;
194
194
+
}[];
195
195
+
};
196
196
+
}