@@ -1456,12 +1456,12 @@ describe('Spotify Web API', () => {
1456
1456
) {
1457
1457
expect ( method ) . toBe ( superagent . get ) ;
1458
1458
expect ( uri ) . toBe (
1459
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK'
1459
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK'
1460
1460
) ;
1461
1461
expect ( options . query ) . toBeFalsy ( ) ;
1462
1462
callback ( null , {
1463
1463
body : {
1464
- uri : 'spotify:user:thelinmichael: playlist:5ieJqeLJjjI8iJWaxeBLuK'
1464
+ uri : 'spotify:playlist:5ieJqeLJjjI8iJWaxeBLuK'
1465
1465
} ,
1466
1466
statusCode : 200
1467
1467
} ) ;
@@ -1470,13 +1470,8 @@ describe('Spotify Web API', () => {
1470
1470
var api = new SpotifyWebApi ( ) ;
1471
1471
api . setAccessToken ( 'myVeryVeryLongAccessToken' ) ;
1472
1472
1473
- api . getPlaylist ( 'thelinmichael' , '5ieJqeLJjjI8iJWaxeBLuK' , { } , function (
1474
- err ,
1475
- data
1476
- ) {
1477
- expect ( data . body . uri ) . toBe (
1478
- 'spotify:user:thelinmichael:playlist:5ieJqeLJjjI8iJWaxeBLuK'
1479
- ) ;
1473
+ api . getPlaylist ( '5ieJqeLJjjI8iJWaxeBLuK' , { } , function ( err , data ) {
1474
+ expect ( data . body . uri ) . toBe ( 'spotify:playlist:5ieJqeLJjjI8iJWaxeBLuK' ) ;
1480
1475
expect ( data . statusCode ) . toBe ( 200 ) ;
1481
1476
done ( ) ;
1482
1477
} ) ;
@@ -1570,7 +1565,7 @@ describe('Spotify Web API', () => {
1570
1565
) {
1571
1566
expect ( method ) . toBe ( superagent . put ) ;
1572
1567
expect ( uri ) . toBe (
1573
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK'
1568
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK'
1574
1569
) ;
1575
1570
expect ( JSON . parse ( options . data ) ) . toEqual ( {
1576
1571
name :
@@ -1585,7 +1580,7 @@ describe('Spotify Web API', () => {
1585
1580
api . setAccessToken ( 'long-access-token' ) ;
1586
1581
1587
1582
api
1588
- . changePlaylistDetails ( 'thelinmichael' , ' 5ieJqeLJjjI8iJWaxeBLuK', {
1583
+ . changePlaylistDetails ( '5ieJqeLJjjI8iJWaxeBLuK' , {
1589
1584
name :
1590
1585
'This is a new name for my Cool Playlist, and will become private' ,
1591
1586
public : false
@@ -1605,7 +1600,7 @@ describe('Spotify Web API', () => {
1605
1600
) {
1606
1601
expect ( method ) . toBe ( superagent . post ) ;
1607
1602
expect ( uri ) . toBe (
1608
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
1603
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
1609
1604
) ;
1610
1605
expect ( options . query ) . toBeFalsy ( ) ;
1611
1606
expect ( JSON . parse ( options . data ) [ 'uris' ] ) . toBeInstanceOf ( Array ) ;
@@ -1617,7 +1612,7 @@ describe('Spotify Web API', () => {
1617
1612
api . setAccessToken ( 'long-access-token' ) ;
1618
1613
1619
1614
api
1620
- . addTracksToPlaylist ( 'thelinmichael' , ' 5ieJqeLJjjI8iJWaxeBLuK', [
1615
+ . addTracksToPlaylist ( '5ieJqeLJjjI8iJWaxeBLuK' , [
1621
1616
'spotify:track:4iV5W9uYEdYUVa79Axb7Rh' ,
1622
1617
'spotify:track:1301WleyT98MSxVHPZCA6M'
1623
1618
] )
@@ -1648,7 +1643,6 @@ describe('Spotify Web API', () => {
1648
1643
1649
1644
api
1650
1645
. addTracksToPlaylist (
1651
- 'thelinmichael' ,
1652
1646
'5ieJqeLJjjI8iJWaxeBLuK' ,
1653
1647
[
1654
1648
'spotify:track:4iV5W9uYEdYUVa79Axb7Rh' ,
@@ -2666,7 +2660,7 @@ describe('Spotify Web API', () => {
2666
2660
expect ( JSON . parse ( options . data ) ) . toEqual ( { public : false } ) ;
2667
2661
expect ( options . query ) . toBeFalsy ( ) ;
2668
2662
expect ( uri ) . toBe (
2669
- 'https://api.spotify.com/v1/users/jmperezperez/ playlists/7p9EIC2KW0NNkTEOnTUZJl/followers'
2663
+ 'https://api.spotify.com/v1/playlists/7p9EIC2KW0NNkTEOnTUZJl/followers'
2670
2664
) ;
2671
2665
callback ( ) ;
2672
2666
} ) ;
@@ -2678,7 +2672,7 @@ describe('Spotify Web API', () => {
2678
2672
} ) ;
2679
2673
2680
2674
api
2681
- . followPlaylist ( 'jmperezperez' , ' 7p9EIC2KW0NNkTEOnTUZJl', {
2675
+ . followPlaylist ( '7p9EIC2KW0NNkTEOnTUZJl' , {
2682
2676
public : false
2683
2677
} )
2684
2678
. then (
@@ -2703,7 +2697,7 @@ describe('Spotify Web API', () => {
2703
2697
expect ( options . data ) . toBeFalsy ( ) ;
2704
2698
expect ( options . query ) . toBeFalsy ( ) ;
2705
2699
expect ( uri ) . toBe (
2706
- 'https://api.spotify.com/v1/users/jmperezperez/ playlists/7p9EIC2KW0NNkTEOnTUZJl/followers'
2700
+ 'https://api.spotify.com/v1/playlists/7p9EIC2KW0NNkTEOnTUZJl/followers'
2707
2701
) ;
2708
2702
callback ( ) ;
2709
2703
} ) ;
@@ -2714,7 +2708,7 @@ describe('Spotify Web API', () => {
2714
2708
accessToken : accessToken
2715
2709
} ) ;
2716
2710
2717
- api . unfollowPlaylist ( 'jmperezperez' , ' 7p9EIC2KW0NNkTEOnTUZJl') . then (
2711
+ api . unfollowPlaylist ( '7p9EIC2KW0NNkTEOnTUZJl' ) . then (
2718
2712
function ( data ) {
2719
2713
done ( ) ;
2720
2714
} ,
@@ -3224,7 +3218,7 @@ describe('Spotify Web API', () => {
3224
3218
) {
3225
3219
expect ( method ) . toBe ( superagent . post ) ;
3226
3220
expect ( uri ) . toBe (
3227
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3221
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3228
3222
) ;
3229
3223
expect ( options . query ) . toBeFalsy ( ) ;
3230
3224
expect ( JSON . parse ( options . data ) [ 'uris' ] ) . toBeInstanceOf ( Array ) ;
@@ -3237,7 +3231,7 @@ describe('Spotify Web API', () => {
3237
3231
api . setAccessToken ( 'long-access-token' ) ;
3238
3232
3239
3233
api
3240
- . addTracksToPlaylist ( 'thelinmichael' , ' 5ieJqeLJjjI8iJWaxeBLuK', [
3234
+ . addTracksToPlaylist ( '5ieJqeLJjjI8iJWaxeBLuK' , [
3241
3235
'spotify:track:4iV5W9uYEdYUVa79Axb7Rh' ,
3242
3236
'spotify:track:1301WleyT98MSxVHPZCA6M'
3243
3237
] )
@@ -3261,7 +3255,7 @@ describe('Spotify Web API', () => {
3261
3255
) {
3262
3256
expect ( method ) . toBe ( superagent . post ) ;
3263
3257
expect ( uri ) . toBe (
3264
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3258
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3265
3259
) ;
3266
3260
expect ( options . query ) . toBeFalsy ( ) ;
3267
3261
expect ( JSON . parse ( options . data ) [ 'uris' ] ) . toBeInstanceOf ( Array ) ;
@@ -3274,7 +3268,6 @@ describe('Spotify Web API', () => {
3274
3268
api . setAccessToken ( 'long-access-token' ) ;
3275
3269
3276
3270
api . addTracksToPlaylist (
3277
- 'thelinmichael' ,
3278
3271
'5ieJqeLJjjI8iJWaxeBLuK' ,
3279
3272
[
3280
3273
'spotify:track:4iV5W9uYEdYUVa79Axb7Rh' ,
@@ -3290,7 +3283,7 @@ describe('Spotify Web API', () => {
3290
3283
test ( 'should remove tracks from a playlist by position' , done => {
3291
3284
sinon . stub ( HttpManager , 'del' , function ( request , callback ) {
3292
3285
expect ( request . getURI ( ) ) . toBe (
3293
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3286
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3294
3287
) ;
3295
3288
expect ( request . getQueryParameters ( ) ) . toBeFalsy ( ) ;
3296
3289
var data = request . getBodyParameters ( ) ;
@@ -3309,7 +3302,6 @@ describe('Spotify Web API', () => {
3309
3302
api . setAccessToken ( 'long-access-token' ) ;
3310
3303
3311
3304
api . removeTracksFromPlaylistByPosition (
3312
- 'thelinmichael' ,
3313
3305
'5ieJqeLJjjI8iJWaxeBLuK' ,
3314
3306
[ 0 , 2 ] ,
3315
3307
'0wD+DKCUxiSR/WY8lF3fiCTb7Z8X4ifTUtqn8rO82O4Mvi5wsX8BsLj7IbIpLVM9' ,
@@ -3332,7 +3324,7 @@ describe('Spotify Web API', () => {
3332
3324
) {
3333
3325
expect ( method ) . toBe ( superagent . put ) ;
3334
3326
expect ( uri ) . toBe (
3335
- 'https://api.spotify.com/v1/users/thelinmichael/ playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3327
+ 'https://api.spotify.com/v1/playlists/5ieJqeLJjjI8iJWaxeBLuK/tracks'
3336
3328
) ;
3337
3329
expect ( options . query ) . toBeFalsy ( ) ;
3338
3330
expect ( JSON . parse ( options . data ) [ 'range_start' ] ) . toBe ( 5 ) ;
@@ -3356,7 +3348,6 @@ describe('Spotify Web API', () => {
3356
3348
} ;
3357
3349
3358
3350
api . reorderTracksInPlaylist (
3359
- 'thelinmichael' ,
3360
3351
'5ieJqeLJjjI8iJWaxeBLuK' ,
3361
3352
5 ,
3362
3353
1512 ,
0 commit comments