Skip to content

Commit

Permalink
fix docs about convenience methods
Browse files Browse the repository at this point in the history
  • Loading branch information
eegli committed Jan 2, 2024
1 parent ccf1f40 commit 2af760b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/docs/packages/core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ try {

Methods that contain `all` in their name are convenience methods for (offset-based) paginated and limited endpoints. Limited endpoints expect a maximum amount of items when queried.

Examples are `Tracks.getUsersSavedTracks` (paginated) and `Tracks.getSeveralTracks` (limited). The Spotify Web API returns at most 50 items when asked for a user's saved tracks and allows no more than 50 track ids when querying for track catalog information.
Examples are `Tracks.getAllUsersSavedTracks` (paginated) and `Tracks.getAllTracks` (limited). The Spotify Web API returns at most 50 items when asked for a user's saved tracks and allows no more than 50 track ids when querying for track catalog information.

You can equivalently call the corresponding non-convenience methods `Tracks.getUsersSavedTracks` and `Tracks.getSeveralTracks` with the same arguments. However, you would have to manually handle pagination and chunking of ids. Convenience methods take care of this for you.

### Usage

Expand Down

0 comments on commit 2af760b

Please sign in to comment.