@@ -209,8 +209,8 @@ public class ClientFollowingApi(api: GenericSpotifyApi) : FollowingApi(api) {
209209 * with full [Artist] objects
210210 */
211211 public suspend fun getFollowedArtists (
212- limit : Int? ,
213- after : String?
212+ limit : Int? = api.spotifyApiOptions.defaultLimit ,
213+ after : String? = null
214214 ): CursorBasedPagingObject <Artist > = get(
215215 endpointBuilder(" /me/following" ).with (" type" , " artist" ).with (" limit" , limit).with (
216216 " after" ,
@@ -232,8 +232,8 @@ public class ClientFollowingApi(api: GenericSpotifyApi) : FollowingApi(api) {
232232 * with full [Artist] objects
233233 */
234234 public fun getFollowedArtistsRestAction (
235- limit : Int? ,
236- after : String?
235+ limit : Int? = api.spotifyApiOptions.defaultLimit ,
236+ after : String? = null
237237 ): SpotifyRestAction <CursorBasedPagingObject <Artist >> = SpotifyRestAction { getFollowedArtists(limit, after) }
238238
239239 /* *
@@ -313,7 +313,7 @@ public class ClientFollowingApi(api: GenericSpotifyApi) : FollowingApi(api) {
313313 *
314314 * @throws BadRequestException if an invalid id is provided
315315 */
316- public fun followArtistRestAction (artistId : String ) = SpotifyRestAction { followArtist(artistId) }
316+ public fun followArtistRestAction (artistId : String ): SpotifyRestAction < Unit > = SpotifyRestAction { followArtist(artistId) }
317317
318318 /* *
319319 * Add the current user as a follower of other artists
@@ -369,7 +369,7 @@ public class ClientFollowingApi(api: GenericSpotifyApi) : FollowingApi(api) {
369369 *
370370 * @throws BadRequestException if the playlist is not found
371371 */
372- public suspend fun followPlaylist (playlist : String , followPublicly : Boolean ): String = put(
372+ public suspend fun followPlaylist (playlist : String , followPublicly : Boolean = true ): String = put(
373373 endpointBuilder(" /playlists/${PlaylistUri (playlist).id} /followers" ).toString(),
374374 " {\" public\" : $followPublicly }"
375375 )
0 commit comments