Spotify.NET/SpotifyAPI.Web/Models/Paging.cs
Alex 7d04f58c74 Typo Fix in HasPreviousPage() (#387)
was returning the status of Next instead of Previous
2019-09-20 00:17:43 +02:00

40 lines
853 B
C#

using Newtonsoft.Json;
using System.Collections.Generic;
namespace SpotifyAPI.Web.Models
{
public class Paging<T> : BasicModel
{
[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; }
public bool HasNextPage()
{
return Next != null;
}
public bool HasPreviousPage()
{
return Previous != null;
}
}
}