mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 15:06:26 +00:00
More models rearranged
This commit is contained in:
parent
b0f687c994
commit
214484a7c0
@ -5,6 +5,6 @@ namespace SpotifyAPI.Web.Models
|
||||
public class FollowedArtists : BasicModel
|
||||
{
|
||||
[JsonProperty("artists")]
|
||||
CursorPaging<FullArtist> Artists { get; set; }
|
||||
public CursorPaging<FullArtist> Artists { get; set; }
|
||||
}
|
||||
}
|
@ -8,34 +8,49 @@ namespace SpotifyAPI.Web.Models
|
||||
{
|
||||
[JsonProperty("album")]
|
||||
public SimpleAlbum Album { get; set; }
|
||||
|
||||
[JsonProperty("artists")]
|
||||
public List<SimpleArtist> Artists { get; set; }
|
||||
|
||||
[JsonProperty("available_markets")]
|
||||
public List<String> AvailableMarkets { get; set; }
|
||||
|
||||
[JsonProperty("disc_number")]
|
||||
public int DiscNumber { get; set; }
|
||||
|
||||
[JsonProperty("duration_ms")]
|
||||
public int DurationMs { get; set; }
|
||||
|
||||
[JsonProperty("explicit")]
|
||||
public Boolean Explicit { get; set; }
|
||||
|
||||
[JsonProperty("external_ids")]
|
||||
public Dictionary<String, String> ExternalIds { get; set; }
|
||||
|
||||
[JsonProperty("external_urls")]
|
||||
public Dictionary<String, String> ExternUrls { get; set; }
|
||||
|
||||
[JsonProperty("href")]
|
||||
public String Href { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public String Id { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
[JsonProperty("popularity")]
|
||||
public int Popularity { get; set; }
|
||||
|
||||
[JsonProperty("preview_url")]
|
||||
public String PreviewUrl { get; set; }
|
||||
|
||||
[JsonProperty("track_number")]
|
||||
public int TrackNumber { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public String Type { get; set; }
|
||||
|
||||
[JsonProperty("uri")]
|
||||
public String Uri { get; set; }
|
||||
|
||||
|
@ -9,53 +9,62 @@ namespace SpotifyAPI.Web.Models
|
||||
{
|
||||
[JsonProperty("url")]
|
||||
public String Url { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public int Width { get; set; }
|
||||
|
||||
[JsonProperty("height")]
|
||||
public int Height { get; set; }
|
||||
}
|
||||
|
||||
public class ErrorResponse : BasicModel { }
|
||||
public class ErrorResponse : BasicModel
|
||||
{
|
||||
}
|
||||
|
||||
public class Error
|
||||
{
|
||||
[JsonProperty("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
[JsonProperty("message")]
|
||||
public String Message { get; set; }
|
||||
}
|
||||
|
||||
public class PlaylistTrackCollection
|
||||
{
|
||||
[JsonProperty("href")]
|
||||
public String Href { get; set; }
|
||||
|
||||
[JsonProperty("total")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
|
||||
public class Followers
|
||||
{
|
||||
[JsonProperty("href")]
|
||||
public String Href { get; set; }
|
||||
|
||||
[JsonProperty("total")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
|
||||
public class PlaylistTrack
|
||||
{
|
||||
[JsonProperty("added_at")]
|
||||
public DateTime AddedAt { get; set; }
|
||||
|
||||
[JsonProperty("added_by")]
|
||||
public PublicProfile AddedBy { get; set; }
|
||||
|
||||
[JsonProperty("track")]
|
||||
public FullTrack Track { get; set; }
|
||||
|
||||
[JsonProperty("is_local")]
|
||||
public Boolean IsLocal { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteTrackUri
|
||||
{
|
||||
[JsonProperty("uri")]
|
||||
public String Uri { get; set; }
|
||||
[JsonProperty("positions")]
|
||||
public List<int> Positions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Delete-Track Wrapper
|
||||
/// </summary>
|
||||
@ -67,30 +76,41 @@ namespace SpotifyAPI.Web.Models
|
||||
Uri = uri;
|
||||
}
|
||||
|
||||
[JsonProperty("uri")]
|
||||
public String Uri { get; set; }
|
||||
|
||||
[JsonProperty("positions")]
|
||||
public List<int> Positions { get; set; }
|
||||
|
||||
public bool ShouldSerializePositions()
|
||||
{
|
||||
return (Positions.Count > 0);
|
||||
}
|
||||
}
|
||||
|
||||
public class SeveralTracks : BasicModel
|
||||
{
|
||||
[JsonProperty("tracks")]
|
||||
public List<FullTrack> Tracks { get; set; }
|
||||
}
|
||||
|
||||
public class SeveralArtists : BasicModel
|
||||
{
|
||||
[JsonProperty("artists")]
|
||||
public List<FullArtist> Artists { get; set; }
|
||||
}
|
||||
|
||||
public class SeveralAlbums : BasicModel
|
||||
{
|
||||
[JsonProperty("albums")]
|
||||
public List<FullAlbum> Albums { get; set; }
|
||||
}
|
||||
|
||||
public class Copyright
|
||||
{
|
||||
[JsonProperty("text")]
|
||||
public String Text { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public String Type { get; set; }
|
||||
}
|
||||
@ -99,12 +119,16 @@ namespace SpotifyAPI.Web.Models
|
||||
{
|
||||
[JsonProperty("external_urls")]
|
||||
public Dictionary<String, String> ExternalUrls { get; set; }
|
||||
|
||||
[JsonProperty("href")]
|
||||
public String Href { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public String Id { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public String Type { get; set; }
|
||||
|
||||
[JsonProperty("uri")]
|
||||
public String Uri { get; set; }
|
||||
}
|
||||
@ -113,6 +137,7 @@ namespace SpotifyAPI.Web.Models
|
||||
{
|
||||
[JsonProperty("added_at")]
|
||||
public DateTime AddedAt { get; set; }
|
||||
|
||||
[JsonProperty("track")]
|
||||
public FullTrack Track { get; set; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user