mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Restore example
This commit is contained in:
parent
734c051759
commit
a2b94536bc
@ -28,12 +28,7 @@ namespace SpotifyAPI.Web.Example
|
|||||||
AuthorizationCodeAuth auth =
|
AuthorizationCodeAuth auth =
|
||||||
new AuthorizationCodeAuth(_clientId, _secretId, "http://localhost:4002", "http://localhost:4002",
|
new AuthorizationCodeAuth(_clientId, _secretId, "http://localhost:4002", "http://localhost:4002",
|
||||||
Scope.PlaylistReadPrivate | Scope.PlaylistReadCollaborative);
|
Scope.PlaylistReadPrivate | Scope.PlaylistReadCollaborative);
|
||||||
auth.AuthReceived += async (sender, payload) =>
|
auth.AuthReceived += AuthOnAuthReceived;
|
||||||
{
|
|
||||||
auth.Stop();
|
|
||||||
Token token = await auth.ExchangeCode(payload.Code);
|
|
||||||
SpotifyWebAPI api = new SpotifyWebAPI() {TokenType = token.TokenType, AccessToken = token.AccessToken};
|
|
||||||
};
|
|
||||||
auth.Start();
|
auth.Start();
|
||||||
auth.OpenBrowser();
|
auth.OpenBrowser();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user