Remove unnecessary token_info parameter for oauth2.SpotifyClientCredentials methods (#223)

This commit is contained in:
Ritiek Malhotra 2020-01-12 07:13:31 -08:00 committed by Stéphane Bruckert
parent eaca998123
commit 908a92897b

View File

@ -94,14 +94,15 @@ class SpotifyClientCredentials(object):
token_info = response.json() token_info = response.json()
return token_info return token_info
def is_token_expired(self, token_info): def is_token_expired(self):
return is_token_expired(token_info) return is_token_expired(self.token_info)
def _add_custom_values_to_token_info(self, token_info): def _add_custom_values_to_token_info(self):
""" """
Store some values that aren't directly provided by a Web API Store some values that aren't directly provided by a Web API
response. response.
""" """
token_info = self.token_info
token_info['expires_at'] = int(time.time()) + token_info['expires_in'] token_info['expires_at'] = int(time.time()) + token_info['expires_in']
return token_info return token_info