2020-05-02 21:48:21 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
|
|
|
|
public class PlaylistRemoveItemsRequest : RequestParams
|
|
|
|
|
{
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// An array of objects containing Spotify URIs of the tracks or episodes to remove.
|
|
|
|
|
/// For example: { "tracks": [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" },
|
|
|
|
|
/// { "uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] }.
|
|
|
|
|
/// A maximum of 100 objects can be sent at once.
|
2020-08-27 12:55:42 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
|
|
|
|
[BodyParam("tracks")]
|
|
|
|
|
public IList<Item>? Tracks { get; set; }
|
2020-05-05 14:30:00 +01:00
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
2020-08-27 12:55:42 +01:00
|
|
|
|
/// An array of positions to delete. This also supports local tracks.
|
|
|
|
|
/// SnapshotId MUST be supplied when using this parameter
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-08-27 12:55:42 +01:00
|
|
|
|
[BodyParam("positions")]
|
|
|
|
|
public IList<int>? Positions { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The playlist’s snapshot ID against which you want to make the changes.
|
|
|
|
|
/// The API will validate that the specified items exist and in the specified positions and make the changes,
|
|
|
|
|
/// even if more recent changes have been made to the playlist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-05-02 21:48:21 +01:00
|
|
|
|
[BodyParam("snapshot_id")]
|
2020-05-25 17:00:38 +01:00
|
|
|
|
public string? SnapshotId { get; set; }
|
2020-05-02 21:48:21 +01:00
|
|
|
|
|
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-25 17:00:38 +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)]
|
2020-05-25 17:00:38 +01:00
|
|
|
|
public List<int>? Positions { get; set; }
|
2020-05-02 21:48:21 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|
|