Skip to content

Commit afa845b

Browse files
committed
fix ambiguous method naming
1 parent d280e24 commit afa845b

File tree

3 files changed

+18
-46
lines changed

3 files changed

+18
-46
lines changed

README.md

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,16 @@ This is the [Kotlin](https://kotlinlang.org/) implementation of the [Spotify Web
88

99
## Install it
1010

11-
### JVM
12-
This library is available via JCenter [here](https://search.maven.org/artifact/com.adamratzman/spotify-api-kotlin).
13-
14-
#### Gradle
11+
### JVM, Android, JS
1512
```
1613
repositories {
1714
jcenter()
1815
}
1916
20-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '3.2.06'
21-
```
22-
23-
To use the latest snapshot instead, you must add the Jitpack repository as well
24-
```
25-
repositories {
26-
maven { url 'https://jitpack.io' }
27-
jcenter()
28-
}
29-
```
30-
Then, you can use the following:
31-
```
32-
dependencies {
33-
compile 'com.github.adamint:spotify-web-api-kotlin:dev-SNAPSHOT'
34-
}
17+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-core', version: '3.2.06'
3518
```
3619

3720
### Android
38-
```
39-
repositories {
40-
jcenter()
41-
}
42-
43-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-android', version: '3.2.06'
44-
```
45-
4621
**If you declare any release types not named debug or release, you may see "Could not resolve com.adamratzman:spotify-api-kotlin-android:VERSION". You need to do the following for each release type not named debug or release:**
4722
```
4823
android {
@@ -68,21 +43,9 @@ packagingOptions {
6843
}
6944
```
7045

71-
### Kotlin/JS
72-
```
73-
repositories {
74-
jcenter()
75-
}
76-
77-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-js', version: '3.2.06'
78-
```
79-
8046
## Documentation
8147
The `spotify-web-api-kotlin` JavaDocs are hosted at https://adamint.github.io/spotify-web-api-kotlin/spotify-web-api-kotlin/
8248

83-
## Samples
84-
Samples for all APIs are located in the `samples` directory
85-
8649
## Have a question?
8750
If you have a question, you can:
8851

@@ -94,16 +57,25 @@ If you have a question, you can:
9457
To decide which api you need (SpotifyAppApi, SpotifyClientApi, SpotifyImplicitGrantApi), please refer to
9558
https://developer.spotify.com/documentation/general/guides/authorization-guide/. In general:
9659
- If you don't need client resources, use SpotifyAppApi
97-
- If you're using the api in a backend application, use SpotifyClientApi
98-
- If you're using the api in a frontend application, use SpotifyImplicitGrantApi
60+
- If you're using the api in a backend application, use SpotifyClientApi (with or without PKCE)
61+
- If you're using the api in Kotlin/JS browser, use SpotifyImplicitGrantApi
62+
- If you need access to client resources in an Android or other application, use SpotifyClientApi with PKCe
63+
9964

10065
### SpotifyAppApi
10166
This provides access only to public Spotify endpoints. By default, the SpotifyApi `Token` automatically regenerates when needed. This can be changed
10267
through the `automaticRefresh` parameter in all builders.
10368

10469
There are four exposed builders, depending on the level of control you need over api creation.
105-
Please see the [spotifyAppApi builder docs](https://adamint.github.io/spotify-web-api-kotlin/docs/spotify-web-api-kotlin/com.adamratzman.spotify/spotify-app-api.html) for a full list of available builders, or the app api [samples](https://github.com/adamint/spotify-web-api-kotlin/tree/master/samples/jvm/src/main/kotlin/appApi).
106-
70+
Please see the [spotifyAppApi builder docs](https://adamint.github.io/spotify-web-api-kotlin/docs/spotify-web-api-kotlin/com.adamratzman.spotify/spotify-app-api.html) for a full list of available builders.
71+
72+
You will need:
73+
- Spotify application client id
74+
- Spotify application client secret
75+
76+
Example creation (default settings)
77+
78+
10779

10880
### SpotifyClientApi
10981
The `SpotifyClientApi` is a superset of `SpotifyApi`; thus, you have access to all `SpotifyApi` methods in `SpotifyClientApi`.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ buildscript {
3131
}
3232

3333
group = "com.adamratzman"
34-
version = "3.2.06"
34+
version = "3.2.07"
3535

3636
/*java {
3737
withSourcesJar()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ fun spotifyImplicitGrantApi(
154154
fun spotifyAppApi(
155155
clientId: String,
156156
clientSecret: String,
157-
options: SpotifyApiOptionsBuilder? = null
157+
options: SpotifyApiOptionsBuilder
158158
) = spotifyAppApi(clientId, clientSecret) {
159-
options?.let { this.options = it.build() }
159+
this.options = options.build()
160160
}
161161

162162
/**

0 commit comments

Comments
 (0)