mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Rearranged models
This commit is contained in:
parent
d36a3f3fd9
commit
b0f687c994
@ -8,10 +8,13 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("icons")]
|
[JsonProperty("icons")]
|
||||||
public List<Image> Icons { get; set; }
|
public List<Image> Icons { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public String Message { get; set; }
|
public String Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("playlists")]
|
[JsonProperty("playlists")]
|
||||||
public Paging<SimplePlaylist> Playlists { get; set; }
|
public Paging<SimplePlaylist> Playlists { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,36 +8,52 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("album_type")]
|
[JsonProperty("album_type")]
|
||||||
public String AlbumType { get; set; }
|
public String AlbumType { get; set; }
|
||||||
|
|
||||||
[JsonProperty("artists")]
|
[JsonProperty("artists")]
|
||||||
public List<SimpleArtist> Artists { get; set; }
|
public List<SimpleArtist> Artists { get; set; }
|
||||||
|
|
||||||
[JsonProperty("available_markets")]
|
[JsonProperty("available_markets")]
|
||||||
public List<String> AvailableMarkets { get; set; }
|
public List<String> AvailableMarkets { get; set; }
|
||||||
|
|
||||||
[JsonProperty("copyrights")]
|
[JsonProperty("copyrights")]
|
||||||
public List<Copyright> Copyrights { get; set; }
|
public List<Copyright> Copyrights { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_ids")]
|
[JsonProperty("external_ids")]
|
||||||
public Dictionary<String, String> ExternalIds { get; set; }
|
public Dictionary<String, String> ExternalIds { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<String, String> ExternalUrls { get; set; }
|
public Dictionary<String, String> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("genres")]
|
[JsonProperty("genres")]
|
||||||
public List<String> Genres { get; set; }
|
public List<String> Genres { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("popularity")]
|
[JsonProperty("popularity")]
|
||||||
public int Popularity { get; set; }
|
public int Popularity { get; set; }
|
||||||
|
|
||||||
[JsonProperty("release_date")]
|
[JsonProperty("release_date")]
|
||||||
public String ReleaseDate { get; set; }
|
public String ReleaseDate { get; set; }
|
||||||
|
|
||||||
[JsonProperty("release_date_precision")]
|
[JsonProperty("release_date_precision")]
|
||||||
public String ReleaseDatePrecision { get; set; }
|
public String ReleaseDatePrecision { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tracks")]
|
[JsonProperty("tracks")]
|
||||||
public Paging<SimpleTrack> Tracks { get; set; }
|
public Paging<SimpleTrack> Tracks { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,22 +8,31 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<String, String> ExternalUrls { get; set; }
|
public Dictionary<String, String> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("followers")]
|
[JsonProperty("followers")]
|
||||||
public Followers Followers { get; set; }
|
public Followers Followers { get; set; }
|
||||||
|
|
||||||
[JsonProperty("genres")]
|
[JsonProperty("genres")]
|
||||||
public List<String> Genres { get; set; }
|
public List<String> Genres { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("popularity")]
|
[JsonProperty("popularity")]
|
||||||
public int Popularity { get; set; }
|
public int Popularity { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,28 +8,40 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("collaborative")]
|
[JsonProperty("collaborative")]
|
||||||
public Boolean Collaborative { get; set; }
|
public Boolean Collaborative { get; set; }
|
||||||
|
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public String Description { get; set; }
|
public String Description { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<string, string> ExternalUrls { get; set; }
|
public Dictionary<string, string> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("followers")]
|
[JsonProperty("followers")]
|
||||||
public Followers Followers { get; set; }
|
public Followers Followers { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("owner")]
|
[JsonProperty("owner")]
|
||||||
public PublicProfile Owner { get; set; }
|
public PublicProfile Owner { get; set; }
|
||||||
|
|
||||||
[JsonProperty("public")]
|
[JsonProperty("public")]
|
||||||
public Boolean Public { get; set; }
|
public Boolean Public { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tracks")]
|
[JsonProperty("tracks")]
|
||||||
public Paging<PlaylistTrack> Tracks { get; set; }
|
public Paging<PlaylistTrack> Tracks { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,16 +8,22 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("items")]
|
[JsonProperty("items")]
|
||||||
public List<T> Items { get; set; }
|
public List<T> Items { get; set; }
|
||||||
|
|
||||||
[JsonProperty("limit")]
|
[JsonProperty("limit")]
|
||||||
public int Limit { get; set; }
|
public int Limit { get; set; }
|
||||||
|
|
||||||
[JsonProperty("next")]
|
[JsonProperty("next")]
|
||||||
public String Next { get; set; }
|
public String Next { get; set; }
|
||||||
|
|
||||||
[JsonProperty("offset")]
|
[JsonProperty("offset")]
|
||||||
public int Offset { get; set; }
|
public int Offset { get; set; }
|
||||||
|
|
||||||
[JsonProperty("previous")]
|
[JsonProperty("previous")]
|
||||||
public String Previous { get; set; }
|
public String Previous { get; set; }
|
||||||
|
|
||||||
[JsonProperty("total")]
|
[JsonProperty("total")]
|
||||||
public int Total { get; set; }
|
public int Total { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,26 +8,37 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("birthdate")]
|
[JsonProperty("birthdate")]
|
||||||
public String Birthdate { get; set; }
|
public String Birthdate { get; set; }
|
||||||
|
|
||||||
[JsonProperty("country")]
|
[JsonProperty("country")]
|
||||||
public String Country { get; set; }
|
public String Country { get; set; }
|
||||||
|
|
||||||
[JsonProperty("display_name")]
|
[JsonProperty("display_name")]
|
||||||
public String DisplayName { get; set; }
|
public String DisplayName { get; set; }
|
||||||
|
|
||||||
[JsonProperty("email")]
|
[JsonProperty("email")]
|
||||||
public String Email { get; set; }
|
public String Email { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<string, string> ExternalUrls { get; set; }
|
public Dictionary<string, string> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("followers")]
|
[JsonProperty("followers")]
|
||||||
public Followers Followers { get; set; }
|
public Followers Followers { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("product")]
|
[JsonProperty("product")]
|
||||||
public String Product { get; set; }
|
public String Product { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,18 +8,25 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("display_name")]
|
[JsonProperty("display_name")]
|
||||||
public String DisplayName { get; set; }
|
public String DisplayName { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<string, string> ExternalUrls { get; set; }
|
public Dictionary<string, string> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("followers")]
|
[JsonProperty("followers")]
|
||||||
public Followers Followers { get; set; }
|
public Followers Followers { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,10 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("artists")]
|
[JsonProperty("artists")]
|
||||||
public Paging<SimpleArtist> Artists { get; set; }
|
public Paging<SimpleArtist> Artists { get; set; }
|
||||||
|
|
||||||
[JsonProperty("albums")]
|
[JsonProperty("albums")]
|
||||||
public Paging<SimpleAlbum> Albums { get; set; }
|
public Paging<SimpleAlbum> Albums { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tracks")]
|
[JsonProperty("tracks")]
|
||||||
public Paging<FullTrack> Tracks { get; set; }
|
public Paging<FullTrack> Tracks { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,20 +8,28 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("album_type")]
|
[JsonProperty("album_type")]
|
||||||
public String AlbumType { get; set; }
|
public String AlbumType { get; set; }
|
||||||
|
|
||||||
[JsonProperty("available_markets")]
|
[JsonProperty("available_markets")]
|
||||||
public List<String> AvailableMarkets { get; set; }
|
public List<String> AvailableMarkets { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<String, String> ExternalUrls { get; set; }
|
public Dictionary<String, String> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("images")]
|
[JsonProperty("images")]
|
||||||
public List<Image> Images { get; set; }
|
public List<Image> Images { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,14 +8,19 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<String, String> ExternalUrls { get; set; }
|
public Dictionary<String, String> ExternalUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -8,28 +8,40 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
[JsonProperty("artist")]
|
[JsonProperty("artist")]
|
||||||
public SimpleArtist Artist { get; set; }
|
public SimpleArtist Artist { get; set; }
|
||||||
|
|
||||||
[JsonProperty("available_markets")]
|
[JsonProperty("available_markets")]
|
||||||
public List<String> AvailableMarkets { get; set; }
|
public List<String> AvailableMarkets { get; set; }
|
||||||
|
|
||||||
[JsonProperty("disc_number")]
|
[JsonProperty("disc_number")]
|
||||||
public int DiscNumber { get; set; }
|
public int DiscNumber { get; set; }
|
||||||
|
|
||||||
[JsonProperty("duration_ms")]
|
[JsonProperty("duration_ms")]
|
||||||
public int DurationMs { get; set; }
|
public int DurationMs { get; set; }
|
||||||
|
|
||||||
[JsonProperty("explicit")]
|
[JsonProperty("explicit")]
|
||||||
public Boolean Explicit { get; set; }
|
public Boolean Explicit { get; set; }
|
||||||
|
|
||||||
[JsonProperty("external_urls")]
|
[JsonProperty("external_urls")]
|
||||||
public Dictionary<String, String> ExternUrls { get; set; }
|
public Dictionary<String, String> ExternUrls { get; set; }
|
||||||
|
|
||||||
[JsonProperty("href")]
|
[JsonProperty("href")]
|
||||||
public String Href { get; set; }
|
public String Href { get; set; }
|
||||||
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public String Id { get; set; }
|
public String Id { get; set; }
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("preview_url")]
|
[JsonProperty("preview_url")]
|
||||||
public String PreviewUrl { get; set; }
|
public String PreviewUrl { get; set; }
|
||||||
|
|
||||||
[JsonProperty("track_number")]
|
[JsonProperty("track_number")]
|
||||||
public int TrackNumber { get; set; }
|
public int TrackNumber { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public String Type { get; set; }
|
public String Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("uri")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
public String Uri { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -5,26 +5,31 @@ namespace SpotifyAPI.Web.Models
|
|||||||
{
|
{
|
||||||
public class Token
|
public class Token
|
||||||
{
|
{
|
||||||
[JsonProperty("access_token")]
|
|
||||||
public String AccessToken { get; set; }
|
|
||||||
[JsonProperty("token_type")]
|
|
||||||
public String TokenType { get; set; }
|
|
||||||
[JsonProperty("expires_in")]
|
|
||||||
public int ExpiresIn { get; set; }
|
|
||||||
[JsonProperty("refresh_token")]
|
|
||||||
public String RefreshToken { get; set; }
|
|
||||||
[JsonProperty("error")]
|
|
||||||
public String Error { get; set; }
|
|
||||||
[JsonProperty("error_description")]
|
|
||||||
public String ErrorDescription { get; set; }
|
|
||||||
|
|
||||||
public DateTime CreateDate { get; set; }
|
|
||||||
|
|
||||||
public Token()
|
public Token()
|
||||||
{
|
{
|
||||||
CreateDate = DateTime.Now;
|
CreateDate = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonProperty("access_token")]
|
||||||
|
public String AccessToken { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("token_type")]
|
||||||
|
public String TokenType { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("expires_in")]
|
||||||
|
public int ExpiresIn { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("refresh_token")]
|
||||||
|
public String RefreshToken { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("error")]
|
||||||
|
public String Error { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("error_description")]
|
||||||
|
public String ErrorDescription { get; set; }
|
||||||
|
|
||||||
|
public DateTime CreateDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the token has expired
|
/// Checks if the token has expired
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user