include refresh_access_token method to the library

in this way it's possible to refresh token even if it's not cached but saved somewhere else
This commit is contained in:
eugenio412 2016-04-08 17:12:31 +02:00
parent b412de8d75
commit 83e42efa88
1 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class SpotifyOAuth(object):
return None
if self._is_token_expired(token_info):
token_info = self._refresh_access_token(token_info['refresh_token'])
token_info = self.refresh_access_token(token_info['refresh_token'])
except IOError:
pass
@ -221,7 +221,7 @@ class SpotifyOAuth(object):
else:
return None
def _refresh_access_token(self, refresh_token):
def refresh_access_token(self, refresh_token):
payload = { 'refresh_token': refresh_token,
'grant_type': 'refresh_token'}