Spotify Client
Single entry point wiring one shared HttpClient and TokenProvider into every Spotify domain API.
Each domain is exposed lazily so only the ones actually used get constructed. When no httpClient is injected, SpotifyClient builds its own client via SpotifyHttpClientFactory (configured with config) and owns it; close then releases it. An injected httpClient is assumed to be managed by the caller and is left open by close.
Use the primary constructor with a TokenProvider for custom or refreshing token sources, or the secondary constructor with a static String access token for the common case.
Constructors
Convenience constructor for a static access token. Wraps accessToken in a per-instance TokenProvider; no global state is used. For refreshing tokens, use the primary constructor with a custom TokenProvider.
Properties
Functions
Closes the underlying HttpClient, but only when SpotifyClient created and owns it.