2020-05-07 17:03:20 +01:00
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
|
|
|
|
public class PlayerSetRepeatRequest : RequestParams
|
|
|
|
|
{
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <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;
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The id of the device this command is targeting. If not supplied, the user’s 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
|
|
|
|
|
2020-05-30 22:20:42 +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
|
|
|
|
|