UNPKG
@lumiastream/spotify-cove
Version:
alpha (6.0.0-alpha.1)
beta (6.0.1-beta.1)
latest (7.0.1)
7.0.1
7.0.0
6.0.1
6.0.1-beta.1
6.0.0
6.0.0-alpha.1
5.0.4-alpha.2
5.0.4-alpha.1
5.0.3
A Node.js wrapper for Spotify's Web API
github.com/lumiastream/spotify-cove
lumiastream/spotify-cove
@lumiastream/spotify-cove
/
examples
/
tutorial
/
01-basics
/
01-get-info-about-current-user.js
12 lines
(9 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
SpotifyWebApi
=
require
(
'../../../'
);
const
spotifyApi =
new
SpotifyWebApi
(); spotifyApi.
setAccessToken
(process.
env
.
SPOTIFY_ACCESS_TOKEN
); (
async
() => {
const
me =
await
spotifyApi.
getMe
();
console
.
log
(me); })().
catch
(
e
=>
{
console
.
error
(e); });