2020-05-02 21:48:21 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
|
|
|
public class PlaylistRemoveItemsRequest : RequestParams
|
|
|
|
{
|
|
|
|
[BodyParam("tracks")]
|
|
|
|
public List<Item> Tracks { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
2020-05-02 21:48:21 +01:00
|
|
|
[BodyParam("snapshot_id")]
|
|
|
|
public string SnapshotId { get; set; }
|
|
|
|
|
|
|
|
protected override void CustomEnsure()
|
|
|
|
{
|
|
|
|
Ensure.ArgumentNotNullOrEmptyList(Tracks, nameof(Tracks));
|
|
|
|
}
|
|
|
|
|
|
|
|
public class Item
|
|
|
|
{
|
|
|
|
public Item(string uri)
|
|
|
|
{
|
|
|
|
Uri = uri;
|
|
|
|
}
|
2020-05-03 21:34:03 +01:00
|
|
|
|
2020-05-02 21:48:21 +01:00
|
|
|
[JsonProperty("uri")]
|
|
|
|
public string Uri { get; set; }
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|