ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
632 stars 121 forks source link

AuthCodeSpotify with token and refresh #446

Closed fragsalat closed 8 months ago

fragsalat commented 9 months ago

Hey there, thanks for the nice work first of all.

Is your feature request related to a problem? Please describe. I would like to have the ability to create an instance of AuthCodeSpotify with token and client credentials passed. Right now only either is possible through ::new() or ::from_token(). I also can't create an instance and update props later on. Creating an instance with ::from_token() and passing a token which is outdated tries to call refresh_token, but the instance is missing credentials.

Describe the solution you'd like I see multiple options

  1. allow to pass token with ::new() function
  2. allow to pass credentials and oauth with ::from_token() function
  3. make http field public to use AuthCodeSpotify {} construction

Describe alternatives you've considered Forking the library and working with the fork

Additional context

ramsayleung commented 8 months ago

I think this feature request has been implemented.

fragsalat commented 8 months ago

Yes, thanks a lot :)