File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,7 @@ var SpotifyWebApi = (function () {
481
481
return _checkParamsAndPerformRequest ( requestData , callback ) ;
482
482
} ;
483
483
484
+
484
485
/**
485
486
* Add the current user as a follower of one playlist.
486
487
* See [Follow a Playlist](https://developer.spotify.com/web-api/follow-playlist/) on
@@ -1601,6 +1602,27 @@ var SpotifyWebApi = (function () {
1601
1602
return _checkParamsAndPerformRequest ( requestData , newOptions , callback ) ;
1602
1603
} ;
1603
1604
1605
+
1606
+ /**
1607
+ * adds a song to the queue
1608
+ * See [Add an Item to the User's Playback Queue](https://developer.spotify.com/documentation/web-api/reference/player/add-to-queue/) on
1609
+ * the Spotify Developer site for more information about the endpoint.
1610
+ */
1611
+
1612
+ Constr . prototype . queue = function ( uri , options , callback ) {
1613
+ options = options || { } ;
1614
+ var params =
1615
+ 'device_id' in options ? { uri : uri , device_id : options . device_id } : { uri : uri } ;
1616
+ var requestData = {
1617
+ type : 'PUT' ,
1618
+ url : _baseUri + '/me/player/queue' ,
1619
+ params : params
1620
+ } ;
1621
+ return _checkParamsAndPerformRequest ( requestData , options , callback ) ;
1622
+ } ;
1623
+
1624
+
1625
+
1604
1626
/**
1605
1627
* Pause playback on the user’s account.
1606
1628
* See [Pause a User’s Playback](https://developer.spotify.com/web-api/pause-a-users-playback/) on
You can’t perform that action at this time.
0 commit comments