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
@@ -1649,6 +1650,27 @@ var SpotifyWebApi = (function () {
1649
1650
return _checkParamsAndPerformRequest ( requestData , newOptions , callback ) ;
1650
1651
} ;
1651
1652
1653
+
1654
+ /**
1655
+ * adds a song to the queue
1656
+ * See [Add an Item to the User's Playback Queue](https://developer.spotify.com/documentation/web-api/reference/player/add-to-queue/) on
1657
+ * the Spotify Developer site for more information about the endpoint.
1658
+ */
1659
+
1660
+ Constr . prototype . queue = function ( uri , options , callback ) {
1661
+ options = options || { } ;
1662
+ var params =
1663
+ 'device_id' in options ? { uri : uri , device_id : options . device_id } : { uri : uri } ;
1664
+ var requestData = {
1665
+ type : 'PUT' ,
1666
+ url : _baseUri + '/me/player/queue' ,
1667
+ params : params
1668
+ } ;
1669
+ return _checkParamsAndPerformRequest ( requestData , options , callback ) ;
1670
+ } ;
1671
+
1672
+
1673
+
1652
1674
/**
1653
1675
* Pause playback on the user’s account.
1654
1676
* 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