Merge pull request #442 from CharleyPearce/master

Made cache optional in get_access_token #441
This commit is contained in:
Stéphane Bruckert authored and GitHub committed 2020-02-15 19:42:46 +00:00
commit dcc53b983e
1 file changed
+2 -1
+2 -1
View File
@@ -329,7 +329,7 @@ class SpotifyOAuth(SpotifyAuthBase):
def get_authorization_code(self, response=None):
return self.parse_response_code(response or self.get_auth_response())
def get_access_token(self, code=None, as_dict=True):
def get_access_token(self, code=None, as_dict=True, check_cache=True):
""" Gets the access token for the app given the code
Parameters:
@@ -349,6 +349,7 @@ class SpotifyOAuth(SpotifyAuthBase):
stacklevel=2,
)
print("")
if check_cache:
token_info = self.get_cached_token()
if token_info is not None:
if is_token_expired(token_info):