Spotify.NET/SpotifyAPI.Web/Models/Response/CurrentlyPlaying.cs

30 lines
729 B
C#
Raw Permalink Normal View History

2020-05-07 17:03:20 +01:00
using Newtonsoft.Json;
namespace SpotifyAPI.Web
{
public class CurrentlyPlaying
{
2020-05-25 17:00:38 +01:00
public Context Context { get; set; } = default!;
public string CurrentlyPlayingType { get; set; } = default!;
public bool IsPlaying { get; set; }
2020-05-07 17:03:20 +01:00
/// <summary>
/// Can be a FullTrack or FullEpisode
/// </summary>
/// <value></value>
2020-05-07 17:03:20 +01:00
[JsonConverter(typeof(PlayableItemConverter))]
public BasePlayableItem Item { get; set; } = default!;
public int? ProgressMs { get; set; }
public long Timestamp { get; set; }
2020-05-07 17:03:20 +01:00
}
public class CurrentlyPlaying<T>: CurrentlyPlaying where T : BasePlayableItem
{
public new T Item {
get => (T) base.Item;
set => base.Item = value;
}
}
2020-05-07 17:03:20 +01:00
}
2020-05-25 17:00:38 +01:00