2015-10-16 23:44:35 +01:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System;
|
2014-07-20 21:42:46 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
2015-07-07 17:11:11 +01:00
|
|
|
|
namespace SpotifyAPI.Web.Models
|
2014-07-20 21:42:46 +01:00
|
|
|
|
{
|
|
|
|
|
public class Image
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("url")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Url { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("width")]
|
|
|
|
|
public int Width { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("height")]
|
|
|
|
|
public int Height { get; set; }
|
|
|
|
|
}
|
2015-07-07 17:11:11 +01:00
|
|
|
|
|
2015-07-26 13:03:53 +01:00
|
|
|
|
public class ErrorResponse : BasicModel
|
|
|
|
|
{
|
|
|
|
|
}
|
2014-12-04 17:18:11 +00:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
public class Error
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("status")]
|
|
|
|
|
public int Status { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("message")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Message { get; set; }
|
2014-07-20 21:42:46 +01:00
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
public class PlaylistTrackCollection
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("href")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Href { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("total")]
|
|
|
|
|
public int Total { get; set; }
|
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
public class Followers
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("href")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Href { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("total")]
|
|
|
|
|
public int Total { get; set; }
|
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
public class PlaylistTrack
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("added_at")]
|
|
|
|
|
public DateTime AddedAt { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("added_by")]
|
|
|
|
|
public PublicProfile AddedBy { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("track")]
|
|
|
|
|
public FullTrack Track { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-03-23 15:35:36 +00:00
|
|
|
|
[JsonProperty("is_local")]
|
|
|
|
|
public Boolean IsLocal { get; set; }
|
2014-07-20 21:42:46 +01:00
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-07-07 17:11:11 +01:00
|
|
|
|
public class DeleteTrackUri
|
2014-12-04 17:18:11 +00:00
|
|
|
|
{
|
2015-07-07 17:11:11 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Delete-Track Wrapper
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uri">An Spotify-URI</param>
|
|
|
|
|
/// <param name="positions">Optional positions</param>
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public DeleteTrackUri(string uri, params int[] positions)
|
2014-12-04 17:18:11 +00:00
|
|
|
|
{
|
2015-07-07 17:11:11 +01:00
|
|
|
|
Positions = positions.ToList();
|
|
|
|
|
Uri = uri;
|
2014-12-04 17:18:11 +00:00
|
|
|
|
}
|
2015-07-07 17:11:11 +01:00
|
|
|
|
|
2015-07-26 13:03:53 +01:00
|
|
|
|
[JsonProperty("uri")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Uri { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
|
|
|
|
[JsonProperty("positions")]
|
|
|
|
|
public List<int> Positions { get; set; }
|
|
|
|
|
|
2014-12-04 17:18:11 +00:00
|
|
|
|
public bool ShouldSerializePositions()
|
|
|
|
|
{
|
|
|
|
|
return (Positions.Count > 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-12-04 17:18:11 +00:00
|
|
|
|
public class Copyright
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("text")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Text { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2014-12-04 17:18:11 +00:00
|
|
|
|
[JsonProperty("type")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Type { get; set; }
|
2014-12-04 17:18:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-02-12 23:23:07 +00:00
|
|
|
|
public class LinkedFrom
|
2014-12-04 17:18:11 +00:00
|
|
|
|
{
|
2015-02-12 23:23:07 +00:00
|
|
|
|
[JsonProperty("external_urls")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public Dictionary<string, string> ExternalUrls { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-02-12 23:23:07 +00:00
|
|
|
|
[JsonProperty("href")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Href { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-02-12 23:23:07 +00:00
|
|
|
|
[JsonProperty("id")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Id { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-02-12 23:23:07 +00:00
|
|
|
|
[JsonProperty("type")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Type { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-02-12 23:23:07 +00:00
|
|
|
|
[JsonProperty("uri")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Uri { get; set; }
|
2014-12-04 17:18:11 +00:00
|
|
|
|
}
|
2015-02-21 17:16:56 +00:00
|
|
|
|
|
|
|
|
|
public class SavedTrack
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("added_at")]
|
|
|
|
|
public DateTime AddedAt { get; set; }
|
2015-07-26 13:03:53 +01:00
|
|
|
|
|
2015-02-21 17:16:56 +00:00
|
|
|
|
[JsonProperty("track")]
|
|
|
|
|
public FullTrack Track { get; set; }
|
|
|
|
|
}
|
2015-07-26 13:00:17 +01:00
|
|
|
|
|
2015-12-07 13:13:24 +00:00
|
|
|
|
public class SavedAlbum
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("added_at")]
|
|
|
|
|
public DateTime AddedAt { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("album")]
|
2016-01-22 04:51:59 +00:00
|
|
|
|
public FullAlbum Album { get; set; }
|
2015-12-07 13:13:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-07-26 13:00:17 +01:00
|
|
|
|
public class Cursor
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("after")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string After { get; set; }
|
2017-03-02 21:28:55 +00:00
|
|
|
|
|
|
|
|
|
[JsonProperty("before")]
|
|
|
|
|
public string Before { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Context
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("type")]
|
|
|
|
|
public string Type { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("href")]
|
|
|
|
|
public string Href { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("external_urls")]
|
|
|
|
|
public Dictionary<string, string> ExternalUrls { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("uri")]
|
|
|
|
|
public string Uri { get; set; }
|
2015-07-26 13:00:17 +01:00
|
|
|
|
}
|
2015-07-26 13:03:53 +01:00
|
|
|
|
}
|