mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 22:56:25 +00:00
Built mkdocs | Travis Build 26
This commit is contained in:
parent
ac8152a3d4
commit
364065a50d
@ -210,6 +210,34 @@ When using ImplicitGrantAuth, another user could abuse the "localhost" RedirectU
|
|||||||
<p>This way is <strong>recommended</strong> and the only auth-process, which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application.
|
<p>This way is <strong>recommended</strong> and the only auth-process, which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application.
|
||||||
You won't be able to refresh the token. If you want to use the internal Http server, please add "http://localhost" to your application redirects.</p>
|
You won't be able to refresh the token. If you want to use the internal Http server, please add "http://localhost" to your application redirects.</p>
|
||||||
<p>More info: <a href="https://developer.spotify.com/web-api/authorization-guide/#implicit_grant_flow">here</a></p>
|
<p>More info: <a href="https://developer.spotify.com/web-api/authorization-guide/#implicit_grant_flow">here</a></p>
|
||||||
|
<p>For this kind of authentication, there is also a <code>WebAPIFactory</code>, it's easier to use and uses an async method:</p>
|
||||||
|
<pre><code>static async void Main(string[] args)
|
||||||
|
{
|
||||||
|
WebAPIFactory webApiFactory = new WebAPIFactory(
|
||||||
|
"http://localhost",
|
||||||
|
8000,
|
||||||
|
"XXXXXXXXXXXXXXXX",
|
||||||
|
Scope.UserReadPrivate,
|
||||||
|
TimeSpan.FromSeconds(20)
|
||||||
|
);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//This will open the user's browser and returns once
|
||||||
|
//the user is authorized.
|
||||||
|
_spotify = await webApiFactory.GetWebApi();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_spotify == null)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The old way:</p>
|
||||||
<pre><code>static ImplicitGrantAuth auth;
|
<pre><code>static ImplicitGrantAuth auth;
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because one or more lines are too long
30
sitemap.xml
30
sitemap.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/</loc>
|
<loc>None/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -13,79 +13,79 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/gettingstarted/</loc>
|
<loc>None/SpotifyWebAPI/gettingstarted/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/examples/</loc>
|
<loc>None/SpotifyWebAPI/examples/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/auth/</loc>
|
<loc>None/SpotifyWebAPI/auth/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/albums/</loc>
|
<loc>None/SpotifyWebAPI/albums/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/artists/</loc>
|
<loc>None/SpotifyWebAPI/artists/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/browse/</loc>
|
<loc>None/SpotifyWebAPI/browse/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/follow/</loc>
|
<loc>None/SpotifyWebAPI/follow/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/library/</loc>
|
<loc>None/SpotifyWebAPI/library/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/playlists/</loc>
|
<loc>None/SpotifyWebAPI/playlists/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/profiles/</loc>
|
<loc>None/SpotifyWebAPI/profiles/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/search/</loc>
|
<loc>None/SpotifyWebAPI/search/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/tracks/</loc>
|
<loc>None/SpotifyWebAPI/tracks/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyWebAPI/util/</loc>
|
<loc>None/SpotifyWebAPI/util/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>None/SpotifyLocalAPI/</loc>
|
<loc>None/SpotifyLocalAPI/</loc>
|
||||||
<lastmod>2016-04-04</lastmod>
|
<lastmod>2016-07-31</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user