Commit b39941f 1 parent 167e96c commit b39941f Copy full SHA for b39941f
File tree 3 files changed +28
-0
lines changed
3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -204,5 +204,14 @@ public interface IPlayerClient
204
204
/// </remarks>
205
205
/// <returns></returns>
206
206
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 ( ) ;
207
216
}
208
217
}
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ public async Task<bool> AddToQueue(PlayerAddToQueueRequest request)
17
17
return statusCode == HttpStatusCode . NoContent ;
18
18
}
19
19
20
+ public Task < QueueResponse > GetQueue ( )
21
+ {
22
+ return API . Get < QueueResponse > ( URLs . PlayerQueue ( ) ) ;
23
+ }
24
+
20
25
public Task < DeviceResponse > GetAvailableDevices ( )
21
26
{
22
27
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