Spotify.NET/SpotifyAPI/Web/Models/Paging.cs
Johnny @PC 323561909e Added HasNextPage and HasPreviousPage to Paging-Objects.
Renamed Next and Previous to GetNextPage and GetPreviousPage
2015-11-07 20:18:39 +01:00

40 lines
862 B
C#

using Newtonsoft.Json;
using System;
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 Next != null;
}
}
}