You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 12, 2021. It is now read-only.
I would like to propose some improvements to the API for initializing Spotify Users.
Currently, as of my pull request from a few days ago there are multiple ways to create an authenticated User object: User.from_code, User.from_token, and User.from_refresh_token.
There is two improvements I'd like to make. First combine the from_token and from_refresh_token methods into one, e.g. from_token_info that takes a tuple of optional parameters, access_token, expiry_time, refresh_token and then correctly instantiates and authenticates the User depending on what tokens it got.
The second improvement is the option to add a cache path to store the access and refresh tokens and later on reinitialize the User by just providing the cache path. This would make it easier to have persistent applications where one does not want to go through the oauth flow every time and does not want to bother with storing the tokens themselves.
I have the changes ready and will make a pull request soon, just wanted to open this issue to allow for discussion about the changes.
The text was updated successfully, but these errors were encountered:
@mikonse I'm working on a local v0.8.0 branch that I'll be pushing later, could you make your changes off the current master HEAD off a separate branch?
I would like to propose some improvements to the API for initializing Spotify Users.
Currently, as of my pull request from a few days ago there are multiple ways to create an authenticated User object:
User.from_code
,User.from_token
, andUser.from_refresh_token
.There is two improvements I'd like to make. First combine the
from_token
andfrom_refresh_token
methods into one, e.g.from_token_info
that takes a tuple of optional parameters, access_token, expiry_time, refresh_token and then correctly instantiates and authenticates the User depending on what tokens it got.The second improvement is the option to add a cache path to store the access and refresh tokens and later on reinitialize the User by just providing the cache path. This would make it easier to have persistent applications where one does not want to go through the oauth flow every time and does not want to bother with storing the tokens themselves.
I have the changes ready and will make a pull request soon, just wanted to open this issue to allow for discussion about the changes.
The text was updated successfully, but these errors were encountered: