@@ -59,7 +59,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
5959 *
6060 * @return The created [Playlist] object with no tracks
6161 */
62- fun createPlaylist (
62+ fun createClientPlaylist (
6363 name : String ,
6464 description : String? = null,
6565 public : Boolean? = null,
@@ -95,8 +95,8 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
9595 * @throws BadRequestException if any invalid track ids is provided or the playlist is not found
9696 */
9797
98- fun addTrackToPlaylist (playlist : String , track : String , position : Int? = null) =
99- addTracksToPlaylist (playlist, track, position = position)
98+ fun addTrackToClientPlaylist (playlist : String , track : String , position : Int? = null) =
99+ addTracksToClientPlaylist (playlist, track, position = position)
100100
101101 /* *
102102 * Add one or more tracks to a user’s playlist.
@@ -112,7 +112,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
112112 *
113113 * @throws BadRequestException if any invalid track ids is provided or the playlist is not found
114114 */
115- fun addTracksToPlaylist (playlist : String , vararg tracks : String , position : Int? = null): SpotifyRestAction <Unit > {
115+ fun addTracksToClientPlaylist (playlist : String , vararg tracks : String , position : Int? = null): SpotifyRestAction <Unit > {
116116 val body = jsonMap()
117117 body + = json { " uris" to JsonArray (tracks.map { TrackUri (TrackUri (it).id.encodeUrl()).uri }.map(::JsonPrimitive )) }
118118 if (position != null ) body + = json { " position" to position }
@@ -139,7 +139,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
139139 *
140140 * @throws BadRequestException if the playlist is not found or parameters exceed the max length
141141 */
142- fun changePlaylistDetails (
142+ fun changeClientPlaylistDetails (
143143 playlist : String ,
144144 name : String? = null,
145145 public : Boolean? = null,
@@ -172,7 +172,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
172172 *
173173 * @throws BadRequestException if the filters provided are illegal
174174 */
175- fun getPlaylists (
175+ fun getClientPlaylists (
176176 limit : Int? = null,
177177 offset : Int? = null
178178 ): SpotifyRestActionPaging <SimplePlaylist , PagingObject <SimplePlaylist >> {
@@ -185,7 +185,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
185185 }
186186
187187 /* *
188- * Find a client playlist by its id. If you want to find multiple playlists, consider using [getPlaylists ]
188+ * Find a client playlist by its id. If you want to find multiple playlists, consider using [getClientPlaylists ]
189189 *
190190 * **Note that** private playlists are only retrievable for the current user and require the [SpotifyScope.PLAYLIST_READ_PRIVATE] scope
191191 * to have been authorized by the user. Note that this scope alone will not return a collaborative playlist, even
@@ -197,9 +197,9 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
197197 *
198198 * @return A possibly-null [SimplePlaylist] if the playlist doesn't exist
199199 */
200- fun getPlaylist (id : String ): SpotifyRestAction <SimplePlaylist ?> {
200+ fun getClientPlaylist (id : String ): SpotifyRestAction <SimplePlaylist ?> {
201201 return toAction {
202- val playlists = getPlaylists ().complete()
202+ val playlists = getClientPlaylists ().complete()
203203 playlists.items.find { it.id == id } ? : playlists.getAllItems().complete().find { it.id == id }
204204 }
205205 }
@@ -211,7 +211,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
211211 *
212212 * @param playlist playlist id
213213 */
214- fun deletePlaylist (playlist : String ): SpotifyRestAction <Unit > {
214+ fun deleteClientPlaylist (playlist : String ): SpotifyRestAction <Unit > {
215215 return (api as SpotifyClientApi ).following.unfollowPlaylist(PlaylistUri (playlist).id)
216216 }
217217
@@ -235,7 +235,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
235235 *
236236 * @throws BadRequestException if the playlist is not found or illegal filters are applied
237237 */
238- fun reorderPlaylistTracks (
238+ fun reorderClientPlaylistTracks (
239239 playlist : String ,
240240 reorderRangeStart : Int ,
241241 reorderRangeLength : Int? = null,
@@ -267,7 +267,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
267267 *
268268 * @throws BadRequestException if playlist is not found or illegal tracks are provided
269269 */
270- fun setPlaylistTracks (playlist : String , vararg tracks : String ): SpotifyRestAction <Unit > {
270+ fun setClientPlaylistTracks (playlist : String , vararg tracks : String ): SpotifyRestAction <Unit > {
271271 return toAction {
272272 val body = jsonMap()
273273 body + = json { " uris" to JsonArray (tracks.map { TrackUri (TrackUri (it).id.encodeUrl()).uri }.map(::JsonPrimitive )) }
@@ -291,14 +291,14 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
291291 *
292292 * @throws BadRequestException if playlist is not found or illegal tracks are provided
293293 */
294- fun replacePlaylistTracks (playlist : String , vararg tracks : String ) = setPlaylistTracks (playlist, * tracks)
294+ fun replaceClientPlaylistTracks (playlist : String , vararg tracks : String ) = setClientPlaylistTracks (playlist, * tracks)
295295
296296 /* *
297297 * Remove all the tracks in a playlist
298298 * @param playlist the spotify id or uri for the playlist.
299299 */
300- fun removeAllPlaylistTracks (playlist : String ): SpotifyRestAction <Unit > {
301- return setPlaylistTracks (playlist)
300+ fun removeAllClientPlaylistTracks (playlist : String ): SpotifyRestAction <Unit > {
301+ return setClientPlaylistTracks (playlist)
302302 }
303303
304304 /* *
@@ -322,7 +322,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
322322 * @throws IIOException if the image is not found
323323 * @throws BadRequestException if invalid data is provided
324324 */
325- fun uploadPlaylistCover (
325+ fun uploadClientPlaylistCover (
326326 playlist : String ,
327327 imagePath : String? = null,
328328 imageFile : File ? = null,
@@ -357,12 +357,12 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
357357 * @param positions The positions at which the track is located in the playlist
358358 * @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
359359 */
360- fun removeTrackFromPlaylist (
360+ fun removeTrackFromClientPlaylist (
361361 playlist : String ,
362362 track : String ,
363363 positions : SpotifyTrackPositions ,
364364 snapshotId : String? = null
365- ) = removeTracksFromPlaylist (playlist, track to positions, snapshotId = snapshotId)
365+ ) = removeTracksFromClientPlaylist (playlist, track to positions, snapshotId = snapshotId)
366366
367367 /* *
368368 * Remove all occurrences of a track from the specified playlist.
@@ -374,11 +374,11 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
374374 * @param track The track id
375375 * @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
376376 */
377- fun removeTrackFromPlaylist (
377+ fun removeTrackFromClientPlaylist (
378378 playlist : String ,
379379 track : String ,
380380 snapshotId : String? = null
381- ) = removeTracksFromPlaylist (playlist, track, snapshotId = snapshotId)
381+ ) = removeTracksFromClientPlaylist (playlist, track, snapshotId = snapshotId)
382382
383383 /* *
384384 * Remove all occurrences of the specified tracks from the given playlist.
@@ -390,7 +390,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
390390 * @param tracks An array of track ids
391391 * @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
392392 */
393- fun removeTracksFromPlaylist (
393+ fun removeTracksFromClientPlaylist (
394394 playlist : String ,
395395 vararg tracks : String ,
396396 snapshotId : String? = null
@@ -406,7 +406,7 @@ class ClientPlaylistApi(api: SpotifyApi<*, *>) : PlaylistApi(api) {
406406 * @param tracks An array of [Pair]s of track ids *and* track positions (zero-based)
407407 * @param snapshotId The playlist snapshot against which to apply this action. **recommended to have**
408408 */
409- fun removeTracksFromPlaylist (
409+ fun removeTracksFromClientPlaylist (
410410 playlist : String ,
411411 vararg tracks : Pair <String , SpotifyTrackPositions >,
412412 snapshotId : String? = null
0 commit comments