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

46 lines
1.1 KiB
C#
Raw Normal View History

2020-05-07 17:03:20 +01:00
namespace SpotifyAPI.Web
{
public class PlayerSetRepeatRequest : RequestParams
{
/// <summary></summary>
/// <param name="state">
/// track, context or off. track will repeat the current track. context will repeat the current context.
/// off will turn repeat off.
/// </param>
2020-05-07 17:03:20 +01:00
public PlayerSetRepeatRequest(State state)
{
Ensure.ArgumentNotNull(state, nameof(state));
StateParam = state;
}
/// <summary>
/// The id of the device this command is targeting. If not supplied, the users currently active device is the target.
/// </summary>
/// <value></value>
2020-05-07 17:03:20 +01:00
[QueryParam("device_id")]
2020-05-25 17:00:38 +01:00
public string? DeviceId { get; set; }
2020-05-07 17:03:20 +01:00
/// <summary>
/// track, context or off. track will repeat the current track. context will repeat the current context.
/// off will turn repeat off.
/// </summary>
/// <value></value>
2020-05-07 17:03:20 +01:00
[QueryParam("state")]
public State StateParam { get; }
public enum State
{
[String("track")]
Track,
[String("context")]
Context,
[String("off")]
Off
}
}
}
2020-05-25 17:00:38 +01:00