-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.js
23 lines (18 loc) · 918 Bytes
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var spotify = require('./');
var origUri = 'spotify:track:0NQaULcegvCCfiAD8ucCdU';
var parsed = spotify.uri.parse(origUri);
var uri = spotify.uri.formatURI(parsed);
console.log('Parse result:', parsed);
console.log('toUri result:', uri);
spotify.lookup('spotify:track:0NQaULcegvCCfiAD8ucCdU', console.log);
spotify.cover('spotify:track:0NQaULcegvCCfiAD8ucCdU', console.log);
spotify.album('0AKaAXiqrwaXPSn9VNxK6N', console.log);
spotify.album.cover('0AKaAXiqrwaXPSn9VNxK6N', console.log);
spotify.album.cover('0AKaAXiqrwaXPSn9VNxK6N', 640, console.log);
spotify.album.cover('0AKaAXiqrwaXPSn9VNxK6N', spotify.coverSize.SMALL, console.log);
spotify.flatten('spotify:album:0AKaAXiqrwaXPSn9VNxK6N', console.log);
spotify.flatten([
'spotify:album:0AKaAXiqrwaXPSn9VNxK6N',
'spotify:album:2XJzHqXuEzqk4yQ8dvpE9P'
], console.log);
spotify.lookup('spotify:user:minigod:playlist:5ACX9Pa6kRUWWv9ZWD5oH4', console.log);