diff --git a/assets/js/10.d143fded.js b/assets/js/10.002ef499.js similarity index 99% rename from assets/js/10.d143fded.js rename to assets/js/10.002ef499.js index e2a94580..274a45b8 100644 --- a/assets/js/10.d143fded.js +++ b/assets/js/10.002ef499.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{253:function(t,e,s){"use strict";s.r(e);var a=s(28),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" TokenSwapAuth")]),t._v(" "),s("p",[t._v("This way uses server-side code or at least access to an exchange server, otherwise, compared to other\nmethods, it is impossible to use.")]),t._v(" "),s("p",[t._v('With this approach, you provide the URI/URL to your desired exchange server to perform all necessary\nrequests to Spotify, as well as requests that return back to the "server URI".')]),t._v(" "),s("p",[t._v("The exchange server "),s("strong",[t._v("must")]),t._v(" be able to:")]),t._v(" "),s("ul",[s("li",[t._v('Return the authorization code from Spotify API authenticate page via GET request to the "server URI".')]),t._v(" "),s("li",[t._v("Request the token response object via POST to the Spotify API token page.")]),t._v(" "),s("li",[t._v("Request a refreshed token response object via POST to the Spotify API token page.")])]),t._v(" "),s("p",[s("strong",[t._v("The good news is that you do not need to code it yourself.")])]),t._v(" "),s("p",[t._v("The advantages of this method are that the client ID and redirect URI are very well hidden and almost unexposed, but more importantly, your client secret is "),s("strong",[t._v("never")]),t._v(" exposed and is completely hidden compared to other methods (excluding "),s("a",{attrs:{href:"/SpotifyWebAPI/auth#implicitgrantauth"}},[t._v("ImplicitGrantAuth")]),t._v("\nas it does not deal with a client secret). This means\nyour Spotify app "),s("strong",[t._v("cannot")]),t._v(" be spoofed by a malicious third party.")]),t._v(" "),s("h2",{attrs:{id:"using-tokenswapwebapifactory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapwebapifactory","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapWebAPIFactory")]),t._v(" "),s("p",[t._v("The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you.")]),t._v(" "),s("p",[t._v("It does this through the method GetWebApiAsync "),s("strong",[t._v("asynchronously")]),t._v(", which means it will not halt execution of your program while obtaining it for you. If you would like to halt execution, which is "),s("strong",[t._v("synchronous")]),t._v(", use "),s("code",[t._v("GetWebApiAsync().Result")]),t._v(" without using "),s("strong",[t._v("await")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You should store a reference to WebAPIFactory if you are using AutoRefresh or want to manually refresh it later on. New WebAPIFactory objects cannot refresh SpotifyWebAPI object that they did not give to you.")]),t._v("\nwebApiFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Scope "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AutoRefresh "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to being able to use the Spotify service.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to your user's access expiring.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetWebApiAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Synchronous way:")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// spotify = webApiFactory.GetWebApiAsync().Result;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Exception")]),t._v(" ex"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// UpdateStatus($"Spotify failed to load: {ex.Message}");')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"using-tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapAuth")]),t._v(" "),s("p",[t._v("Since the TokenSwapWebAPIFactory not only simplifies the whole process but offers additional functionality too\n(such as AutoRefresh and AuthSuccess AuthFailure events), use of this way is very verbose and is only\nrecommended if you are having issues with TokenSwapWebAPIFactory or need access to the tokens.")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n exchangeServerUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n serverUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n lastToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCodeAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n authenticated "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("OnAccessTokenExpired "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshAuthAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"token-swap-endpoint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#token-swap-endpoint","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Swap Endpoint")]),t._v(" "),s("p",[t._v("To keep your client secret completely secure and your client ID and redirect URI as secure as possible, use of a web server (such as a php website) is required.")]),t._v(" "),s("p",[t._v("To use this method, an external HTTP Server (that you may need to create) needs to be able to supply the following HTTP Endpoints to your application:")]),t._v(" "),s("p",[s("code",[t._v("/swap")]),t._v(" - Swaps out an "),s("code",[t._v("authorization_code")]),t._v(" with an "),s("code",[t._v("access_token")]),t._v(" and "),s("code",[t._v("refresh_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"authorization_code"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("code")]),t._v(" (the "),s("code",[t._v("authorization_code")]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("redirect_uri")])]),t._v(" "),s("li",[s("ul",[s("li",[s("strong",[t._v("Important")]),t._v(" The page that the redirect URI links to must return the authorization code json to your "),s("code",[t._v("serverUri")]),t._v(" (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.")])])])]),t._v(" "),s("p",[s("code",[t._v("/refresh")]),t._v(" - Refreshes an "),s("code",[t._v("access_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"refresh_token"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("refresh_token")])])]),t._v(" "),s("p",[t._v("The following open-source token swap endpoint code can be used for your website:")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://github.com/rollersteaam/spotify-token-swap-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("rollersteaam/spotify-token-swap-php"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/simontaen/SpotifyTokenSwap",target:"_blank",rel:"noopener noreferrer"}},[t._v("simontaen/SpotifyTokenSwap"),s("OutboundLink")],1)])]),t._v(" "),s("h2",{attrs:{id:"remarks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#remarks","aria-hidden":"true"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),s("p",[t._v("It should be noted that GitHub Pages does not support hosting php scripts. Hosting php scripts through it will cause the php to render as plain HTML, potentially compromising your client secret while doing absolutely nothing.")]),t._v(" "),s("p",[t._v("Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail.")]),t._v(" "),s("p",[t._v("If you did not use the WebAPIFactory or you provided a "),s("code",[t._v("serverUri")]),t._v(" different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your "),s("code",[t._v("serverUri")]),t._v(" (such as changing the areas which refer to "),s("code",[t._v("localhost:4002")]),t._v(" if you had changed "),s("code",[t._v("serverUri")]),t._v(" from its default), otherwise it will never reach your new "),s("code",[t._v("serverUri")]),t._v(".")])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{254:function(t,e,s){"use strict";s.r(e);var a=s(28),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" TokenSwapAuth")]),t._v(" "),s("p",[t._v("This way uses server-side code or at least access to an exchange server, otherwise, compared to other\nmethods, it is impossible to use.")]),t._v(" "),s("p",[t._v('With this approach, you provide the URI/URL to your desired exchange server to perform all necessary\nrequests to Spotify, as well as requests that return back to the "server URI".')]),t._v(" "),s("p",[t._v("The exchange server "),s("strong",[t._v("must")]),t._v(" be able to:")]),t._v(" "),s("ul",[s("li",[t._v('Return the authorization code from Spotify API authenticate page via GET request to the "server URI".')]),t._v(" "),s("li",[t._v("Request the token response object via POST to the Spotify API token page.")]),t._v(" "),s("li",[t._v("Request a refreshed token response object via POST to the Spotify API token page.")])]),t._v(" "),s("p",[s("strong",[t._v("The good news is that you do not need to code it yourself.")])]),t._v(" "),s("p",[t._v("The advantages of this method are that the client ID and redirect URI are very well hidden and almost unexposed, but more importantly, your client secret is "),s("strong",[t._v("never")]),t._v(" exposed and is completely hidden compared to other methods (excluding "),s("a",{attrs:{href:"/SpotifyWebAPI/auth#implicitgrantauth"}},[t._v("ImplicitGrantAuth")]),t._v("\nas it does not deal with a client secret). This means\nyour Spotify app "),s("strong",[t._v("cannot")]),t._v(" be spoofed by a malicious third party.")]),t._v(" "),s("h2",{attrs:{id:"using-tokenswapwebapifactory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapwebapifactory","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapWebAPIFactory")]),t._v(" "),s("p",[t._v("The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you.")]),t._v(" "),s("p",[t._v("It does this through the method GetWebApiAsync "),s("strong",[t._v("asynchronously")]),t._v(", which means it will not halt execution of your program while obtaining it for you. If you would like to halt execution, which is "),s("strong",[t._v("synchronous")]),t._v(", use "),s("code",[t._v("GetWebApiAsync().Result")]),t._v(" without using "),s("strong",[t._v("await")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You should store a reference to WebAPIFactory if you are using AutoRefresh or want to manually refresh it later on. New WebAPIFactory objects cannot refresh SpotifyWebAPI object that they did not give to you.")]),t._v("\nwebApiFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Scope "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AutoRefresh "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to being able to use the Spotify service.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to your user's access expiring.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetWebApiAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Synchronous way:")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// spotify = webApiFactory.GetWebApiAsync().Result;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Exception")]),t._v(" ex"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// UpdateStatus($"Spotify failed to load: {ex.Message}");')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"using-tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapAuth")]),t._v(" "),s("p",[t._v("Since the TokenSwapWebAPIFactory not only simplifies the whole process but offers additional functionality too\n(such as AutoRefresh and AuthSuccess AuthFailure events), use of this way is very verbose and is only\nrecommended if you are having issues with TokenSwapWebAPIFactory or need access to the tokens.")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n exchangeServerUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n serverUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n lastToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCodeAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n authenticated "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("OnAccessTokenExpired "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshAuthAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"token-swap-endpoint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#token-swap-endpoint","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Swap Endpoint")]),t._v(" "),s("p",[t._v("To keep your client secret completely secure and your client ID and redirect URI as secure as possible, use of a web server (such as a php website) is required.")]),t._v(" "),s("p",[t._v("To use this method, an external HTTP Server (that you may need to create) needs to be able to supply the following HTTP Endpoints to your application:")]),t._v(" "),s("p",[s("code",[t._v("/swap")]),t._v(" - Swaps out an "),s("code",[t._v("authorization_code")]),t._v(" with an "),s("code",[t._v("access_token")]),t._v(" and "),s("code",[t._v("refresh_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"authorization_code"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("code")]),t._v(" (the "),s("code",[t._v("authorization_code")]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("redirect_uri")])]),t._v(" "),s("li",[s("ul",[s("li",[s("strong",[t._v("Important")]),t._v(" The page that the redirect URI links to must return the authorization code json to your "),s("code",[t._v("serverUri")]),t._v(" (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.")])])])]),t._v(" "),s("p",[s("code",[t._v("/refresh")]),t._v(" - Refreshes an "),s("code",[t._v("access_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"refresh_token"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("refresh_token")])])]),t._v(" "),s("p",[t._v("The following open-source token swap endpoint code can be used for your website:")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://github.com/rollersteaam/spotify-token-swap-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("rollersteaam/spotify-token-swap-php"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/simontaen/SpotifyTokenSwap",target:"_blank",rel:"noopener noreferrer"}},[t._v("simontaen/SpotifyTokenSwap"),s("OutboundLink")],1)])]),t._v(" "),s("h2",{attrs:{id:"remarks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#remarks","aria-hidden":"true"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),s("p",[t._v("It should be noted that GitHub Pages does not support hosting php scripts. Hosting php scripts through it will cause the php to render as plain HTML, potentially compromising your client secret while doing absolutely nothing.")]),t._v(" "),s("p",[t._v("Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail.")]),t._v(" "),s("p",[t._v("If you did not use the WebAPIFactory or you provided a "),s("code",[t._v("serverUri")]),t._v(" different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your "),s("code",[t._v("serverUri")]),t._v(" (such as changing the areas which refer to "),s("code",[t._v("localhost:4002")]),t._v(" if you had changed "),s("code",[t._v("serverUri")]),t._v(" from its default), otherwise it will never reach your new "),s("code",[t._v("serverUri")]),t._v(".")])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.095c5b4a.js b/assets/js/12.db52d3ac.js similarity index 99% rename from assets/js/12.095c5b4a.js rename to assets/js/12.db52d3ac.js index 3c053cd7..9e2baaa2 100644 --- a/assets/js/12.095c5b4a.js +++ b/assets/js/12.db52d3ac.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{257:function(t,s,a){"use strict";a.r(s);var e=a(28),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"artists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#artists","aria-hidden":"true"}},[t._v("#")]),t._v(" Artists")]),t._v(" "),a("h2",{attrs:{id:"getartist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartist","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtist")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for a single artist identified by their unique Spotify ID.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullArtist")]),t._v(" artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getrelatedartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getrelatedartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetRelatedArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetRelatedArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartiststoptracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartiststoptracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsTopTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's top tracks by country.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("country")]),t._v(" "),a("td",[t._v("The country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralTracks")]),t._v(" object which contains the property "),a("code",[t._v("List Tracks")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" tracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsTopTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DE"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Count"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many tracks did we get?")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartistsalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartistsalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("[type]")]),t._v(" "),a("td",[t._v("A list of keywords that will be used to filter the response. If not supplied, all album types will be returned")]),t._v(" "),a("td",[a("code",[t._v("AlbumType.All")])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first album to return. Default: 0")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#album-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimpleAlbum"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimpleAlbum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" albums "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" AlbumType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("All"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nalbums"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getseveralartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getseveralartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for several artists based on their Spotify IDs.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs for the artists. Maximum: 50 IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List() { "1KpCi9BOfviCVhmpI4G2sY" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nartists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{256:function(t,s,a){"use strict";a.r(s);var e=a(28),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"artists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#artists","aria-hidden":"true"}},[t._v("#")]),t._v(" Artists")]),t._v(" "),a("h2",{attrs:{id:"getartist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartist","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtist")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for a single artist identified by their unique Spotify ID.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullArtist")]),t._v(" artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getrelatedartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getrelatedartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetRelatedArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetRelatedArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartiststoptracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartiststoptracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsTopTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's top tracks by country.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("country")]),t._v(" "),a("td",[t._v("The country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralTracks")]),t._v(" object which contains the property "),a("code",[t._v("List Tracks")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" tracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsTopTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DE"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Count"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many tracks did we get?")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartistsalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartistsalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("[type]")]),t._v(" "),a("td",[t._v("A list of keywords that will be used to filter the response. If not supplied, all album types will be returned")]),t._v(" "),a("td",[a("code",[t._v("AlbumType.All")])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first album to return. Default: 0")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#album-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimpleAlbum"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimpleAlbum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" albums "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" AlbumType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("All"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nalbums"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getseveralartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getseveralartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for several artists based on their Spotify IDs.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs for the artists. Maximum: 50 IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List() { "1KpCi9BOfviCVhmpI4G2sY" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nartists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/13.eace26d0.js b/assets/js/13.8b5c9b44.js similarity index 99% rename from assets/js/13.eace26d0.js rename to assets/js/13.8b5c9b44.js index 728f19a2..dba34385 100644 --- a/assets/js/13.eace26d0.js +++ b/assets/js/13.8b5c9b44.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{258:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"browse"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browse","aria-hidden":"true"}},[t._v("#")]),t._v(" Browse")]),t._v(" "),s("h2",{attrs:{id:"getfeaturedplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getfeaturedplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetFeaturedPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore.")]),t._v(" "),s("td",[s("code",[t._v('"de_DE" //Germany')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[timestamp]")]),t._v(" "),s("td",[t._v("A timestamp in ISO 8601 format")]),t._v(" "),s("td",[s("code",[t._v("DateTime.Now")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("FeaturedPlaylists")]),t._v(" object, which has 2 properties. "),s("code",[t._v("String Message")]),t._v(" and "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FeaturedPlaylists")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetFeaturedPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Message"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getnewalbumreleases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getnewalbumreleases","aria-hidden":"true"}},[t._v("#")]),t._v(" GetNewAlbumReleases")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("NewAlbumReleases")]),t._v(" object, which has the property "),s("code",[t._v("Paging Albums")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewAlbumReleases")]),t._v(" newAlbums "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetNewAlbumReleases")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nnewAlbums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategories"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategories","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategories")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0 (the first object).")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryList")]),t._v(" object, which has the property "),s("code",[t._v("Paging Categories")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryList")]),t._v(" categoryList "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategories")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ncategoryList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Categories"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategory","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategory")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#category-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Category"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Category")]),t._v(" cat "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cat"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategoryplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategoryplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategoryPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify playlists tagged with a particular category.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryPlaylist")]),t._v(" object, which has the property "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryPlaylist")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategoryPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr")])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{257:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"browse"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browse","aria-hidden":"true"}},[t._v("#")]),t._v(" Browse")]),t._v(" "),s("h2",{attrs:{id:"getfeaturedplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getfeaturedplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetFeaturedPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore.")]),t._v(" "),s("td",[s("code",[t._v('"de_DE" //Germany')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[timestamp]")]),t._v(" "),s("td",[t._v("A timestamp in ISO 8601 format")]),t._v(" "),s("td",[s("code",[t._v("DateTime.Now")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("FeaturedPlaylists")]),t._v(" object, which has 2 properties. "),s("code",[t._v("String Message")]),t._v(" and "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FeaturedPlaylists")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetFeaturedPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Message"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getnewalbumreleases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getnewalbumreleases","aria-hidden":"true"}},[t._v("#")]),t._v(" GetNewAlbumReleases")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("NewAlbumReleases")]),t._v(" object, which has the property "),s("code",[t._v("Paging Albums")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewAlbumReleases")]),t._v(" newAlbums "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetNewAlbumReleases")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nnewAlbums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategories"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategories","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategories")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0 (the first object).")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryList")]),t._v(" object, which has the property "),s("code",[t._v("Paging Categories")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryList")]),t._v(" categoryList "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategories")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ncategoryList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Categories"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategory","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategory")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#category-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Category"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Category")]),t._v(" cat "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cat"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategoryplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategoryplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategoryPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify playlists tagged with a particular category.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryPlaylist")]),t._v(" object, which has the property "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryPlaylist")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategoryPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr")])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/14.9f7c9e7a.js b/assets/js/14.c0f35def.js similarity index 88% rename from assets/js/14.9f7c9e7a.js rename to assets/js/14.c0f35def.js index b0f95ae4..3ecf437e 100644 --- a/assets/js/14.9f7c9e7a.js +++ b/assets/js/14.c0f35def.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{256:function(e,t,s){"use strict";s.r(t);var a=s(28),r=Object(a.a)({},function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples","aria-hidden":"true"}},[this._v("#")]),this._v(" Examples")]),this._v(" "),t("p",[this._v("This page is currently empty. Do you have useful examples? Please open a PR")])])},[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{258:function(e,t,s){"use strict";s.r(t);var a=s(28),r=Object(a.a)({},function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples","aria-hidden":"true"}},[this._v("#")]),this._v(" Examples")]),this._v(" "),t("p",[this._v("This page is currently empty. Do you have useful examples? Please open a PR")])])},[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/23.25597ba8.js b/assets/js/23.e0985451.js similarity index 98% rename from assets/js/23.25597ba8.js rename to assets/js/23.e0985451.js index c847091c..3a1a5508 100644 --- a/assets/js/23.25597ba8.js +++ b/assets/js/23.e0985451.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{267:function(t,a,s){"use strict";s.r(a);var e=s(28),r=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"search"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#search","aria-hidden":"true"}},[t._v("#")]),t._v(" Search")]),t._v(" "),s("h2",{attrs:{id:"searchitems"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitems","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItems")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("You may want to use "),s("code",[t._v("SearchItemsEscaped")]),t._v(" if you're processing user-input without validation")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("q")]),t._v(" "),s("td",[t._v("The search query's keywords (and optional field filters and operators), for example q=roadhouse+blues.")]),t._v(" "),s("td",[s("code",[t._v('"roadhouse+blues"')])])]),t._v(" "),s("tr",[s("td",[t._v("type")]),t._v(" "),s("td",[t._v("A list of item types to search across.")]),t._v(" "),s("td",[s("code",[t._v("SearchType.Album")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first result to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code or the string from_token.")]),t._v(" "),s("td",[s("code",[t._v('"de"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SearchItem")]),t._v(" which contains the properties "),s("code",[t._v("Paging Artists")]),t._v(","),s("code",[t._v("Paging Tracks")]),t._v(", "),s("code",[t._v("Paging Albums")]),t._v(", "),s("code",[t._v("Paging Playlists")]),t._v(". They are filled based on your search-type.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SearchItem")]),t._v(" item "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("SearchItems")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"roadhouse+blues"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("item"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Total"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many results are there in total? NOTE: item.Tracks = item.Artists = null")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"searchitemsescaped"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitemsescaped","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItemsEscaped")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("p",[t._v("Works like "),s("code",[t._v("SearchItems")]),t._v(", but URL escapes all characters")])])},[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{266:function(t,a,s){"use strict";s.r(a);var e=s(28),r=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"search"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#search","aria-hidden":"true"}},[t._v("#")]),t._v(" Search")]),t._v(" "),s("h2",{attrs:{id:"searchitems"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitems","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItems")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("You may want to use "),s("code",[t._v("SearchItemsEscaped")]),t._v(" if you're processing user-input without validation")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("q")]),t._v(" "),s("td",[t._v("The search query's keywords (and optional field filters and operators), for example q=roadhouse+blues.")]),t._v(" "),s("td",[s("code",[t._v('"roadhouse+blues"')])])]),t._v(" "),s("tr",[s("td",[t._v("type")]),t._v(" "),s("td",[t._v("A list of item types to search across.")]),t._v(" "),s("td",[s("code",[t._v("SearchType.Album")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first result to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code or the string from_token.")]),t._v(" "),s("td",[s("code",[t._v('"de"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SearchItem")]),t._v(" which contains the properties "),s("code",[t._v("Paging Artists")]),t._v(","),s("code",[t._v("Paging Tracks")]),t._v(", "),s("code",[t._v("Paging Albums")]),t._v(", "),s("code",[t._v("Paging Playlists")]),t._v(". They are filled based on your search-type.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SearchItem")]),t._v(" item "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("SearchItems")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"roadhouse+blues"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("item"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Total"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many results are there in total? NOTE: item.Tracks = item.Artists = null")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"searchitemsescaped"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitemsescaped","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItemsEscaped")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("p",[t._v("Works like "),s("code",[t._v("SearchItems")]),t._v(", but URL escapes all characters")])])},[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/24.4b98f02a.js b/assets/js/24.a9466c6a.js similarity index 99% rename from assets/js/24.4b98f02a.js rename to assets/js/24.a9466c6a.js index e8b2f38b..4051e237 100644 --- a/assets/js/24.4b98f02a.js +++ b/assets/js/24.a9466c6a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{266:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tracks","aria-hidden":"true"}},[t._v("#")]),t._v(" Tracks")]),t._v(" "),s("h2",{attrs:{id:"getseveraltracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getseveraltracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralTracks")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for multiple tracks based on their Spotify IDs.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("ids")]),t._v(" "),s("td",[t._v("A list of the Spotify IDs for the tracks. Maximum: 50 IDs.")]),t._v(" "),s("td",[s("code",[t._v('new List {"6Y1CLPwYe7zvI8PJiWVz6T"}')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SeveralTracks")]),t._v(" object which has one property, "),s("code",[t._v("List Tracks")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" severalTracks "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralTracks")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("String"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nseveralTracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"gettrack"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#gettrack","aria-hidden":"true"}},[t._v("#")]),t._v(" GetTrack")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullTrack")]),t._v(" track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetTrack")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getaudioanalysis"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getaudioanalysis","aria-hidden":"true"}},[t._v("#")]),t._v(" GetAudioAnalysis")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a detailed audio analysis for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])])])]),t._v(" "),s("p",[t._v("Returns a AudioAnalysis. This object is currently lacking Spotify documentation but archived "),s("a",{attrs:{href:"https://web.archive.org/web/20160528174915/http://developer.echonest.com/docs/v4/_static/AnalyzeDocumentation.pdf",target:"_blank",rel:"noopener noreferrer"}},[t._v("EchoNest documentation"),s("OutboundLink")],1),t._v(" is relevant.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AudioAnalysis")]),t._v(" analysis "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetAudioAnalysis")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("analysis"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Meta"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DetailedStatus"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{267:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tracks","aria-hidden":"true"}},[t._v("#")]),t._v(" Tracks")]),t._v(" "),s("h2",{attrs:{id:"getseveraltracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getseveraltracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralTracks")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for multiple tracks based on their Spotify IDs.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("ids")]),t._v(" "),s("td",[t._v("A list of the Spotify IDs for the tracks. Maximum: 50 IDs.")]),t._v(" "),s("td",[s("code",[t._v('new List {"6Y1CLPwYe7zvI8PJiWVz6T"}')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SeveralTracks")]),t._v(" object which has one property, "),s("code",[t._v("List Tracks")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" severalTracks "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralTracks")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("String"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nseveralTracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"gettrack"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#gettrack","aria-hidden":"true"}},[t._v("#")]),t._v(" GetTrack")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullTrack")]),t._v(" track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetTrack")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getaudioanalysis"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getaudioanalysis","aria-hidden":"true"}},[t._v("#")]),t._v(" GetAudioAnalysis")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a detailed audio analysis for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])])])]),t._v(" "),s("p",[t._v("Returns a AudioAnalysis. This object is currently lacking Spotify documentation but archived "),s("a",{attrs:{href:"https://web.archive.org/web/20160528174915/http://developer.echonest.com/docs/v4/_static/AnalyzeDocumentation.pdf",target:"_blank",rel:"noopener noreferrer"}},[t._v("EchoNest documentation"),s("OutboundLink")],1),t._v(" is relevant.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AudioAnalysis")]),t._v(" analysis "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetAudioAnalysis")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("analysis"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Meta"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DetailedStatus"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/5.5e7da9b2.js b/assets/js/5.14f2fea3.js similarity index 99% rename from assets/js/5.5e7da9b2.js rename to assets/js/5.14f2fea3.js index 0702bf0d..8b674cff 100644 --- a/assets/js/5.5e7da9b2.js +++ b/assets/js/5.14f2fea3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{250:function(t,e,r){"use strict";r.r(e);var a=r(28),o=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"spotifyapi-net-docs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotifyapi-net-docs","aria-hidden":"true"}},[t._v("#")]),t._v(" SpotifyAPI-NET Docs")]),t._v(" "),r("h2",{attrs:{id:"about"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#about","aria-hidden":"true"}},[t._v("#")]),t._v(" About")]),t._v(" "),r("p",[t._v("This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API")]),t._v(" "),r("p",[r("strong",[t._v("Spotify's Web API")]),t._v(" ("),r("a",{attrs:{href:"https://developer.spotify.com/web-api/",target:"_blank",rel:"noopener noreferrer"}},[t._v("link"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("blockquote",[r("p",[t._v("Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue.\nThe API also provides access to user-related data such as playlists and music saved in a “Your Music” library, subject to user’s authorization.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web")])]),t._v(" "),r("blockquote",[r("p",[t._v("A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web.Auth")])]),t._v(" "),r("blockquote",[r("p",[t._v("A library providing C# implementations of the 3 supported Authentication modes, including "),r("code",[t._v("ImplicitGrantAuth")]),t._v(", "),r("code",[t._v("AuthorizationCodeAuth")]),t._v(" and "),r("code",[t._v("CredentialsAuth")])])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"installing"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#installing","aria-hidden":"true"}},[t._v("#")]),t._v(" Installing")]),t._v(" "),r("ul",[r("li",[t._v("Via NuGet Package:")])]),t._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[t._v("Install-Package SpotifyAPI.Web\nInstall-Package SpotifyAPI.Web.Auth\n")])])]),r("ul",[r("li",[t._v("Download the latest binaries on the "),r("a",{attrs:{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub Release Page"),r("OutboundLink")],1),t._v(" and add it to your Project")]),t._v(" "),r("li",[t._v("Clone the Repo and build the project yourself.")])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"getting-started"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/web/getting_started/"}},[t._v("SpotifyAPI.Web")])],1),t._v(" "),r("li",[r("RouterLink",{attrs:{to:"/auth/getting_started/"}},[t._v("SpotifyAPI.Web.Auth")])],1)]),t._v(" "),r("h2",{attrs:{id:"projects"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#projects","aria-hidden":"true"}},[t._v("#")]),t._v(" Projects")]),t._v(" "),r("h3",{attrs:{id:"lidarr-by-lidarr"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#lidarr-by-lidarr","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/lidarr/Lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("lidarr"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("@lidarr"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Looks and smells like Sonarr but made for music.")])]),t._v(" "),r("h3",{attrs:{id:"botframework-solutions-by-microsoft"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#botframework-solutions-by-microsoft","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/microsoft/botframework-solutions",target:"_blank",rel:"noopener noreferrer"}},[t._v("botframework-solutions"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/microsoft",target:"_blank",rel:"noopener noreferrer"}},[t._v("@microsoft"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework")])]),t._v(" "),r("h3",{attrs:{id:"spytify-by-jwallet"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spytify-by-jwallet","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/jwallet/spy-spotify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spytify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/jwallet",target:"_blank",rel:"noopener noreferrer"}},[t._v("@jwallet"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files")])]),t._v(" "),r("h3",{attrs:{id:"audio-band-by-dsafa"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#audio-band-by-dsafa","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/dsafa/audio-band",target:"_blank",rel:"noopener noreferrer"}},[t._v("audio-band"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/dsafa",target:"_blank",rel:"noopener noreferrer"}},[t._v("@dsafa"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Display and control songs from the Windows taskbar")])]),t._v(" "),r("h3",{attrs:{id:"rocksmith-custom-song-toolkit-by-catara"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rocksmith-custom-song-toolkit-by-catara","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/catara/rocksmith-custom-song-toolkit",target:"_blank",rel:"noopener noreferrer"}},[t._v("rocksmith-custom-song-toolkit"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/catara",target:"_blank",rel:"noopener noreferrer"}},[t._v("@catara"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("MASS Manipulation of Rocksmith DLC Library")])]),t._v(" "),r("h3",{attrs:{id:"spofy-by-eltoncezar"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spofy-by-eltoncezar","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/eltoncezar/Spofy",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spofy"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/eltoncezar",target:"_blank",rel:"noopener noreferrer"}},[t._v("@eltoncezar"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A Spotify mini player and notifier for Windows")])]),t._v(" "),r("h3",{attrs:{id:"toastify-by-aleab"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#toastify-by-aleab","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/aleab/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Toastify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/aleab",target:"_blank",rel:"noopener noreferrer"}},[t._v("@aleab"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Toastify adds global hotkeys and toast notifications to Spotify")]),t._v(" "),r("p",[r("em",[t._v("Forked from "),r("a",{attrs:{href:"https://github.com/nachmore/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("nachmore/toastify"),r("OutboundLink")],1)])])]),t._v(" "),r("h3",{attrs:{id:"spotify-oculus-by-captainmorgs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotify-oculus-by-captainmorgs","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/CaptainMorgs/spotify-oculus-release",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spotify Oculus"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/CaptainMorgs",target:"_blank",rel:"noopener noreferrer"}},[t._v("@CaptainMorgs"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Unity project for interacting with Spotify in virtual reality for the Oculus Rift.")])]),t._v(" "),r("h3",{attrs:{id:"songify-by-inzaniity"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#songify-by-inzaniity","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/Inzaniity/Songify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Songify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/Inzaniity",target:"_blank",rel:"noopener noreferrer"}},[t._v("@Inzaniity"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A simple tool that gets the current track from Spotify, YouTube and Nightbot.")])]),t._v(" "),r("h3",{attrs:{id:"elite-g19s-companion-app-by-magicmau"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#elite-g19s-companion-app-by-magicmau","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://forums.frontier.co.uk/threads/elite-g19s-companion-app-with-simulated-space-traffic-control.226782/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Elite G19s Companion app"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/MagicMau",target:"_blank",rel:"noopener noreferrer"}},[t._v("@MagicMau"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.")])]),t._v(" "),r("h3",{attrs:{id:"arduino-spotify-remote-control-by-nader11ndeu"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#arduino-spotify-remote-control-by-nader11ndeu","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/NADER11NDEU/ARDUINO-Spotify-Remote-Control",target:"_blank",rel:"noopener noreferrer"}},[t._v("ARDUINO-Spotify-Remote-Control"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/NADER11NDEU",target:"_blank",rel:"noopener noreferrer"}},[t._v("@NADER11NDEU"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.")])])])},[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{249:function(t,e,r){"use strict";r.r(e);var a=r(28),o=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"spotifyapi-net-docs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotifyapi-net-docs","aria-hidden":"true"}},[t._v("#")]),t._v(" SpotifyAPI-NET Docs")]),t._v(" "),r("h2",{attrs:{id:"about"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#about","aria-hidden":"true"}},[t._v("#")]),t._v(" About")]),t._v(" "),r("p",[t._v("This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API")]),t._v(" "),r("p",[r("strong",[t._v("Spotify's Web API")]),t._v(" ("),r("a",{attrs:{href:"https://developer.spotify.com/web-api/",target:"_blank",rel:"noopener noreferrer"}},[t._v("link"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("blockquote",[r("p",[t._v("Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue.\nThe API also provides access to user-related data such as playlists and music saved in a “Your Music” library, subject to user’s authorization.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web")])]),t._v(" "),r("blockquote",[r("p",[t._v("A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web.Auth")])]),t._v(" "),r("blockquote",[r("p",[t._v("A library providing C# implementations of the 3 supported Authentication modes, including "),r("code",[t._v("ImplicitGrantAuth")]),t._v(", "),r("code",[t._v("AuthorizationCodeAuth")]),t._v(" and "),r("code",[t._v("CredentialsAuth")])])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"installing"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#installing","aria-hidden":"true"}},[t._v("#")]),t._v(" Installing")]),t._v(" "),r("ul",[r("li",[t._v("Via NuGet Package:")])]),t._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[t._v("Install-Package SpotifyAPI.Web\nInstall-Package SpotifyAPI.Web.Auth\n")])])]),r("ul",[r("li",[t._v("Download the latest binaries on the "),r("a",{attrs:{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub Release Page"),r("OutboundLink")],1),t._v(" and add it to your Project")]),t._v(" "),r("li",[t._v("Clone the Repo and build the project yourself.")])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"getting-started"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/web/getting_started/"}},[t._v("SpotifyAPI.Web")])],1),t._v(" "),r("li",[r("RouterLink",{attrs:{to:"/auth/getting_started/"}},[t._v("SpotifyAPI.Web.Auth")])],1)]),t._v(" "),r("h2",{attrs:{id:"projects"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#projects","aria-hidden":"true"}},[t._v("#")]),t._v(" Projects")]),t._v(" "),r("h3",{attrs:{id:"lidarr-by-lidarr"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#lidarr-by-lidarr","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/lidarr/Lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("lidarr"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("@lidarr"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Looks and smells like Sonarr but made for music.")])]),t._v(" "),r("h3",{attrs:{id:"botframework-solutions-by-microsoft"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#botframework-solutions-by-microsoft","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/microsoft/botframework-solutions",target:"_blank",rel:"noopener noreferrer"}},[t._v("botframework-solutions"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/microsoft",target:"_blank",rel:"noopener noreferrer"}},[t._v("@microsoft"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework")])]),t._v(" "),r("h3",{attrs:{id:"spytify-by-jwallet"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spytify-by-jwallet","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/jwallet/spy-spotify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spytify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/jwallet",target:"_blank",rel:"noopener noreferrer"}},[t._v("@jwallet"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files")])]),t._v(" "),r("h3",{attrs:{id:"audio-band-by-dsafa"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#audio-band-by-dsafa","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/dsafa/audio-band",target:"_blank",rel:"noopener noreferrer"}},[t._v("audio-band"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/dsafa",target:"_blank",rel:"noopener noreferrer"}},[t._v("@dsafa"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Display and control songs from the Windows taskbar")])]),t._v(" "),r("h3",{attrs:{id:"rocksmith-custom-song-toolkit-by-catara"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rocksmith-custom-song-toolkit-by-catara","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/catara/rocksmith-custom-song-toolkit",target:"_blank",rel:"noopener noreferrer"}},[t._v("rocksmith-custom-song-toolkit"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/catara",target:"_blank",rel:"noopener noreferrer"}},[t._v("@catara"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("MASS Manipulation of Rocksmith DLC Library")])]),t._v(" "),r("h3",{attrs:{id:"spofy-by-eltoncezar"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spofy-by-eltoncezar","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/eltoncezar/Spofy",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spofy"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/eltoncezar",target:"_blank",rel:"noopener noreferrer"}},[t._v("@eltoncezar"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A Spotify mini player and notifier for Windows")])]),t._v(" "),r("h3",{attrs:{id:"toastify-by-aleab"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#toastify-by-aleab","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/aleab/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Toastify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/aleab",target:"_blank",rel:"noopener noreferrer"}},[t._v("@aleab"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Toastify adds global hotkeys and toast notifications to Spotify")]),t._v(" "),r("p",[r("em",[t._v("Forked from "),r("a",{attrs:{href:"https://github.com/nachmore/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("nachmore/toastify"),r("OutboundLink")],1)])])]),t._v(" "),r("h3",{attrs:{id:"spotify-oculus-by-captainmorgs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotify-oculus-by-captainmorgs","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/CaptainMorgs/spotify-oculus-release",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spotify Oculus"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/CaptainMorgs",target:"_blank",rel:"noopener noreferrer"}},[t._v("@CaptainMorgs"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Unity project for interacting with Spotify in virtual reality for the Oculus Rift.")])]),t._v(" "),r("h3",{attrs:{id:"songify-by-inzaniity"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#songify-by-inzaniity","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/Inzaniity/Songify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Songify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/Inzaniity",target:"_blank",rel:"noopener noreferrer"}},[t._v("@Inzaniity"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A simple tool that gets the current track from Spotify, YouTube and Nightbot.")])]),t._v(" "),r("h3",{attrs:{id:"elite-g19s-companion-app-by-magicmau"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#elite-g19s-companion-app-by-magicmau","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://forums.frontier.co.uk/threads/elite-g19s-companion-app-with-simulated-space-traffic-control.226782/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Elite G19s Companion app"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/MagicMau",target:"_blank",rel:"noopener noreferrer"}},[t._v("@MagicMau"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.")])]),t._v(" "),r("h3",{attrs:{id:"arduino-spotify-remote-control-by-nader11ndeu"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#arduino-spotify-remote-control-by-nader11ndeu","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/NADER11NDEU/ARDUINO-Spotify-Remote-Control",target:"_blank",rel:"noopener noreferrer"}},[t._v("ARDUINO-Spotify-Remote-Control"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/NADER11NDEU",target:"_blank",rel:"noopener noreferrer"}},[t._v("@NADER11NDEU"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.")])])])},[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/6.889e07ae.js b/assets/js/6.66d7c2fe.js similarity index 99% rename from assets/js/6.889e07ae.js rename to assets/js/6.66d7c2fe.js index b22f612a..469ac2b9 100644 --- a/assets/js/6.889e07ae.js +++ b/assets/js/6.66d7c2fe.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{249:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"autorizationcodeauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#autorizationcodeauth","aria-hidden":"true"}},[t._v("#")]),t._v(" AutorizationCodeAuth")]),t._v(" "),a("p",[t._v("This way is "),a("strong",[t._v("not recommended")]),t._v(" for client-side apps and requires server-side code to run securely.\nWith this approach, you first get a code which you need to trade against the access-token.\nIn this exchange you need to provide your Client-Secret and because of that it's not recommended.\nA good thing about this method: You can always refresh your token, without having the user to auth it again.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadCollaborative\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCode")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"token-refresh"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#token-refresh","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Refresh")]),t._v(" "),a("p",[t._v("Once the "),a("code",[t._v("AccessToken")]),t._v(" is expired, you can use your "),a("code",[t._v("RefreshToken")]),t._v(" to get a new one.\nIn this procedure, no HTTP Server is needed in the background and a single HTTP Request is made.")]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Auth code from above")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("IsExpired")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" newToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AccessToken")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{250:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"autorizationcodeauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#autorizationcodeauth","aria-hidden":"true"}},[t._v("#")]),t._v(" AutorizationCodeAuth")]),t._v(" "),a("p",[t._v("This way is "),a("strong",[t._v("not recommended")]),t._v(" for client-side apps and requires server-side code to run securely.\nWith this approach, you first get a code which you need to trade against the access-token.\nIn this exchange you need to provide your Client-Secret and because of that it's not recommended.\nA good thing about this method: You can always refresh your token, without having the user to auth it again.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadCollaborative\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCode")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"token-refresh"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#token-refresh","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Refresh")]),t._v(" "),a("p",[t._v("Once the "),a("code",[t._v("AccessToken")]),t._v(" is expired, you can use your "),a("code",[t._v("RefreshToken")]),t._v(" to get a new one.\nIn this procedure, no HTTP Server is needed in the background and a single HTTP Request is made.")]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Auth code from above")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("IsExpired")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" newToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AccessToken")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/7.404dc03e.js b/assets/js/7.830f290b.js similarity index 98% rename from assets/js/7.404dc03e.js rename to assets/js/7.830f290b.js index 6fb11b54..82dd760f 100644 --- a/assets/js/7.404dc03e.js +++ b/assets/js/7.830f290b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{252:function(t,e,a){"use strict";a.r(e);var s=a(28),n=Object(s.a)({},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"clientcredentialsauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#clientcredentialsauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ClientCredentialsAuth")]),t._v(" "),a("p",[t._v("With this approach, you make a POST Request with a base64 encoded string (consists of ClientId + ClientSecret). You will directly get the token (Without a local HTTP Server), but it will expire and can't be refreshed.\nIf you want to use it securely, you would need to do it all server-side.\n"),a("strong",[t._v("NOTE:")]),t._v(" You will only be able to query non-user-related information e.g search for a Track.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{251:function(t,e,a){"use strict";a.r(e);var s=a(28),n=Object(s.a)({},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"clientcredentialsauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#clientcredentialsauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ClientCredentialsAuth")]),t._v(" "),a("p",[t._v("With this approach, you make a POST Request with a base64 encoded string (consists of ClientId + ClientSecret). You will directly get the token (Without a local HTTP Server), but it will expire and can't be refreshed.\nIf you want to use it securely, you would need to do it all server-side.\n"),a("strong",[t._v("NOTE:")]),t._v(" You will only be able to query non-user-related information e.g search for a Track.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/8.51234724.js b/assets/js/8.9cb2269f.js similarity index 97% rename from assets/js/8.51234724.js rename to assets/js/8.9cb2269f.js index 740958e5..ae45aaa4 100644 --- a/assets/js/8.51234724.js +++ b/assets/js/8.9cb2269f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{251:function(t,e,o){"use strict";o.r(e);var r=o(28),i=Object(r.a)({},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),o("h2",{attrs:{id:"auth-methods"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#auth-methods","aria-hidden":"true"}},[t._v("#")]),t._v(" Auth-Methods")]),t._v(" "),o("p",[t._v("Before you can use the Web API's full functionality, you need the user to authenticate your Application.\nIf you want to know more, you can read to the whole auth-process "),o("a",{attrs:{href:"https://developer.spotify.com/web-api/authorization-guide/",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("Before you start, install "),o("code",[t._v("SpotifyAPI.Web.Auth")]),t._v(" and create an application at Spotify: "),o("a",{attrs:{href:"https://developer.spotify.com/my-applications/#!/applications",target:"_blank",rel:"noopener noreferrer"}},[t._v("Your Applications"),o("OutboundLink")],1)]),t._v(" "),o("p",[t._v("After you have created your Application, you will have following important values:")]),t._v(" "),o("table",[o("thead",[o("tr",[o("th",[t._v("Name")]),t._v(" "),o("th",[t._v("Description")])])]),t._v(" "),o("tbody",[o("tr",[o("td",[o("strong",[t._v("Client_Id")])]),t._v(" "),o("td",[t._v("This is your client_id, you don't have to hide it")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Client_Secret")])]),t._v(" "),o("td",[t._v("Never use this in one of your client-side apps! Keep it secret!")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Redirect URIs")])]),t._v(" "),o("td",[t._v("Some of auth flows require that you set the correct redirect URI")])])])]),t._v(" "),o("p",[t._v("Now you can start with the user-authentication. Spotify provides 3 ways (4 if you consider different implementations):")]),t._v(" "),o("ul",[o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/implicit_grant.html"}},[t._v("ImplicitGrantAuth")])],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/token_swap.html"}},[t._v("TokenSwapAuth")]),t._v(" ("),o("strong",[t._v("Recommended")]),t._v(", server-side code mandatory, most secure method. The necessary code is shown here so you do not have to code it yourself.)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/authorization_code.html"}},[t._v("AutorizationCodeAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/client_credentials.html"}},[t._v("ClientCredentialsAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)])]),t._v(" "),o("p",[t._v("Overview:\n"),o("img",{attrs:{src:"http://i.imgur.com/uf3ahTl.png",alt:"Overview"}})])])},[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{252:function(t,e,o){"use strict";o.r(e);var r=o(28),i=Object(r.a)({},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),o("h2",{attrs:{id:"auth-methods"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#auth-methods","aria-hidden":"true"}},[t._v("#")]),t._v(" Auth-Methods")]),t._v(" "),o("p",[t._v("Before you can use the Web API's full functionality, you need the user to authenticate your Application.\nIf you want to know more, you can read to the whole auth-process "),o("a",{attrs:{href:"https://developer.spotify.com/web-api/authorization-guide/",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("Before you start, install "),o("code",[t._v("SpotifyAPI.Web.Auth")]),t._v(" and create an application at Spotify: "),o("a",{attrs:{href:"https://developer.spotify.com/my-applications/#!/applications",target:"_blank",rel:"noopener noreferrer"}},[t._v("Your Applications"),o("OutboundLink")],1)]),t._v(" "),o("p",[t._v("After you have created your Application, you will have following important values:")]),t._v(" "),o("table",[o("thead",[o("tr",[o("th",[t._v("Name")]),t._v(" "),o("th",[t._v("Description")])])]),t._v(" "),o("tbody",[o("tr",[o("td",[o("strong",[t._v("Client_Id")])]),t._v(" "),o("td",[t._v("This is your client_id, you don't have to hide it")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Client_Secret")])]),t._v(" "),o("td",[t._v("Never use this in one of your client-side apps! Keep it secret!")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Redirect URIs")])]),t._v(" "),o("td",[t._v("Some of auth flows require that you set the correct redirect URI")])])])]),t._v(" "),o("p",[t._v("Now you can start with the user-authentication. Spotify provides 3 ways (4 if you consider different implementations):")]),t._v(" "),o("ul",[o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/implicit_grant.html"}},[t._v("ImplicitGrantAuth")])],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/token_swap.html"}},[t._v("TokenSwapAuth")]),t._v(" ("),o("strong",[t._v("Recommended")]),t._v(", server-side code mandatory, most secure method. The necessary code is shown here so you do not have to code it yourself.)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/authorization_code.html"}},[t._v("AutorizationCodeAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/client_credentials.html"}},[t._v("ClientCredentialsAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)])]),t._v(" "),o("p",[t._v("Overview:\n"),o("img",{attrs:{src:"http://i.imgur.com/uf3ahTl.png",alt:"Overview"}})])])},[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/9.1df16d8e.js b/assets/js/9.f14800d8.js similarity index 98% rename from assets/js/9.1df16d8e.js rename to assets/js/9.f14800d8.js index bedac0fd..8e51263c 100644 --- a/assets/js/9.1df16d8e.js +++ b/assets/js/9.f14800d8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{254:function(t,a,s){"use strict";s.r(a);var n=s(28),e=Object(n.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"implicitgrantauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implicitgrantauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ImplicitGrantAuth")]),t._v(" "),s("p",[t._v("This way is "),s("strong",[t._v("recommended")]),t._v(' 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.\nYou won\'t be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.')]),t._v(" "),s("p",[t._v("More info: "),s("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#implicit-grant-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1)]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// `sender` is also the auth instance")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{253:function(t,a,s){"use strict";s.r(a);var n=s(28),e=Object(n.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"implicitgrantauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implicitgrantauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ImplicitGrantAuth")]),t._v(" "),s("p",[t._v("This way is "),s("strong",[t._v("recommended")]),t._v(' 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.\nYou won\'t be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.')]),t._v(" "),s("p",[t._v("More info: "),s("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#implicit-grant-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1)]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// `sender` is also the auth instance")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/app.db51fa36.js b/assets/js/app.4310edfd.js similarity index 94% rename from assets/js/app.db51fa36.js rename to assets/js/app.4310edfd.js index 1ae8c630..f5774b6c 100644 --- a/assets/js/app.db51fa36.js +++ b/assets/js/app.4310edfd.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],u=e[1],c=e[2],f=0,p=[];f0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(9),i=n(5),a=n(47),s=n(73),u=n(19),c=u.get,l=u.enforce,f=String(String).split("String");(t.exports=function(t,e,n,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),l(n).source=f.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(c=!0):delete t[e],c?t[e]=n:o(t,e,n)):c?t[e]=n:a(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&c(this).source||s(this)})},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(53),o=n(13),i=n(114);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(0),o=n(21).filter,i=n(45),a=n(11),s=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!s||!u},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(6),o=n(70),i=n(22),a=n(10),s=n(31),u=n(5),c=n(71),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var r,o,i,a=n(112),s=n(3),u=n(4),c=n(9),l=n(5),f=n(32),p=n(24),h=s.WeakMap;if(a){var d=new h,v=d.get,y=d.has,m=d.set;r=function(t,e){return m.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return y.call(d,t)}}else{var g=f("state");p[g]=!0,r=function(t,e){return c(t,g,e),e},o=function(t){return l(t,g)?t[g]:{}},i=function(t){return l(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(51),o=n(43),i=n(14),a=n(12),s=n(104),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f;return function(h,d,v,y){for(var m,g,b=i(h),w=o(b),_=r(d,v,3),x=a(w.length),k=0,S=y||s,O=e?S(h,x):n?S(h,0):void 0;x>k;k++)if((p||k in w)&&(g=_(m=w[k],k,b),t))if(e)O[k]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return k;case 2:u.call(O,m)}else if(l)return!1;return f?-1:c||l?l:O}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r=n(77),o=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r,o=n(8),i=n(116),a=n(50),s=n(24),u=n(117),c=n(72),l=n(32),f=l("IE_PROTO"),p=function(){},h=function(t){return" +
+ diff --git a/auth/client_credentials.html b/auth/client_credentials.html index 5d3b1a80..e5d1503c 100644 --- a/auth/client_credentials.html +++ b/auth/client_credentials.html @@ -8,7 +8,7 @@ - + @@ -109,7 +109,7 @@ If you want to use it securely, you would need to do it all server-side. TokenType = token.TokenType, AccessToken = token.AccessToken }; -
- +
+ diff --git a/auth/getting_started.html b/auth/getting_started.html index 10e1f373..f103d19e 100644 --- a/auth/getting_started.html +++ b/auth/getting_started.html @@ -8,7 +8,7 @@ - + @@ -102,7 +102,7 @@ 🚀 GitHub

Getting Started

Auth-Methods

Before you can use the Web API's full functionality, you need the user to authenticate your Application. If you want to know more, you can read to the whole auth-process here.

Before you start, install SpotifyAPI.Web.Auth and create an application at Spotify: Your Applications

After you have created your Application, you will have following important values:

Name Description
Client_Id This is your client_id, you don't have to hide it
Client_Secret Never use this in one of your client-side apps! Keep it secret!
Redirect URIs Some of auth flows require that you set the correct redirect URI

Now you can start with the user-authentication. Spotify provides 3 ways (4 if you consider different implementations):

Overview: -Overview

- +Overview

+ diff --git a/auth/implicit_grant.html b/auth/implicit_grant.html index 7b980d19..a732b28a 100644 --- a/auth/implicit_grant.html +++ b/auth/implicit_grant.html @@ -8,7 +8,7 @@ - + @@ -122,7 +122,7 @@ You won't be able to refresh the token. If you want to use the internal Http ser auth.Start(); // Starts an internal HTTP Server auth.OpenBrowser(); } -
- +
+ diff --git a/auth/token_swap.html b/auth/token_swap.html index c23705e9..d2492010 100644 --- a/auth/token_swap.html +++ b/auth/token_swap.html @@ -8,7 +8,7 @@ - + @@ -152,7 +152,7 @@ auth.AuthReceived .OnAccessTokenExpired += async (sender, e) => spotify.AccessToken = (await auth.RefreshAuthAsync(lastToken.RefreshToken)).AccessToken; auth.Start(); auth.OpenBrowser(); -

Token Swap Endpoint

To keep your client secret completely secure and your client ID and redirect URI as secure as possible, use of a web server (such as a php website) is required.

To use this method, an external HTTP Server (that you may need to create) needs to be able to supply the following HTTP Endpoints to your application:

/swap - Swaps out an authorization_code with an access_token and refresh_token - The following parameters are required in the JSON POST Body:

  • grant_type (set to "authorization_code")
  • code (the authorization_code)
  • redirect_uri
    • Important The page that the redirect URI links to must return the authorization code json to your serverUri (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.

/refresh - Refreshes an access_token - The following parameters are required in the JSON POST Body:

  • grant_type (set to "refresh_token")
  • refresh_token

The following open-source token swap endpoint code can be used for your website:

Remarks

It should be noted that GitHub Pages does not support hosting php scripts. Hosting php scripts through it will cause the php to render as plain HTML, potentially compromising your client secret while doing absolutely nothing.

Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail.

If you did not use the WebAPIFactory or you provided a serverUri different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your serverUri (such as changing the areas which refer to localhost:4002 if you had changed serverUri from its default), otherwise it will never reach your new serverUri.

- +

Token Swap Endpoint

To keep your client secret completely secure and your client ID and redirect URI as secure as possible, use of a web server (such as a php website) is required.

To use this method, an external HTTP Server (that you may need to create) needs to be able to supply the following HTTP Endpoints to your application:

/swap - Swaps out an authorization_code with an access_token and refresh_token - The following parameters are required in the JSON POST Body:

  • grant_type (set to "authorization_code")
  • code (the authorization_code)
  • redirect_uri
    • Important The page that the redirect URI links to must return the authorization code json to your serverUri (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.

/refresh - Refreshes an access_token - The following parameters are required in the JSON POST Body:

  • grant_type (set to "refresh_token")
  • refresh_token

The following open-source token swap endpoint code can be used for your website:

Remarks

It should be noted that GitHub Pages does not support hosting php scripts. Hosting php scripts through it will cause the php to render as plain HTML, potentially compromising your client secret while doing absolutely nothing.

Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail.

If you did not use the WebAPIFactory or you provided a serverUri different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your serverUri (such as changing the areas which refer to localhost:4002 if you had changed serverUri from its default), otherwise it will never reach your new serverUri.

+ diff --git a/index.html b/index.html index 54eec4da..dba27b51 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + @@ -103,7 +103,7 @@

SpotifyAPI-NET Docs

About

This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API

Spotify's Web API (link)

Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue. The API also provides access to user-related data such as playlists and music saved in a “Your Music” library, subject to user’s authorization.

SpotifyAPI.Web

A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access.

SpotifyAPI.Web.Auth

A library providing C# implementations of the 3 supported Authentication modes, including ImplicitGrantAuth, AuthorizationCodeAuth and CredentialsAuth


Installing

  • Via NuGet Package:
Install-Package SpotifyAPI.Web
 Install-Package SpotifyAPI.Web.Auth
-
  • Download the latest binaries on the GitHub Release Page and add it to your Project
  • Clone the Repo and build the project yourself.

Getting Started

Projects

lidarr by @lidarr

Looks and smells like Sonarr but made for music.

botframework-solutions by @microsoft

home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework

Spytify by @jwallet

Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files

audio-band by @dsafa

Display and control songs from the Windows taskbar

rocksmith-custom-song-toolkit by @catara

MASS Manipulation of Rocksmith DLC Library

Spofy by @eltoncezar

A Spotify mini player and notifier for Windows

Toastify by @aleab

Toastify adds global hotkeys and toast notifications to Spotify

Forked from nachmore/toastify

Spotify Oculus by @CaptainMorgs

Unity project for interacting with Spotify in virtual reality for the Oculus Rift.

Songify by @Inzaniity

A simple tool that gets the current track from Spotify, YouTube and Nightbot.

Elite G19s Companion app by @MagicMau

Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.

ARDUINO-Spotify-Remote-Control by @NADER11NDEU

Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.

- +
  • Download the latest binaries on the GitHub Release Page and add it to your Project
  • Clone the Repo and build the project yourself.

Getting Started

Projects

lidarr by @lidarr

Looks and smells like Sonarr but made for music.

botframework-solutions by @microsoft

home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework

Spytify by @jwallet

Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files

audio-band by @dsafa

Display and control songs from the Windows taskbar

rocksmith-custom-song-toolkit by @catara

MASS Manipulation of Rocksmith DLC Library

Spofy by @eltoncezar

A Spotify mini player and notifier for Windows

Toastify by @aleab

Toastify adds global hotkeys and toast notifications to Spotify

Forked from nachmore/toastify

Spotify Oculus by @CaptainMorgs

Unity project for interacting with Spotify in virtual reality for the Oculus Rift.

Songify by @Inzaniity

A simple tool that gets the current track from Spotify, YouTube and Nightbot.

Elite G19s Companion app by @MagicMau

Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.

ARDUINO-Spotify-Remote-Control by @NADER11NDEU

Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.

+ diff --git a/web/albums.html b/web/albums.html index 6206fec6..1046bd33 100644 --- a/web/albums.html +++ b/web/albums.html @@ -8,7 +8,7 @@ - + @@ -107,7 +107,7 @@ Console.Writ Console.WriteLine(album.Name + "| Popularity: " + album.Popularity); //Display name and Popularity

GetSeveralAlbums

Get Spotify catalog information for multiple albums identified by their Spotify IDs.

Parameters

Name Description Example
ids A list of the Spotify IDs for the albums. Maximum: 20 IDs. new List<String>() { "5O7V8l4SeXTymVp3IesT9C" }
[market] An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking. "DE"

Returns a SeveralAlbums which Property "Albums" contains a list of FullAlbum

Usage

SeveralAlbums albums = _spotify.GetSeveralAlbums(new List<String>() { "5O7V8l4SeXTymVp3IesT9C" });
 Console.WriteLine(albums.Albums[0].Name);
-

- +
+ diff --git a/web/artists.html b/web/artists.html index 4a1e583d..fd2db043 100644 --- a/web/artists.html +++ b/web/artists.html @@ -8,7 +8,7 @@ - + @@ -110,7 +110,7 @@ Console.Writ albums.Items.ForEach(album => Console.WriteLine(album.Name));

GetSeveralArtists

Get Spotify catalog information for several artists based on their Spotify IDs.

Parameters

Name Description Example
ids A list of the Spotify IDs for the artists. Maximum: 50 IDs. new List<String>() { "1KpCi9BOfviCVhmpI4G2sY" }

Returns a SeveralArtists object which contains the property List<FullArtist> Artists (FullArtist)

Usage

SeveralArtists artists = _spotify.GetSeveralArtists(new List<String>() {"1KpCi9BOfviCVhmpI4G2sY"});
 artists.Artists.ForEach(artist => Console.WriteLine(artist.Name));
-

- +
+ diff --git a/web/browse.html b/web/browse.html index 6b8935a4..ecdcbf79 100644 --- a/web/browse.html +++ b/web/browse.html @@ -8,7 +8,7 @@ - + @@ -111,7 +111,7 @@ categoryList.Categories.WriteLine(cat.Name);

GetCategoryPlaylists

Get a list of Spotify playlists tagged with a particular category.

Parameters

Name Description Example
categoryId The Spotify category ID for the category. "party"
[country] A country: an ISO 3166-1 alpha-2 country code. "DE"
[limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20
[offset] The index of the first item to return. Default: 0 0

Returns a CategoryPlaylist object, which has the property Paging<SimplePlaylist> Playlists

Usage

CategoryPlaylist playlists = _spotify.GetCategoryPlaylists("party");
 playlists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));
-

- +
+ diff --git a/web/examples.html b/web/examples.html index e291e9af..fc5cd1b9 100644 --- a/web/examples.html +++ b/web/examples.html @@ -8,7 +8,7 @@ - + @@ -100,7 +100,7 @@ - ClientCredentialsAuth 🚀 GitHub -

Examples

This page is currently empty. Do you have useful examples? Please open a PR

- +

Examples

This page is currently empty. Do you have useful examples? Please open a PR

+ diff --git a/web/follow.html b/web/follow.html index 8e9672b0..e8d23c12 100644 --- a/web/follow.html +++ b/web/follow.html @@ -8,7 +8,7 @@ - + @@ -118,7 +118,7 @@ Console.Writ

IsFollowingPlaylist

Check to see if one or more Spotify users are following a specified playlist.

Parameters

Name Description Example
ownerId The Spotify user ID of the person who owns the playlist. "maxloermans"
playlistId The Spotify ID of the playlist. "3SIp2VAsKI03mReF0dFBmI"
ids or id A list of the artist or the user Spotify IDs or just a Spotify ID new List<String> { "1KpCi9BOfviCVhmpI4G2sY" } or "1KpCi9BOfviCVhmpI4G2sY"

Returns a ListResponse<Boolean> which contains the property List<Boolean> List

Usage

//Am I following the playlist?
 ListResponse<Boolean> response = _spotify.IsFollowing("maxloermans", "3SIp2VAsKI03mReF0dFBmI", "1122095781");
 Console.WriteLine(response.List[0] ? "Yis!" : "No :(");
-

- +
+ diff --git a/web/getting_started.html b/web/getting_started.html index 575a7719..f400f20e 100644 --- a/web/getting_started.html +++ b/web/getting_started.html @@ -8,7 +8,7 @@ - + @@ -135,7 +135,7 @@ _spotify = newvar asyncProfile = await _spotify.GetPrivateProfileAsync(); var syncProfile = _spotify.GetPrivateProfile(); } -

Note that the synchronous call will block the current Thread!


API-Reference

Albums

Artists

Browse

Follow

Library

Personalization

Player

Playlists

Profiles

Tracks

Util

- +

Note that the synchronous call will block the current Thread!


API-Reference

Albums

Artists

Browse

Follow

Library

Personalization

Player

Playlists

Profiles

Tracks

Util

+ diff --git a/web/library.html b/web/library.html index 9bb38dda..74e2d56a 100644 --- a/web/library.html +++ b/web/library.html @@ -8,7 +8,7 @@ - + @@ -128,7 +128,7 @@ savedAlbums.Items CheckSavedAlbums

Check if one or more albums is already saved in the current Spotify user’s “Your Music” library.

Parameters

Name Description Example
ids A list of the Spotify IDs. new List<String> { "1cq06d0kTUnFmJHixz1RaF" }

Returns a ListResponse<bool> which contains a property, List<bool> List

Usage

ListResponse<bool> albumsSaved = _spotify.CheckSavedAlbums(new List<String> { "1cq06d0kTUnFmJHixz1RaF" });
 if(albumsSaved.List[0])
     Console.WriteLine("The album is in your library!");
-

- +
+ diff --git a/web/personalization.html b/web/personalization.html index 6f03aabf..dd63c977 100644 --- a/web/personalization.html +++ b/web/personalization.html @@ -8,7 +8,7 @@ - + @@ -107,7 +107,7 @@ Console.WriteLine(tracks.Total.ToString()) //Display total album track count artists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)

GetUsersRecentlyPlayedTracks

Get tracks from the current user’s recent play history.

Parameters

Name Description Example
[limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20
[after] Returns all items after (but not including) this cursor position. DateTime.Now.AddDays(-1)
[before] Returns all items before (but not including) this cursor position. DateTime.Now.AddDays(-1)

Returns a PlayHistory wrapped inside a CursorPaging-object

Usage

CursorPaging<PlayHistory> histories = _spotify.GetUsersRecentlyPlayedTracks();
 histories.Items.ForEach(item => Console.WriteLine(item.Track.Name));
-

- +
+ diff --git a/web/player.html b/web/player.html index 8fac7ff4..ac08c7c8 100644 --- a/web/player.html +++ b/web/player.html @@ -8,7 +8,7 @@ - + @@ -120,7 +120,7 @@ Returning to the start of the current track should be performed using the https:

SetVolume

Set the volume for the user’s current playback device.

Parameters

Name Description Example
volumePercent Integer. The volume to set. Must be a value from 0 to 100 inclusive. 50
[deviceId] The id of the device this command is targeting. If not supplied, the user's currently active device is the target. "XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SetVolume(50);
 

SetShuffle

Toggle shuffle on or off for user’s playback.

Parameters

Name Description Example
shuffle True or False false
[deviceId] The id of the device this command is targeting. If not supplied, the user's currently active device is the target. "XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SetShuffle(false);
 

AddToQueue

Add an Item to the User's Playback Queue. BETA.

Parameters

Name Description Example
uri The uri of the item to add to the queue. Must be a track or an episode uri. spotify:track:7zrCVKp6x0AtolOsn2iMif
[deviceId] The id of the device this command is targeting. If not supplied, the user's currently active device is the target. "XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.AddToQueue("spotify:track:7zrCVKp6x0AtolOsn2iMif");
-
- +
+ diff --git a/web/playlists.html b/web/playlists.html index e044d712..a414defe 100644 --- a/web/playlists.html +++ b/web/playlists.html @@ -8,7 +8,7 @@ - + @@ -140,7 +140,7 @@ playlist.Items ReorderPlaylist

Reorder a track or a group of tracks in a playlist. More Info: Reorder-Playlist

Parameters

Name Description Example
userId The user's Spotify user ID. "1122095781"
playlistId The Spotify ID for the playlist. "1TtEejT1y4D1WmcOnLfha2"
rangeStart The position of the first track to be reordered. 2
insertBefore The position where the tracks should be inserted. 0
[rangeLength] The amount of tracks to be reordered. Defaults to 1 if not set. 2
[snapshotId] The playlist's snapshot ID against which you want to make the changes. ``

Returns a Snapshot-Object which contains the property String SnapshotId

Usage

Snapshot snapshot = _spotify.ReorderPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", 2, 0, 2);
 Console.WriteLine("New SnapshotId: " + snapshot.SnapshotId);
-

- +
+ diff --git a/web/profiles.html b/web/profiles.html index 3e3c7848..c2ea4a12 100644 --- a/web/profiles.html +++ b/web/profiles.html @@ -8,7 +8,7 @@ - + @@ -102,7 +102,7 @@ 🚀 GitHub

Profiles

GetPrivateProfile

Get detailed profile information about the current user (including the current user’s username).

Parameters

Name Description Example

Returns a PrivateProfile

Usage

PrivateUser user = _spotify.GetPrivateProfile();
 Console.WriteLine(user.DisplayName);
-

GetPublicProfile

Get public profile information about a Spotify user.

Parameters

Name Description Example
userId The user's Spotify user ID. EXAMPLE

Returns a PublicProfile

Usage


- +

GetPublicProfile

Get public profile information about a Spotify user.

Parameters

Name Description Example
userId The user's Spotify user ID. EXAMPLE

Returns a PublicProfile

Usage


+ diff --git a/web/proxy.html b/web/proxy.html index 3302a7ec..1046de48 100644 --- a/web/proxy.html +++ b/web/proxy.html @@ -8,7 +8,7 @@ - + @@ -108,7 +108,7 @@ }; SpotifyWebAPI api = new SpotifyWebAPI(proxyConfig); -
- +
+ diff --git a/web/search.html b/web/search.html index a99b893c..8473a4c2 100644 --- a/web/search.html +++ b/web/search.html @@ -8,7 +8,7 @@ - + @@ -102,7 +102,7 @@ 🚀 GitHub

Search

SearchItems

Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.

WARNING

You may want to use SearchItemsEscaped if you're processing user-input without validation

Parameters

Name Description Example
q The search query's keywords (and optional field filters and operators), for example q=roadhouse+blues. "roadhouse+blues"
type A list of item types to search across. SearchType.Album
[limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20
[offset] The index of the first result to return. Default: 0 0
[market] An ISO 3166-1 alpha-2 country code or the string from_token. "de"

Returns a SearchItem which contains the properties Paging<FullArtist> Artists,Paging<FullTrack> Tracks, Paging<SimpleAlbum> Albums, Paging<SimplePlaylist> Playlists. They are filled based on your search-type.

Usage

SearchItem item = _spotify.SearchItems("roadhouse+blues", SearchType.Album | SearchType.Playlist);
 Console.WriteLine(item.Albums.Total); //How many results are there in total? NOTE: item.Tracks = item.Artists = null
-

SearchItemsEscaped

Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.

Works like SearchItems, but URL escapes all characters

- +

SearchItemsEscaped

Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.

Works like SearchItems, but URL escapes all characters

+ diff --git a/web/tracks.html b/web/tracks.html index f42967a6..57719e0b 100644 --- a/web/tracks.html +++ b/web/tracks.html @@ -8,7 +8,7 @@ - + @@ -106,7 +106,7 @@ severalTracks.Tracks.WriteLine(track.Name);

GetAudioAnalysis

Get a detailed audio analysis for a single track identified by its unique Spotify ID.

Parameters

Name Description Example
id The Spotify ID for the track. "6Y1CLPwYe7zvI8PJiWVz6T"

Returns a AudioAnalysis. This object is currently lacking Spotify documentation but archived EchoNest documentation is relevant.

Usage

AudioAnalysis analysis = _spotify.GetAudioAnalysis("6Y1CLPwYe7zvI8PJiWVz6T");
 Console.WriteLine(analysis.Meta.DetailedStatus);
-
- +
+ diff --git a/web/utils.html b/web/utils.html index 1a2b5866..ced55d0d 100644 --- a/web/utils.html +++ b/web/utils.html @@ -8,7 +8,7 @@ - + @@ -109,7 +109,7 @@ Both are an easy way to receive the next/previous page of a Paging-Object.

< break; playlistTracks = _spotify.GetNextPage(playlistTracks); } -
- +
+