adamint / spotify-web-api-kotlin

Spotify Web API wrapper for Kotlin, Java, JS, and Native - Targets JVM, Android, JS (browser), Native (Desktop), and Apple tvOS/iOS. Includes a Spotify Web Playback SDK wrapper for Kotlin/JS, and a spotify-auth wrapper for Kotlin/Android.
https://adamint.github.io/spotify-web-api-kotlin-docs/
MIT License
194 stars 21 forks source link

Readme code examples outdated? #301

Closed ackmanx closed 2 years ago

ackmanx commented 2 years ago

Describe the bug I'm seeing SpotifyApiOptionsBuilder in the readme, yet this doesn't appear to be a class that's available and Intellij is throwing errors if I try to reference it. Was it removed? I'm a Kotlin novice coming from the JavaScript world, so apologies if this has an obvious answer.

I'm struggling to implement authorization based on the examples provided.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

adamint commented 2 years ago

Thank you for pointing out the deficiency in this documentation - it has been updated. Indeed, SpotifyApiOptionsBuilder has been removed in favor of the SpotifyAppApiBuilder, which you can see demonstrated below! The relevant documentation is also located here:%20SpotifyAppApiBuilder). Please let me know if this does not resolve your issue.

val api = spotifyAppApi(
  "clientId",
  "clientSecret",
  token
) { 
  automaticRefresh = false 
}.build()

I apologize for the 2-week response time.