Skip to content

Commit

Permalink
feat: add setToken
Browse files Browse the repository at this point in the history
  • Loading branch information
Symbitic committed Jun 29, 2021
1 parent 47fd404 commit 5016249
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/spotify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,16 @@ export class SpotifyPlayer {
return playlists;
}

/**
* Change the Spotify access token.
*
* Useful for handling refreshes.
* @param token New access token.
*/
setToken(token: string) {
this._token = token;
}

/**
* Set the current volume level
* @param volume Volume percentage from 0 to 100.
Expand Down

0 comments on commit 5016249

Please sign in to comment.