2020-05-03 21:34:03 +01:00
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
|
|
|
|
public class PlaylistReorderItemsRequest : RequestParams
|
|
|
|
|
{
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="rangeStart">
|
|
|
|
|
/// The position of the first item to be reordered.
|
|
|
|
|
/// </param>
|
|
|
|
|
/// <param name="insertBefore">
|
|
|
|
|
/// The position where the items should be inserted.
|
|
|
|
|
/// To reorder the items to the end of the playlist,
|
|
|
|
|
/// simply set insert_before to the position after the last item.
|
|
|
|
|
/// Examples: To reorder the first item to the last position in a playlist with 10 items,
|
|
|
|
|
/// set range_start to 0, and insert_before to 10. To reorder the last item in a playlist
|
|
|
|
|
/// with 10 items to the start of the playlist, set range_start to 9, and insert_before to 0.
|
|
|
|
|
/// </param>
|
2020-05-05 14:30:00 +01:00
|
|
|
|
public PlaylistReorderItemsRequest(int rangeStart, int insertBefore)
|
|
|
|
|
{
|
|
|
|
|
RangeStart = rangeStart;
|
|
|
|
|
InsertBefore = insertBefore;
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The position of the first item to be reordered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-05-03 21:34:03 +01:00
|
|
|
|
[BodyParam("range_start")]
|
2020-05-05 14:30:00 +01:00
|
|
|
|
public int RangeStart { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The position where the items should be inserted.
|
|
|
|
|
/// To reorder the items to the end of the playlist,
|
|
|
|
|
/// simply set insert_before to the position after the last item.
|
|
|
|
|
/// Examples: To reorder the first item to the last position in a playlist with 10 items,
|
|
|
|
|
/// set range_start to 0, and insert_before to 10. To reorder the last item in a playlist
|
|
|
|
|
/// with 10 items to the start of the playlist, set range_start to 9, and insert_before to 0.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-05-03 21:34:03 +01:00
|
|
|
|
[BodyParam("insert_before")]
|
2020-05-05 14:30:00 +01:00
|
|
|
|
public int InsertBefore { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of items to be reordered. Defaults to 1 if not set.
|
|
|
|
|
/// The range of items to be reordered begins from the range_start position, and
|
|
|
|
|
/// includes the range_length subsequent items.
|
|
|
|
|
/// Example: To move the items at index 9-10 to the start of the playlist,
|
|
|
|
|
/// range_start is set to 9, and range_length is set to 2.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-05-03 21:34:03 +01:00
|
|
|
|
[BodyParam("range_length")]
|
|
|
|
|
public int? RangeLength { get; set; }
|
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The playlist’s snapshot ID against which you want to make the changes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value></value>
|
2020-05-03 21:34:03 +01:00
|
|
|
|
[BodyParam("snapshot_id")]
|
2020-05-25 17:00:38 +01:00
|
|
|
|
public string? SnapshotId { get; set; }
|
2020-05-03 21:34:03 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|
|