2020-05-03 00:00:35 +01:00
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
|
|
|
public class PlaylistCreateRequest : RequestParams
|
|
|
|
{
|
2020-05-30 23:11:05 +01:00
|
|
|
/// <summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">
|
|
|
|
/// The name for the new playlist, for example "Your Coolest Playlist" .
|
|
|
|
/// This name does not need to be unique; a user may have several playlists with the same name.
|
|
|
|
/// </param>
|
2020-05-03 00:00:35 +01:00
|
|
|
public PlaylistCreateRequest(string name)
|
|
|
|
{
|
2020-05-05 14:30:00 +01:00
|
|
|
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
|
|
|
|
|
2020-05-03 00:00:35 +01:00
|
|
|
Name = name;
|
|
|
|
}
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
/// <summary>
|
|
|
|
/// The name for the new playlist, for example "Your Coolest Playlist" .
|
|
|
|
/// This name does not need to be unique; a user may have several playlists with the same name.
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-03 00:00:35 +01:00
|
|
|
[BodyParam("name")]
|
2020-05-05 14:30:00 +01:00
|
|
|
public string Name { get; }
|
2020-05-03 00:00:35 +01:00
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Defaults to true . If true the playlist will be public, if false it will be private.
|
|
|
|
/// To be able to create private playlists, the user must have granted the playlist-modify-private scope
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-03 00:00:35 +01:00
|
|
|
[BodyParam("public")]
|
|
|
|
public bool? Public { get; set; }
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Defaults to false . If true the playlist will be collaborative.
|
|
|
|
/// Note that to create a collaborative playlist you must also set public to false .
|
|
|
|
/// To create collaborative playlists you must have
|
|
|
|
/// granted playlist-modify-private and playlist-modify-public scopes .
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-03 00:00:35 +01:00
|
|
|
[BodyParam("collaborative")]
|
|
|
|
public bool? Collaborative { get; set; }
|
|
|
|
|
2020-05-30 23:11:05 +01:00
|
|
|
/// <summary>
|
|
|
|
/// value for playlist description as displayed in Spotify Clients and in the Web API.
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-03 00:00:35 +01:00
|
|
|
[BodyParam("description")]
|
2020-05-25 17:00:38 +01:00
|
|
|
public string? Description { get; set; }
|
2020-05-03 00:00:35 +01:00
|
|
|
}
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|