Spotify.NET/SpotifyAPI.Web/Models/Request/PlaylistRemoveItemsRequest.cs

34 lines
676 B
C#
Raw Normal View History

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