Skip to content

Commit 2e0f1da

Browse files
committed
add less confusing configuration block name #105
1 parent 98906f6 commit 2e0f1da

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/kotlin/com/adamratzman/spotify/Builder.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,20 @@ class SpotifyApiBuilderDsl {
289289
utilities = SpotifyUtilitiesBuilder().apply(block).build()
290290
}
291291

292+
/**
293+
* Allows you to override default values for caching, token refresh, and logging
294+
*/
295+
fun config(block: SpotifyUtilitiesBuilder.() -> Unit) {
296+
utilities = SpotifyUtilitiesBuilder().apply(block).build()
297+
}
298+
299+
/**
300+
* Allows you to override default values for caching, token refresh, and logging
301+
*/
302+
fun options(block: SpotifyUtilitiesBuilder.() -> Unit) {
303+
utilities = SpotifyUtilitiesBuilder().apply(block).build()
304+
}
305+
292306
/**
293307
* Create a Spotify authorization URL from which client access can be obtained
294308
*
@@ -413,7 +427,7 @@ class SpotifyApiBuilderDsl {
413427
authorizationCode != null -> try {
414428
clientId ?: throw IllegalArgumentException()
415429
clientSecret ?: throw IllegalArgumentException()
416-
redirectUri ?: IllegalArgumentException()
430+
redirectUri ?: throw IllegalArgumentException()
417431

418432
val response = executeTokenRequest(HttpConnection(
419433
url = "https://accounts.spotify.com/api/token",

0 commit comments

Comments
 (0)