Spotify.NET/SpotifyAPI.Web/Models/Paging.cs

39 lines
848 B
C#
Raw Normal View History

using Newtonsoft.Json;
using System.Collections.Generic;
namespace SpotifyAPI.Web.Models
{
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
[JsonProperty("items")]
public List<T> Items { get; set; }
2015-07-26 13:02:22 +01:00
[JsonProperty("limit")]
public int Limit { get; set; }
2015-07-26 13:02:22 +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
[JsonProperty("offset")]
public int Offset { get; set; }
2015-07-26 13:02:22 +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
[JsonProperty("total")]
public int Total { get; set; }
public bool HasNextPage()
{
return Next != null;
}
public bool HasPreviousPage()
{
return Next != null;
}
}
2015-07-26 13:02:22 +01:00
}