UNPKG
spotify-now
Version:
latest (0.1.3)
0.1.3
0.1.2
0.1.1
0.1.0
0.0.0
spotify, rgb and bob.
github.com/BWsix/spotify-now
BWsix/spotify-now
spotify-now
/
src
/
libs
/
arduino
/
getCurrentTrackId.ts
9 lines
(6 loc)
•
253 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
spotifyApi
from
"../spotifyApi/provider"
;
export
async
function
getCurrentTrackId
(
) {
const
currentPlayingResult =
await
spotifyApi.
getMyCurrentPlayingTrack
();
const
trackId = currentPlayingResult.
body
.
item
?.
id
;
return
trackId; }