You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 76f1a47
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/pagination.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,8 @@ It allows to receive only a subset of all available data and dynamically check i
14
14
`PaginateAll` will query all remaining elements based on a first page and return all of them in a `IList`. This method should not be used for a huge amount of pages (e.g `Search` Endpoint), since it stores every response in memory.
15
15
16
16
```csharp
17
-
// we need the first page, every syntax can be used for pagination
17
+
// we need the first page
18
18
varpage=awaitspotify.Playlists.CurrentUsers();
19
-
varpage=spotify.Playlists.CurrentUsers();
20
-
varpage= () =>spotify.Playlists.CurrentUsers();
21
19
22
20
// allPages will include the first page retrived before
23
21
varallPages=awaitspotify.PaginateAll(page);
@@ -31,10 +29,8 @@ var allPages = await spotify.PaginateAll(page);
31
29
`Paginate` is based on `IAsyncEnumerable` and streams pages instead of returning them all in one list. This allows to break the fetching early and keeps only 1 page in memory at a time. This method should always be preferred to `PaginateAll`
32
30
33
31
```csharp
34
-
// we need the first page, every syntax can be used for pagination
0 commit comments