2015-10-16 23:44:35 +01:00
|
|
|
|
using Newtonsoft.Json;
|
2014-07-20 21:42:46 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2015-07-07 17:11:11 +01:00
|
|
|
|
namespace SpotifyAPI.Web.Models
|
2014-07-20 21:42:46 +01:00
|
|
|
|
{
|
|
|
|
|
public class Paging<T> : BasicModel
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("href")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Href { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("items")]
|
|
|
|
|
public List<T> Items { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("limit")]
|
|
|
|
|
public int Limit { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("next")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Next { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("offset")]
|
|
|
|
|
public int Offset { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("previous")]
|
2016-03-31 11:08:23 +01:00
|
|
|
|
public string Previous { get; set; }
|
2015-07-26 13:02:22 +01:00
|
|
|
|
|
2014-07-20 21:42:46 +01:00
|
|
|
|
[JsonProperty("total")]
|
|
|
|
|
public int Total { get; set; }
|
2015-11-07 19:18:39 +00:00
|
|
|
|
|
|
|
|
|
public bool HasNextPage()
|
|
|
|
|
{
|
|
|
|
|
return Next != null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool HasPreviousPage()
|
|
|
|
|
{
|
|
|
|
|
return Next != null;
|
|
|
|
|
}
|
2014-07-20 21:42:46 +01:00
|
|
|
|
}
|
2015-07-26 13:02:22 +01:00
|
|
|
|
}
|