Skip to content

Commit 7f2adc0

Browse files
committed
fix authorization builder
1 parent 1eeb32a commit 7f2adc0

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repositories {
2929
jcenter()
3030
}
3131
32-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.3.01'
32+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.3.02'
3333
```
3434

3535
To use the latest snapshot instead, you must add the Jitpack repository as well
@@ -51,7 +51,7 @@ dependencies {
5151
<dependency>
5252
<groupId>com.adamratzman</groupId>
5353
<artifactId>spotify-api-kotlin</artifactId>
54-
<version>2.3.01</version>
54+
<version>2.3.02</version>
5555
</dependency>
5656
5757
<repository>

build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ apply plugin: 'kotlin'
2222
apply plugin: 'org.jetbrains.dokka'
2323

2424
group 'com.adamratzman'
25-
version '2.3.01'
25+
version '2.3.02'
2626

2727
archivesBaseName = 'spotify-api-kotlin'
2828

29-
sourceCompatibility = 1.8
30-
3129
repositories {
3230
jcenter()
3331
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ class SpotifyUserAuthorizationBuilder(
194194
var tokenString: String? = null,
195195
var token: Token? = null
196196
) {
197-
fun build() = if (authorizationCode == null && tokenString == null && token == null) throw IllegalArgumentException("An authorization method must be supplied")
198-
else SpotifyUserAuthorization(authorizationCode, tokenString, token)
197+
fun build() = SpotifyUserAuthorization(authorizationCode, tokenString, token)
199198
}
200199

201200
data class SpotifyUserAuthorization(

0 commit comments

Comments
 (0)