2020-05-02 21:48:21 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
|
|
|
public class PlaylistRemoveItemsRequest : RequestParams
|
|
|
|
{
|
2020-05-05 14:30:00 +01:00
|
|
|
public PlaylistRemoveItemsRequest(IList<Item> tracks)
|
|
|
|
{
|
|
|
|
Ensure.ArgumentNotNullOrEmptyList(tracks, nameof(tracks));
|
|
|
|
|
|
|
|
Tracks = tracks;
|
|
|
|
}
|
|
|
|
|
2020-05-02 21:48:21 +01:00
|
|
|
[BodyParam("tracks")]
|
2020-05-05 14:30:00 +01:00
|
|
|
public IList<Item> Tracks { get; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
2020-05-02 21:48:21 +01:00
|
|
|
[BodyParam("snapshot_id")]
|
|
|
|
public string SnapshotId { get; set; }
|
|
|
|
|
2020-05-05 14:30:00 +01:00
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034")]
|
2020-05-02 21:48:21 +01:00
|
|
|
public class Item
|
|
|
|
{
|
2020-05-05 14:30:00 +01:00
|
|
|
[JsonProperty("uri", NullValueHandling = NullValueHandling.Ignore)]
|
2020-05-02 21:48:21 +01:00
|
|
|
public string Uri { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
2020-05-05 14:30:00 +01:00
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227")]
|
2020-05-03 21:34:03 +01:00
|
|
|
[JsonProperty("positions", NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public List<int> Positions { get; set; }
|
2020-05-02 21:48:21 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|