Skip to content

Commit 01c49d5

Browse files
committed
add explicit api declarations
Signed-off-by: Adam Ratzman <[email protected]>
1 parent cceef2c commit 01c49d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+765
-754
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repositories {
3939
jcenter()
4040
}
4141
42-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-core', version: '3.2.14'
42+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin-core', version: '3.2.15'
4343
```
4444

4545
Note that images and profiles are not supported on the Kotlin/JS target.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ buildscript {
2626
}
2727
dependencies {
2828
classpath("com.android.tools.build:gradle:3.5.4")
29-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")
29+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10")
3030
}
3131
}
3232

3333
group = "com.adamratzman"
34-
version = "3.2.14"
34+
version = "3.2.15"
3535

3636
tasks.withType<Test> {
3737
this.testLogging {

src/androidMain/kotlin/com/adamratzman/spotify/Pkce.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import android.os.Build.VERSION_CODES
66
import android.util.Base64
77
import java.security.MessageDigest
88

9-
actual fun getSpotifyPkceCodeChallenge(codeVerifier: String): String {
9+
public actual fun getSpotifyPkceCodeChallenge(codeVerifier: String): String {
1010
val sha256 = MessageDigest.getInstance("SHA-256").digest(codeVerifier.toByteArray())
1111
return if (VERSION.SDK_INT >= VERSION_CODES.O) {
1212
java.util.Base64.getUrlEncoder()

src/androidMain/kotlin/com/adamratzman/spotify/SpotifyLogger.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/* Spotify Web API, Kotlin Wrapper; MIT License, 2017-2020; Original author: Adam Ratzman */
22
package com.adamratzman.spotify
33

4-
actual class SpotifyLogger actual constructor(actual var enabled: Boolean) {
4+
public actual class SpotifyLogger actual constructor(public actual var enabled: Boolean) {
55
private val redString = "\u001B[31m"
66
private val orangeString = "\u001B[33m"
77
private val resetString = "\u001B[0m"
88

9-
actual fun logInfo(message: String) {
9+
public actual fun logInfo(message: String) {
1010
if (enabled) println("Spotify Logger Info: $message")
1111
}
1212

13-
actual fun logWarning(message: String) {
13+
public actual fun logWarning(message: String) {
1414
if (enabled) println("${orangeString}Spotify Logger Warning: $message$resetString")
1515
}
1616

17-
actual fun logError(fatal: Boolean, message: String?, throwable: Throwable?) {
17+
public actual fun logError(fatal: Boolean, message: String?, throwable: Throwable?) {
1818
if (!enabled) return
1919

2020
val error = StringBuilder(redString).apply {

src/androidMain/kotlin/com/adamratzman/spotify/utils/Concurrency.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import kotlinx.coroutines.delay
88
import kotlinx.coroutines.launch
99
import kotlinx.coroutines.runBlocking as kRunBlocking
1010

11-
actual inline fun <T> runBlockingMpp(crossinline coroutineCode: suspend () -> T): T = kRunBlocking {
11+
public actual inline fun <T> runBlockingMpp(crossinline coroutineCode: suspend () -> T): T = kRunBlocking {
1212
coroutineCode()
1313
}
1414

15-
actual typealias TimeUnit = java.util.concurrent.TimeUnit
15+
public actual typealias TimeUnit = java.util.concurrent.TimeUnit
1616

1717
internal actual fun CoroutineScope.schedule(
1818
quantity: Int,
@@ -28,4 +28,4 @@ internal actual fun CoroutineScope.schedule(
2828
/**
2929
* Return this [SpotifyRestAction] as a normal [CompletableFuture]
3030
*/
31-
fun <T> SpotifyRestAction<T>.asFuture(): CompletableFuture<T> = CompletableFuture.supplyAsync(::complete)
31+
public fun <T> SpotifyRestAction<T>.asFuture(): CompletableFuture<T> = CompletableFuture.supplyAsync(::complete)

src/androidMain/kotlin/com/adamratzman/spotify/utils/Misc.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import android.annotation.SuppressLint
55
import java.text.SimpleDateFormat
66
import java.util.Date
77

8-
actual fun getCurrentTimeMs(): Long = System.currentTimeMillis()
8+
public actual fun getCurrentTimeMs(): Long = System.currentTimeMillis()
99

1010
@SuppressLint("SimpleDateFormat")
1111
internal actual fun formatDate(format: String, date: Long): String {

src/androidMain/kotlin/com/adamratzman/spotify/utils/Types.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package com.adamratzman.spotify.utils
33

44
import android.graphics.Bitmap
55

6-
actual typealias ConcurrentHashMap<K, V> = java.util.concurrent.ConcurrentHashMap<K, V>
6+
public actual typealias ConcurrentHashMap<K, V> = java.util.concurrent.ConcurrentHashMap<K, V>
77

8-
actual typealias BufferedImage = Bitmap // TODO
8+
public actual typealias BufferedImage = Bitmap // TODO
99

10-
actual typealias File = java.io.File
10+
public actual typealias File = java.io.File
1111

12-
actual fun <K, V> ConcurrentHashMap<K, V>.asList(): List<Pair<K, V>> = toList()
12+
public actual fun <K, V> ConcurrentHashMap<K, V>.asList(): List<Pair<K, V>> = toList()

0 commit comments

Comments
 (0)