Spotify.NET/SpotifyAPI.Web/Models/Request/PlayerSetRepeatRequest.cs
2020-05-30 23:20:42 +02:00

46 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
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>
[QueryParam("device_id")]
public string? DeviceId { get; set; }
/// <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>
[QueryParam("state")]
public State StateParam { get; }
public enum State
{
[String("track")]
Track,
[String("context")]
Context,
[String("off")]
Off
}
}
}