Skip to content

Commit 83fe83f

Browse files
committed
deprecate existing top-level builder methods
1 parent c8475f4 commit 83fe83f

File tree

1 file changed

+17
-0
lines changed
  • src/commonMain/kotlin/com.adamratzman.spotify

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ import kotlinx.serialization.json.Json
1717

1818
// Kotlin DSL builders
1919

20+
@Deprecated("Builder methods are now found in SpotifyBuilder", ReplaceWith("SpotifyBuilder.spotifyAppApi"))
21+
fun spotifyAppApi(clientId: String, clientSecret: String, block: SpotifyAppApiBuilder.() -> Unit = {}) =
22+
SpotifyBuilder.spotifyAppApi(clientId, clientSecret, block)
23+
24+
@Deprecated("Builder methods are now found in SpotifyBuilder", ReplaceWith("SpotifyBuilder.spotifyAppApi"))
25+
fun spotifyAppApi(block: SpotifyAppApiBuilder.() -> Unit) =
26+
SpotifyBuilder.spotifyAppApi(block)
27+
28+
@Deprecated("Builder methods are now found in SpotifyBuilder", ReplaceWith("SpotifyBuilder.spotifyClientApi"))
29+
fun spotifyAppApi(clientId: String, clientSecret: String, redirectUri: String, block: SpotifyClientApiBuilder.() -> Unit = {}) =
30+
SpotifyBuilder.spotifyClientApi(clientId, clientSecret,redirectUri, block)
31+
32+
@Deprecated("Builder methods are now found in SpotifyBuilder", ReplaceWith("SpotifyBuilder.spotifyClientApi"))
33+
fun spotifyAppApi(block: SpotifyClientApiBuilder.() -> Unit) =
34+
SpotifyBuilder.spotifyClientApi(block)
35+
36+
2037
/**
2138
* Contains static methods to instantiate [SpotifyAppApi] and [SpotifyClientApi] instances
2239
*/

0 commit comments

Comments
 (0)