Skip to content

Commit 939904e

Browse files
committed
expose serialization and ktor
1 parent afa845b commit 939904e

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
jcenter()
1515
}
1616
17-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-core', version: '3.2.06'
17+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-core', version: '3.2.08'
1818
```
1919

2020
### Android
@@ -75,6 +75,12 @@ You will need:
7575

7676
Example creation (default settings)
7777

78+
```kotlin
79+
val api = spotifyAppApi("clientId", "clientSecret").build() // create and build api
80+
println(api.browse.getNewReleases().complete()) // use it
81+
```
82+
83+
Example creation, using an existing Token
7884

7985

8086
### SpotifyClientApi
@@ -125,6 +131,11 @@ Notes:
125131
- `allowBulkRequests` for example, lets you query 80 artists in one wrapper call by splitting it into 50 artists + 30 artists
126132
- `refreshTokenProducer` is useful when you want to re-authorize with the Spotify Auth SDK or elsewhere
127133

134+
### Tips
135+
-
136+
137+
138+
128139
### Building the API
129140
The easiest way to build the API is synchronously using .build() after a builder
130141

build.gradle.kts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ buildscript {
3131
}
3232

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

3636
/*java {
3737
withSourcesJar()
@@ -145,8 +145,8 @@ kotlin {
145145
val commonMain by getting {
146146
dependencies {
147147
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutineVersion")
148-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion")
149-
implementation("io.ktor:ktor-client-core:$ktorVersion")
148+
api("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion")
149+
api("io.ktor:ktor-client-core:$ktorVersion")
150150

151151
implementation(kotlin("stdlib-common"))
152152
}
@@ -167,8 +167,8 @@ kotlin {
167167

168168
dependencies {
169169
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
170-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion")
171-
implementation("io.ktor:ktor-client-cio:$ktorVersion")
170+
api("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion")
171+
api("io.ktor:ktor-client-cio:$ktorVersion")
172172
implementation(kotlin("stdlib-jdk8"))
173173
}
174174
}
@@ -187,10 +187,10 @@ kotlin {
187187

188188
val jsMain by getting {
189189
dependencies {
190-
implementation(npm("text-encoding", "0.7.0"))
190+
api(npm("text-encoding", "0.7.0"))
191191
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutineVersion")
192-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serializationVersion")
193-
implementation("io.ktor:ktor-client-js:$ktorVersion")
192+
api("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serializationVersion")
193+
api("io.ktor:ktor-client-js:$ktorVersion")
194194
api(npm("abort-controller", "3.0.0"))
195195
api(npm("node-fetch", "2.6.0"))
196196

@@ -212,10 +212,10 @@ kotlin {
212212
}
213213

214214
dependencies {
215-
implementation("net.sourceforge.streamsupport:android-retrofuture:1.7.2")
215+
api("net.sourceforge.streamsupport:android-retrofuture:1.7.2")
216216
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
217-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion")
218-
implementation("io.ktor:ktor-client-cio:$ktorVersion")
217+
api("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion")
218+
api("io.ktor:ktor-client-cio:$ktorVersion")
219219
implementation(kotlin("stdlib-jdk8"))
220220
}
221221
}

0 commit comments

Comments
 (0)