diff --git a/docs/SpotifyWebAPI/gettingstarted.md b/docs/SpotifyWebAPI/gettingstarted.md index ac1a4f0c..8d0c8e40 100644 --- a/docs/SpotifyWebAPI/gettingstarted.md +++ b/docs/SpotifyWebAPI/gettingstarted.md @@ -59,6 +59,17 @@ if (profile.HasError()) } ``` +##Asynchronous +Every API-Call now has an asynchronous method. Just append `Async` to the Method-Name. +Example: +```cs +public async void Test() +{ + var profile = await _spotify.GetPrivateProfileAsync(); + Console.WriteLine(profile.DisplayName); +} +``` + --- ##API-Reference @@ -120,3 +131,6 @@ if (profile.HasError()) ###Tracks * [GetSeveralTracks](/SpotifyWebAPI/tracks#getseveraltracks) * [GetTrack](/SpotifyWebAPI/tracks#gettrack) + +###Util +* [Utility-Functions](/SpotifyWebAPI/util) diff --git a/docs/SpotifyWebAPI/util.md b/docs/SpotifyWebAPI/util.md new file mode 100644 index 00000000..4885fdbd --- /dev/null +++ b/docs/SpotifyWebAPI/util.md @@ -0,0 +1,15 @@ +##Paging-Methods +The `SpotifyWebAPI` features two paging-helper Methods, `GetNextPage()` and `GetPreviousPage()`. +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); +} +```` diff --git a/mkdocs.yml b/mkdocs.yml index b6591544..8e84470f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,6 +14,7 @@ pages: - ['SpotifyWebAPI/profiles.md', 'SpotifyWebAPI', '- Profiles'] - ['SpotifyWebAPI/search.md', 'SpotifyWebAPI', '- Search'] - ['SpotifyWebAPI/tracks.md', 'SpotifyWebAPI', '- Tracks'] +- ['SpotifyWebAPI/util.md', 'SpotifyWebAPI', '- Util'] - ['SpotifyLocalAPI/index.md', 'SpotifyLocalAPI', 'SpotifyLocalAPI'] repo_url: 'https://github.com/JohnnyCrazy/SpotifyAPI-NET' site_author: 'JohnnyCrazy'