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