File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,5 +204,14 @@ public interface IPlayerClient
204204 /// </remarks>
205205 /// <returns></returns>
206206 Task < bool > AddToQueue ( PlayerAddToQueueRequest request ) ;
207+
208+ /// <summary>
209+ /// Get the list of objects that make up the user's queue.
210+ /// </summary>
211+ /// <remarks>
212+ /// https://developer.spotify.com/documentation/web-api/reference/#/operations/get-queue
213+ /// </remarks>
214+ /// <returns></returns>
215+ Task < QueueResponse > GetQueue ( ) ;
207216 }
208217}
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ public async Task<bool> AddToQueue(PlayerAddToQueueRequest request)
1717 return statusCode == HttpStatusCode . NoContent ;
1818 }
1919
20+ public Task < QueueResponse > GetQueue ( )
21+ {
22+ return API . Get < QueueResponse > ( URLs . PlayerQueue ( ) ) ;
23+ }
24+
2025 public Task < DeviceResponse > GetAvailableDevices ( )
2126 {
2227 return API . Get < DeviceResponse > ( URLs . PlayerDevices ( ) ) ;
Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using Newtonsoft . Json ;
3+
4+ namespace SpotifyAPI . Web
5+ {
6+ public class QueueResponse
7+ {
8+ [ JsonConverter ( typeof ( PlayableItemConverter ) ) ]
9+ public IPlayableItem CurrentlyPlaying { get ; set ; } = default ! ;
10+ [ JsonProperty ( ItemConverterType = typeof ( PlayableItemConverter ) ) ]
11+ public List < IPlayableItem > Queue { get ; set ; } = default ! ;
12+ }
13+ }
14+
You can’t perform that action at this time.
0 commit comments