Spotify.NET/SpotifyAPI.Docs/docs/web/utils.md

19 lines
535 B
Markdown
Raw Normal View History

2019-08-16 23:40:04 +01:00
# Utilities
## Paging-Methods
2016-08-20 11:49:09 +01:00
The `SpotifyWebAPI` features two paging-helper Methods, `GetNextPage(Paging<T> page)` and `GetPreviousPage(Paging<T> page)`.
Both are an easy way to receive the next/previous page of a Paging-Object.
Sample:
````csharp
var playlistTracks = _spotify.GetPlaylistTracks("1122095781", "4EcNf2l8rXInbJOf3tQdgU", "", 50);
while (true)
{
Console.WriteLine(playlistTracks.Items.Count);
if (!playlistTracks.HasNextPage())
break;
playlistTracks = _spotify.GetNextPage(playlistTracks);
}
````