Skip to content

Commit ea997f2

Browse files
committed
add vararg/list limits
1 parent a25c9c9 commit ea997f2

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Kotlin Spotify Web API
2-
[ ![JCenter Download](https://api.bintray.com/packages/bintray/jcenter/com.adamratzman%3Aspotify-api-kotlin/images/download.svg) ](https://bintray.com/bintray/jcenter/com.adamratzman%3Aspotify-api-kotlin/_latestVersion)
2+
[![JCenter](https://maven-badges.herokuapp.com/maven-central/com.adamratzman/spotify-api-kotlin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.adamratzman/spotify-api-kotlin)
33
[![Build Status](http://144.217.240.243:8111/app/rest/builds/aggregated/strob:(buildType:(project:(id:SpotifyWebApiKotlin)))/statusIcon.svg)](http://144.217.240.243:8111/project.html?projectId=SpotifyWebApiKotlin)
44
[![](https://img.shields.io/badge/Documentation-latest-orange.svg)](https://adamint.github.io/spotify-web-api-kotlin/docs/spotify-web-api-kotlin/)
55
![](https://img.shields.io/badge/License-MIT-blue.svg)

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/client/ClientFollowingApi.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ class ClientFollowingApi(api: SpotifyApi<*, *>) : FollowingApi(api) {
180180
*
181181
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/follow-artists-users/)**
182182
*
183+
* @param users User ids or uris. Maximum **50**.
184+
*
183185
* @throws BadRequestException if an invalid id is provided
184186
*/
185187
fun followUsers(vararg users: String): SpotifyRestAction<Unit> {
@@ -214,6 +216,8 @@ class ClientFollowingApi(api: SpotifyApi<*, *>) : FollowingApi(api) {
214216
*
215217
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/follow-artists-users/)**
216218
*
219+
* @param artists User ids or uris. Maximum **50**.
220+
*
217221
* @throws BadRequestException if an invalid id is provided
218222
*/
219223
fun followArtists(vararg artists: String): SpotifyRestAction<Unit> {
@@ -279,7 +283,7 @@ class ClientFollowingApi(api: SpotifyApi<*, *>) : FollowingApi(api) {
279283
*
280284
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/unfollow-artists-users/)**
281285
*
282-
* @param users The users to be unfollowed from
286+
* @param users The users to be unfollowed from. Maximum **50**.
283287
*
284288
* @throws BadRequestException if an invalid id is provided
285289
*/
@@ -317,7 +321,8 @@ class ClientFollowingApi(api: SpotifyApi<*, *>) : FollowingApi(api) {
317321
*
318322
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/unfollow-artists-users/)**
319323
*
320-
* @param artists The artists to be unfollowed from
324+
* @param artists The artists to be unfollowed from. Maximum **50**.
325+
*
321326
*
322327
* @throws BadRequestException if an invalid id is provided
323328
*/

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/client/ClientLibraryApi.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ClientLibraryApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
109109
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/library/)**
110110
*
111111
* @param type The type of objects (album or track)
112-
* @param ids The spotify ids or uris of the objects
112+
* @param ids The spotify ids or uris of the objects. Maximum **50** ids.
113113
*
114114
* @throws BadRequestException if any of the provided ids is invalid
115115
*/
@@ -148,7 +148,7 @@ class ClientLibraryApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
148148
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/library/)**
149149
*
150150
* @param type The type of objects to check against (album or track)
151-
* @param ids The spotify ids or uris of the objects
151+
* @param ids The spotify ids or uris of the objects. Maximum **50** ids.
152152
*
153153
* @throws BadRequestException if any of the provided ids is invalid
154154
*/
@@ -189,7 +189,7 @@ class ClientLibraryApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
189189
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/library/)**
190190
*
191191
* @param type The type of objects to check against (album or track)
192-
* @param ids The spotify ids or uris of the objects
192+
* @param ids The spotify ids or uris of the objects. Maximum **50** ids.
193193
*
194194
* @throws BadRequestException if any of the provided ids is invalid
195195
*/

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/client/ClientPlaylistApi.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
281281
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/playlists/replace-playlists-tracks/)**
282282
*
283283
* @param playlist The spotify id or uri for the playlist.
284-
* @param tracks The Spotify track ids.
284+
* @param tracks The Spotify track ids. Maximum **100**.
285285
*
286286
* @throws BadRequestException if playlist is not found or illegal tracks are provided
287287
*/
@@ -307,7 +307,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
307307
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/playlists/replace-playlists-tracks/)**
308308
*
309309
* @param playlist The spotify id or uri for the playlist.
310-
* @param tracks The Spotify track ids.
310+
* @param tracks The Spotify track ids. Maximum **100**.
311311
*
312312
* @throws BadRequestException if playlist is not found or illegal tracks are provided
313313
*/
@@ -417,7 +417,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
417417
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/playlists/remove-tracks-playlist/)**
418418
*
419419
* @param playlist The playlist id
420-
* @param tracks An array of track ids
420+
* @param tracks An array of track ids. Maximum **100**.
421421
* @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
422422
*/
423423
fun removeTracksFromClientPlaylist(
@@ -435,7 +435,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
435435
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/playlists/remove-tracks-playlist/)**
436436
*
437437
* @param playlist The playlist id
438-
* @param tracks An array of [Pair]s of track ids *and* track positions (zero-based)
438+
* @param tracks An array of [Pair]s of track ids *and* track positions (zero-based). Maximum **100**.
439439
* @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
440440
*/
441441
fun removeTracksFromClientPlaylist(

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/public/AlbumApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AlbumApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
5656
*
5757
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/albums/get-several-albums/)**
5858
*
59-
* @param albums The spotify ids or uris for the albums.
59+
* @param albums The spotify ids or uris for the albums. Maximum **20**.
6060
* @param market Provide this parameter if you want to apply [Track Relinking](https://github.com/adamint/spotify-web-api-kotlin/blob/master/README.md#track-relinking)
6161
*
6262
* @return List of [Album] objects or null if the album could not be found, in the order requested

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/public/ArtistApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ArtistApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
5959
*
6060
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/artists/get-several-artists/)**
6161
*
62-
* @param artists The spotify ids or uris representing the artists.
62+
* @param artists The spotify ids or uris representing the artists. Maximum **50**.
6363
*
6464
* @return List of [Artist] objects or null if the artist could not be found, in the order requested
6565
*/

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/public/FollowingApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ open class FollowingApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
2828
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/check-user-following-playlist/)**
2929
*
3030
* @param playlist playlist id or uri
31-
* @param users user ids or uris to check
31+
* @param users user ids or uris to check. Maximum **5**.
3232
*
3333
* @return List of Booleans representing whether the user follows the playlist. User IDs **not** found will return false
3434
*

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/public/TrackApi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TrackApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
5757
*
5858
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-tracks/)**
5959
*
60-
* @param tracks The spotify id or uri for the tracks.
60+
* @param tracks The spotify id or uri for the tracks. Maximum **50**.
6161
* @param market Provide this parameter if you want to apply [Track Relinking](https://github.com/adamint/spotify-web-api-kotlin/blob/master/README.md#track-relinking)
6262
*
6363
* @return List of possibly-null full [Track] objects.
@@ -118,7 +118,7 @@ class TrackApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
118118
*
119119
* **[Api Reference](https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-audio-features/)**
120120
*
121-
* @param tracks vararg of spotify track ids or uris.
121+
* @param tracks vararg of spotify track ids or uris. Maximum **100**.
122122
*
123123
* @return Ordered list of possibly-null [AudioFeatures] objects.
124124
*/

0 commit comments

Comments
 (0)