From 0ef31792d126c46fafb6ae0e26100e5cacdbde1d Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Thu, 4 Jun 2020 16:22:07 +0200 Subject: [PATCH] Deploy website - based on 89102cceb771938526cc513b63271fd2793e6fe7 --- 031dc046.3010d1aa.js | 1 - 031dc046.98a54d1d.js | 1 + 0951e901.af8e55bd.js | 1 + 0951e901.f78795c5.js | 1 - 1.93fdc54d.js | 2 + ...s.LICENSE.txt => 1.93fdc54d.js.LICENSE.txt | 0 1.b01500b4.js | 2 - 10f76bbd.13b7a611.js | 1 - 10f76bbd.862b6cf0.js | 1 + 15560a88.6e2ad090.js | 1 - 15560a88.b975d092.js | 1 + 17896441.3d06f9cd.js | 1 - 17896441.af04a463.js | 1 + 18116e9d.de49e2dc.js | 1 + 18116e9d.fb5bea49.js | 1 - 1aaf601c.6c0db670.js | 1 + 1aaf601c.d933b003.js | 1 - 1be78505.0943205c.js | 1 + 1be78505.0f577e0c.js | 1 - 1f220079.1ab41755.js | 1 + 1f220079.4a9deec3.js | 1 - 2.6eaf9d11.js | 1 - 2.9d064c20.js | 2 + ...s.LICENSE.txt => 2.9d064c20.js.LICENSE.txt | 0 20ac7829.057f084f.js | 1 - 22a09cbf.2dc06596.js | 1 - 22a09cbf.48635c88.js | 1 + 25bfd71f.342893ad.js | 1 + 25bfd71f.a2b0f410.js | 1 - 266dfd57.6b1204c3.js | 1 - 266dfd57.ac4aa866.js | 1 + 27d9d47d.7cad4718.js | 1 - 27d9d47d.8970261e.js | 1 + 2851a227.2e294286.js | 1 + 2851a227.570a0b19.js | 1 - 293befc8.957dbc3f.js | 1 - 293befc8.fec23b62.js | 1 + 3.6fe0d7f0.js | 2 - 3.d7ef580c.js | 1 + 35214713.21acf8a2.js | 1 - 35214713.7f825951.js | 1 + 3abe8fb9.910596a0.js | 1 - 3abe8fb9.f37ca873.js | 1 + 3c5916b7.21547e83.js | 1 - 3c5916b7.ef00d278.js | 1 + 3d0d8a2f.6e650079.js | 1 + 404.html | 16 +++---- 516486bd.7eba38cb.js | 1 - 516486bd.bbaa1b19.js | 1 + 52804278.3da08e6c.js | 1 + 52804278.c2fc9c39.js | 1 - 53.3f424338.js | 1 + 53.71278610.js | 1 - 6373637a.07907811.js | 1 - 6373637a.17503cd8.js | 1 + 67d5074e.f0ef1b0d.js | 1 - 67d5074e.ffc86020.js | 1 + 700347c0.24ba4152.js | 1 + 700347c0.fb6e8492.js | 1 - 73139ff1.52bd4c1b.js | 1 - 73139ff1.5c96336e.js | 1 + 755cfc2e.33dfa066.js | 1 - 755cfc2e.aeef21b2.js | 1 + 8581bb41.c555b67d.js | 1 - 8581bb41.f937d2d6.js | 1 + 8ddd655f.5d497e75.js | 1 - 8ddd655f.6add6dd9.js | 1 + 9008bace.19a91bdc.js | 1 + 9008bace.58655dda.js | 1 - 902b04f6.002728c7.js | 1 - 902b04f6.a59ee175.js | 1 + 92bb876c.47d4d3de.js | 2 - 92bb876c.eca90765.js | 2 + ...SE.txt => 92bb876c.eca90765.js.LICENSE.txt | 0 9ed00105.034537f9.js | 1 + 9ed00105.3148ddcd.js | 1 - a09c2993.14998a4a.js | 1 + a09c2993.30a62cd8.js | 1 - a1189d06.1d6cb4f9.js | 1 - a1189d06.7d2cefde.js | 1 + ad407b76.8960c692.js | 1 + b5ab5f4e.93743811.js | 1 + b5ab5f4e.e57ac380.js | 1 - bbb8f1f8.1db3f054.js | 1 - bbb8f1f8.ac8129c8.js | 1 + c4f5d8e4.de5d3f71.js | 2 - c4f5d8e4.fc16f4ba.js | 2 + ...SE.txt => c4f5d8e4.fc16f4ba.js.LICENSE.txt | 0 c6c6e257.6f3fcdf4.js | 1 - cd5a7ece.16daa190.js | 1 + cd5a7ece.1d2e5268.js | 1 - d0e245df.b48e7ade.js | 1 - d0e245df.d1dc3614.js | 1 + d85a39be.3f22a2a2.js | 1 - d85a39be.61804330.js | 1 + dd053733.28c2c375.js | 1 + dd053733.c88a3048.js | 1 - docs/auth/authorization_code/index.html | 42 +++++++++--------- docs/auth/client_credentials/index.html | 42 +++++++++--------- docs/auth/getting_started/index.html | 44 +++++++++---------- docs/auth/implicit_grant/index.html | 42 +++++++++--------- docs/auth/token_swap/index.html | 42 +++++++++--------- docs/home/index.html | 42 +++++++++--------- docs/next/auth_introduction/index.html | 40 ++++++++--------- docs/next/authorization_code/index.html | 42 +++++++++--------- docs/next/client_credentials/index.html | 42 +++++++++--------- docs/next/configuration/index.html | 42 +++++++++--------- docs/next/error_handling/index.html | 40 ++++++++--------- docs/next/example_asp/index.html | 42 +++++++++--------- docs/next/example_blazor/index.html | 42 +++++++++--------- docs/next/example_blazor_wasm/index.html | 42 +++++++++--------- docs/next/example_cli_custom_html/index.html | 40 ++++++++--------- .../example_cli_persistent_config/index.html | 40 ++++++++--------- docs/next/example_token_swap/index.html | 40 ++++++++--------- docs/next/example_uwp/index.html | 40 ++++++++--------- docs/next/getting_started/index.html | 44 +++++++++---------- docs/next/implicit_grant/index.html | 42 +++++++++--------- docs/next/introduction/index.html | 40 ++++++++--------- docs/next/logging/index.html | 42 +++++++++--------- docs/next/pagination/index.html | 42 +++++++++--------- docs/next/proxy/index.html | 42 +++++++++--------- docs/next/retry_handling/index.html | 42 +++++++++--------- docs/next/showcase/index.html | 40 ++++++++--------- docs/next/token_swap/index.html | 42 +++++++++--------- docs/next/unit_testing/index.html | 42 +++++++++--------- docs/web/albums/index.html | 40 ++++++++--------- docs/web/artists/index.html | 40 ++++++++--------- docs/web/browse/index.html | 40 ++++++++--------- docs/web/follow/index.html | 40 ++++++++--------- docs/web/getting_started/index.html | 42 +++++++++--------- docs/web/library/index.html | 40 ++++++++--------- docs/web/personalization/index.html | 40 ++++++++--------- docs/web/player/index.html | 42 +++++++++--------- docs/web/playlists/index.html | 42 +++++++++--------- docs/web/profiles/index.html | 42 +++++++++--------- docs/web/proxy/index.html | 42 +++++++++--------- docs/web/search/index.html | 42 +++++++++--------- docs/web/tracks/index.html | 40 ++++++++--------- docs/web/utilities/index.html | 42 +++++++++--------- e02badcb.a639c68a.js | 1 + e02badcb.c8c2b9ad.js | 1 - e06aacec.1c23a577.js | 1 + e06aacec.ac7c3381.js | 1 - e27d08ab.66e23b9c.js | 1 + e27d08ab.808a5e59.js | 1 - e6afeee9.3552532c.js | 1 - e6afeee9.c857df7d.js | 1 + e8057f2a.6b42b8b7.js | 1 - e8057f2a.f411d23a.js | 1 + index.html | 34 +++++++------- main.9e094b9a.js | 2 + ...ICENSE.txt => main.9e094b9a.js.LICENSE.txt | 0 main.b13475af.js | 2 - runtime~main.00679df5.js | 1 - runtime~main.05a0f3e6.js | 1 + sitemap.xml | 2 +- styles.b4c4f1e6.js | 1 - styles.c98ed224.js | 1 + 158 files changed, 954 insertions(+), 954 deletions(-) delete mode 100644 031dc046.3010d1aa.js create mode 100644 031dc046.98a54d1d.js create mode 100644 0951e901.af8e55bd.js delete mode 100644 0951e901.f78795c5.js create mode 100644 1.93fdc54d.js rename 1.b01500b4.js.LICENSE.txt => 1.93fdc54d.js.LICENSE.txt (100%) delete mode 100644 1.b01500b4.js delete mode 100644 10f76bbd.13b7a611.js create mode 100644 10f76bbd.862b6cf0.js delete mode 100644 15560a88.6e2ad090.js create mode 100644 15560a88.b975d092.js delete mode 100644 17896441.3d06f9cd.js create mode 100644 17896441.af04a463.js create mode 100644 18116e9d.de49e2dc.js delete mode 100644 18116e9d.fb5bea49.js create mode 100644 1aaf601c.6c0db670.js delete mode 100644 1aaf601c.d933b003.js create mode 100644 1be78505.0943205c.js delete mode 100644 1be78505.0f577e0c.js create mode 100644 1f220079.1ab41755.js delete mode 100644 1f220079.4a9deec3.js delete mode 100644 2.6eaf9d11.js create mode 100644 2.9d064c20.js rename 3.6fe0d7f0.js.LICENSE.txt => 2.9d064c20.js.LICENSE.txt (100%) delete mode 100644 20ac7829.057f084f.js delete mode 100644 22a09cbf.2dc06596.js create mode 100644 22a09cbf.48635c88.js create mode 100644 25bfd71f.342893ad.js delete mode 100644 25bfd71f.a2b0f410.js delete mode 100644 266dfd57.6b1204c3.js create mode 100644 266dfd57.ac4aa866.js delete mode 100644 27d9d47d.7cad4718.js create mode 100644 27d9d47d.8970261e.js create mode 100644 2851a227.2e294286.js delete mode 100644 2851a227.570a0b19.js delete mode 100644 293befc8.957dbc3f.js create mode 100644 293befc8.fec23b62.js delete mode 100644 3.6fe0d7f0.js create mode 100644 3.d7ef580c.js delete mode 100644 35214713.21acf8a2.js create mode 100644 35214713.7f825951.js delete mode 100644 3abe8fb9.910596a0.js create mode 100644 3abe8fb9.f37ca873.js delete mode 100644 3c5916b7.21547e83.js create mode 100644 3c5916b7.ef00d278.js create mode 100644 3d0d8a2f.6e650079.js delete mode 100644 516486bd.7eba38cb.js create mode 100644 516486bd.bbaa1b19.js create mode 100644 52804278.3da08e6c.js delete mode 100644 52804278.c2fc9c39.js create mode 100644 53.3f424338.js delete mode 100644 53.71278610.js delete mode 100644 6373637a.07907811.js create mode 100644 6373637a.17503cd8.js delete mode 100644 67d5074e.f0ef1b0d.js create mode 100644 67d5074e.ffc86020.js create mode 100644 700347c0.24ba4152.js delete mode 100644 700347c0.fb6e8492.js delete mode 100644 73139ff1.52bd4c1b.js create mode 100644 73139ff1.5c96336e.js delete mode 100644 755cfc2e.33dfa066.js create mode 100644 755cfc2e.aeef21b2.js delete mode 100644 8581bb41.c555b67d.js create mode 100644 8581bb41.f937d2d6.js delete mode 100644 8ddd655f.5d497e75.js create mode 100644 8ddd655f.6add6dd9.js create mode 100644 9008bace.19a91bdc.js delete mode 100644 9008bace.58655dda.js delete mode 100644 902b04f6.002728c7.js create mode 100644 902b04f6.a59ee175.js delete mode 100644 92bb876c.47d4d3de.js create mode 100644 92bb876c.eca90765.js rename 92bb876c.47d4d3de.js.LICENSE.txt => 92bb876c.eca90765.js.LICENSE.txt (100%) create mode 100644 9ed00105.034537f9.js delete mode 100644 9ed00105.3148ddcd.js create mode 100644 a09c2993.14998a4a.js delete mode 100644 a09c2993.30a62cd8.js delete mode 100644 a1189d06.1d6cb4f9.js create mode 100644 a1189d06.7d2cefde.js create mode 100644 ad407b76.8960c692.js create mode 100644 b5ab5f4e.93743811.js delete mode 100644 b5ab5f4e.e57ac380.js delete mode 100644 bbb8f1f8.1db3f054.js create mode 100644 bbb8f1f8.ac8129c8.js delete mode 100644 c4f5d8e4.de5d3f71.js create mode 100644 c4f5d8e4.fc16f4ba.js rename c4f5d8e4.de5d3f71.js.LICENSE.txt => c4f5d8e4.fc16f4ba.js.LICENSE.txt (100%) delete mode 100644 c6c6e257.6f3fcdf4.js create mode 100644 cd5a7ece.16daa190.js delete mode 100644 cd5a7ece.1d2e5268.js delete mode 100644 d0e245df.b48e7ade.js create mode 100644 d0e245df.d1dc3614.js delete mode 100644 d85a39be.3f22a2a2.js create mode 100644 d85a39be.61804330.js create mode 100644 dd053733.28c2c375.js delete mode 100644 dd053733.c88a3048.js create mode 100644 e02badcb.a639c68a.js delete mode 100644 e02badcb.c8c2b9ad.js create mode 100644 e06aacec.1c23a577.js delete mode 100644 e06aacec.ac7c3381.js create mode 100644 e27d08ab.66e23b9c.js delete mode 100644 e27d08ab.808a5e59.js delete mode 100644 e6afeee9.3552532c.js create mode 100644 e6afeee9.c857df7d.js delete mode 100644 e8057f2a.6b42b8b7.js create mode 100644 e8057f2a.f411d23a.js create mode 100644 main.9e094b9a.js rename main.b13475af.js.LICENSE.txt => main.9e094b9a.js.LICENSE.txt (100%) delete mode 100644 main.b13475af.js delete mode 100644 runtime~main.00679df5.js create mode 100644 runtime~main.05a0f3e6.js delete mode 100644 styles.b4c4f1e6.js create mode 100644 styles.c98ed224.js diff --git a/031dc046.3010d1aa.js b/031dc046.3010d1aa.js deleted file mode 100644 index 139977d4..00000000 --- a/031dc046.3010d1aa.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{151:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},b=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),b=s(r),m=n,d=b["".concat(i,".").concat(m)]||b[m]||u[m]||o;return r?a.a.createElement(d,l({ref:t},p,{components:r})):a.a.createElement(d,l({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p wwwroot/appsettings.json\ndotnet run\n\n# Visit https://localhost:5001\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/031dc046.98a54d1d.js b/031dc046.98a54d1d.js new file mode 100644 index 00000000..0eb24335 --- /dev/null +++ b/031dc046.98a54d1d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{132:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return l})),r.d(t,"rightToc",(function(){return c})),r.d(t,"default",(function(){return s}));var n=r(2),o=r(9),a=(r(0),r(185)),i={id:"example_blazor_wasm",title:"Blazor WASM"},l={id:"example_blazor_wasm",title:"Blazor WASM",description:"Description",source:"@site/docs/example_blazor_wasm.md",permalink:"/SpotifyAPI-NET/docs/next/example_blazor_wasm",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/example_blazor_wasm.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591277053,sidebar:"docs",previous:{title:"ASP.NET",permalink:"/SpotifyAPI-NET/docs/next/example_asp"},next:{title:"Blazor ServerSide",permalink:"/SpotifyAPI-NET/docs/next/example_blazor"}},c=[{value:"Description",id:"description",children:[]},{value:"Run it",id:"run-it",children:[]}],p={rightToc:c};function s(e){var t=e.components,r=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},p,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"description"},"Description"),Object(a.b)("p",null,"This small cross-platform web app runs on ",Object(a.b)("inlineCode",{parentName:"p"},"Blazor WebAssembly"),", which was released on 19. May 2020. It allows to run C# code in any browser which supports WebAssembly. This allows to create .NET full-stack web projects without writing any JavaScript. Find more about ",Object(a.b)("a",Object(n.a)({parentName:"p"},{href:"https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/"}),"Blazor WebAssembly here")),Object(a.b)("p",null,"Since this library is compatible with ",Object(a.b)("inlineCode",{parentName:"p"},".NET Standard 2.1"),", you can use all features of ",Object(a.b)("inlineCode",{parentName:"p"},"SpotifyAPI.Web")," in your blazor wasm app. The example logs the user in via ",Object(a.b)("inlineCode",{parentName:"p"},"Implicit Grant")," and does 2 user-related API requests from the browser. You can observe the requests from your browsers network tools."),Object(a.b)("p",null,Object(a.b)("img",Object(n.a)({parentName:"p"},{src:"/img/blazorwasm_homepage.png",alt:"BlazorWASM Spotify Example"}))),Object(a.b)("p",null,Object(a.b)("img",Object(n.a)({parentName:"p"},{src:"/img/blazorwasm_network_tools.png",alt:"BlazorWASM Spotify Example - network tools"}))),Object(a.b)("h2",{id:"run-it"},"Run it"),Object(a.b)("p",null,"Before running it, make sure you created an app in your ",Object(a.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/dashboard/"}),"spotify dashboard")," and ",Object(a.b)("inlineCode",{parentName:"p"},"https://localhost:5001")," is a redirect uri of it."),Object(a.b)("pre",null,Object(a.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),'# Assumes linux and current working directory is the cloned repository\ncd SpotifyAPI.Web.Examples/Example.BlazorWASM\ndotnet restore\n\necho "{ \\"SPOTIFY_CLIENT_ID\\": \\"YourSpotifyClientId\\" }" > wwwroot/appsettings.json\ndotnet run\n\n# Visit https://localhost:5001\n')))}s.isMDXComponent=!0},185:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(0),o=r.n(n);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=o.a.createContext({}),s=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},b=function(e){var t=s(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),b=s(r),m=n,d=b["".concat(i,".").concat(m)]||b[m]||u[m]||a;return r?o.a.createElement(d,l({ref:t},p,{components:r})):o.a.createElement(d,l({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p Console.WriteLine(device.Name));\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"getplayback"},"GetPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Get information about the user\u2019s current playback state, including track, track progress, and active device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"PlaybackContext context = _spotify.GetPlayback();\nif(context.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"getplayingtrack"},"GetPlayingTrack"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Get the object currently being played on the user\u2019s Spotify account.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(r.b)("p",null,"This is a simpler (less data) version of ",Object(r.b)("inlineCode",{parentName:"p"},"GetPlayback")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"PlaybackContext context = _spotify.GetPlayingTrack();\nif(context.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"transferplayback"},"TransferPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Transfer playback to a new device and determine if it should start playing.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"deviceIds or deviceId"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A JSON array containing the ID of the device on which playback should be started/transferred"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"play"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true: ensure playback happens on new device, false: keep current playback state"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"true"))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.TransferPlayback("XXXX-XXXX-XXXX-XXXX");\n')),Object(r.b)("hr",null),Object(r.b)("h2",{id:"resumeplayback"},"ResumePlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Start a new context or resume current playback on the user\u2019s active device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"contextUri"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Spotify URI of the context to play"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uris"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An array of the Spotify track URIs to play."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'new List { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"offset"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Indicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object, or when the uris parameter is used."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"0"))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.ResumePlayback(uris: new List { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" });\n')),Object(r.b)("hr",null),Object(r.b)("h2",{id:"pauseplayback"},"PausePlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Pause playback on the user\u2019s account.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.PausePlayback();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"skipplaybacktonext"},"SkipPlaybackToNext"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Skips to next track in the user\u2019s queue.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SkipPlaybackToNext();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"skipplaybacktoprevious"},"SkipPlaybackToPrevious"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Skips to previous track in the user\u2019s queue.\nNote that this will ALWAYS skip to the previous track, regardless of the current track\u2019s progress.\nReturning to the start of the current track should be performed using the ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"https://api.spotify.com/v1/me/player/seek"}),"https://api.spotify.com/v1/me/player/seek")," endpoint.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SkipPlaybackToPrevious();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"seekplayback"},"SeekPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Seeks to the given position in the user\u2019s currently playing track.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"positionMs"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"50"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SeekPlayback(50);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setrepeatmode"},"SetRepeatMode"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Set the repeat mode for the user\u2019s playback. Options are repeat-track, repeat-context, and off.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"state"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"track, context or off."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"RepeatState.Track"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetRepeatMode(RepeatState.Track);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setvolume"},"SetVolume"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Set the volume for the user\u2019s current playback device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"volumePercent"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Integer. The volume to set. Must be a value from 0 to 100 inclusive."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"50"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetVolume(50);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setshuffle"},"SetShuffle"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Toggle shuffle on or off for user\u2019s playback.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"shuffle"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"True or False"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"false"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetShuffle(false);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"addtoqueue"},"AddToQueue"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Add an Item to the User's Playback Queue. BETA.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uri"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The uri of the item to add to the queue. Must be a track or an episode uri."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"spotify:track:7zrCVKp6x0AtolOsn2iMif"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.AddToQueue("spotify:track:7zrCVKp6x0AtolOsn2iMif");\n')))}o.isMDXComponent=!0},185:function(e,t,a){"use strict";a.d(t,"a",(function(){return O})),a.d(t,"b",(function(){return s}));var n=a(0),b=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var i=b.a.createContext({}),o=function(e){var t=b.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},O=function(e){var t=o(e.components);return b.a.createElement(i.Provider,{value:t},e.children)},j={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,i=p(e,["components","mdxType","originalType","parentName"]),O=o(a),u=n,s=O["".concat(l,".").concat(u)]||O[u]||j[u]||r;return a?b.a.createElement(s,c({ref:t},i,{components:a})):b.a.createElement(s,c({ref:t},i))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=u;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var i=2;i=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var i=b.a.createContext({}),o=function(e){var t=b.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},O=function(e){var t=o(e.components);return b.a.createElement(i.Provider,{value:t},e.children)},j={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,i=p(e,["components","mdxType","originalType","parentName"]),O=o(a),u=n,s=O["".concat(l,".").concat(u)]||O[u]||j[u]||r;return a?b.a.createElement(s,c({ref:t},i,{components:a})):b.a.createElement(s,c({ref:t},i))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=u;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var i=2;i Console.WriteLine(device.Name));\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"getplayback"},"GetPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Get information about the user\u2019s current playback state, including track, track progress, and active device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"PlaybackContext context = _spotify.GetPlayback();\nif(context.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"getplayingtrack"},"GetPlayingTrack"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Get the object currently being played on the user\u2019s Spotify account.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(r.b)("p",null,"This is a simpler (less data) version of ",Object(r.b)("inlineCode",{parentName:"p"},"GetPlayback")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"PlaybackContext context = _spotify.GetPlayingTrack();\nif(context.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"transferplayback"},"TransferPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Transfer playback to a new device and determine if it should start playing.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"deviceIds or deviceId"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A JSON array containing the ID of the device on which playback should be started/transferred"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"play"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true: ensure playback happens on new device, false: keep current playback state"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"true"))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.TransferPlayback("XXXX-XXXX-XXXX-XXXX");\n')),Object(r.b)("hr",null),Object(r.b)("h2",{id:"resumeplayback"},"ResumePlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Start a new context or resume current playback on the user\u2019s active device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"contextUri"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Spotify URI of the context to play"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uris"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"An array of the Spotify track URIs to play."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'new List { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }'))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"offset"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Indicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object, or when the uris parameter is used."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"0"))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.ResumePlayback(uris: new List { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" });\n')),Object(r.b)("hr",null),Object(r.b)("h2",{id:"pauseplayback"},"PausePlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Pause playback on the user\u2019s account.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.PausePlayback();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"skipplaybacktonext"},"SkipPlaybackToNext"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Skips to next track in the user\u2019s queue.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SkipPlaybackToNext();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"skipplaybacktoprevious"},"SkipPlaybackToPrevious"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Skips to previous track in the user\u2019s queue.\nNote that this will ALWAYS skip to the previous track, regardless of the current track\u2019s progress.\nReturning to the start of the current track should be performed using the ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"https://api.spotify.com/v1/me/player/seek"}),"https://api.spotify.com/v1/me/player/seek")," endpoint.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SkipPlaybackToPrevious();\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"seekplayback"},"SeekPlayback"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Seeks to the given position in the user\u2019s currently playing track.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"positionMs"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"50"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SeekPlayback(50);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setrepeatmode"},"SetRepeatMode"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Set the repeat mode for the user\u2019s playback. Options are repeat-track, repeat-context, and off.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"state"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"track, context or off."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"RepeatState.Track"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetRepeatMode(RepeatState.Track);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setvolume"},"SetVolume"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Set the volume for the user\u2019s current playback device.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"volumePercent"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Integer. The volume to set. Must be a value from 0 to 100 inclusive."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"50"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetVolume(50);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"setshuffle"},"SetShuffle"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Toggle shuffle on or off for user\u2019s playback.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"shuffle"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"True or False"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"false"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"ErrorResponse error = _spotify.SetShuffle(false);\n")),Object(r.b)("hr",null),Object(r.b)("h2",{id:"addtoqueue"},"AddToQueue"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Add an Item to the User's Playback Queue. BETA.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Parameters")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(r.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uri"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The uri of the item to add to the queue. Must be a track or an episode uri."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},"spotify:track:7zrCVKp6x0AtolOsn2iMif"))),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[deviceId]"),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The id of the device this command is targeting. If not supplied, the user's currently active device is the target."),Object(r.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(r.b)("inlineCode",{parentName:"td"},'"XXXX-XXXX-XXXX-XXXX"'))))),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Usage")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse error = _spotify.AddToQueue("spotify:track:7zrCVKp6x0AtolOsn2iMif");\n')))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/1.93fdc54d.js b/1.93fdc54d.js new file mode 100644 index 00000000..7870faad --- /dev/null +++ b/1.93fdc54d.js @@ -0,0 +1,2 @@ +/*! For license information please see 1.93fdc54d.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{186:function(t,e,n){"use strict";var r=n(0),o=n(55);e.a=function(){return Object(r.useContext)(o.a)}},187:function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e0)&&(e.unobserve(n),e.disconnect(),r())}))}))).observe(n))},to:p})):o.a.createElement("a",Object.assign({href:p},!d&&{target:"_blank",rel:"noopener noreferrer"},s))}},190:function(t,e,n){"use strict";function r(t){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(t)}n.d(e,"a",(function(){return r}))},191:function(t,e,n){var r=n(79),o=n(51).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},192:function(t,e,n){"use strict";var r=n(17),o=n(35),i=n(202),a="".startsWith;r(r.P+r.F*n(203)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},195:function(t,e,n){var r=n(69),o=n(50),i=n(25),a=n(71),c=n(24),u=n(76),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=i(t),e=a(e,!0),u)try{return s(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},201:function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(219);e.a=function(t){return o.a.createElement(i.a,t)}},202:function(t,e,n){var r=n(70),o=n(29);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},203:function(t,e,n){var r=n(3)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},204:function(t,e,n){var r=n(17);r(r.S+r.F,"Object",{assign:n(222)})},205:function(t,e){e.f=Object.getOwnPropertySymbols},213:function(t,e,n){e.f=n(3)},214:function(t,e,n){var r=n(21);t.exports=Array.isArray||function(t){return"Array"==r(t)}},219:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return ht}));var r,o,i,a,c=n(15),u=n.n(c),s=n(220),f=n.n(s),l=n(221),p=n.n(l),d=n(0),y=n.n(d),h=n(53),b=n.n(h),m="bodyAttributes",v="htmlAttributes",g="titleAttributes",w={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},T=(Object.keys(w).map((function(t){return w[t]})),"charset"),O="cssText",S="href",E="http-equiv",A="innerHTML",j="itemprop",C="name",P="property",x="rel",k="src",I="target",L={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N="defaultTitle",M="defer",R="encodeSpecialCharacters",F="onChangeClientState",D="titleTemplate",_=Object.keys(L).reduce((function(t,e){return t[L[e]]=e,t}),{}),q=[w.NOSCRIPT,w.SCRIPT,w.STYLE],H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},K=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},J=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},z=function(t){var e=X(t,w.TITLE),n=X(t,D);if(n&&e)return n.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var r=X(t,N);return e||r||void 0},$=function(t){return X(t,F)||function(){}},G=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return U({},t,e)}),{})},Q=function(t,e){return e.filter((function(t){return void 0!==t[w.BASE]})).map((function(t){return t[w.BASE]})).reverse().reduce((function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o=0;n--){var r=t[n];if(r.hasOwnProperty(e))return r[e]}return null},Z=(r=Date.now(),function(t){var e=Date.now();e-r>16?(r=e,t(e)):setTimeout((function(){Z(t)}),0)}),tt=function(t){return clearTimeout(t)},et="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Z:t.requestAnimationFrame||Z,nt="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:t.cancelAnimationFrame||tt,rt=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},ot=null,it=function(t,e){var n=t.baseTag,r=t.bodyAttributes,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.onChangeClientState,s=t.scriptTags,f=t.styleTags,l=t.title,p=t.titleAttributes;ut(w.BODY,r),ut(w.HTML,o),ct(l,p);var d={baseTag:st(w.BASE,n),linkTags:st(w.LINK,i),metaTags:st(w.META,a),noscriptTags:st(w.NOSCRIPT,c),scriptTags:st(w.SCRIPT,s),styleTags:st(w.STYLE,f)},y={},h={};Object.keys(d).forEach((function(t){var e=d[t],n=e.newTags,r=e.oldTags;n.length&&(y[t]=n),r.length&&(h[t]=d[t].oldTags)})),e&&e(),u(t,y,h)},at=function(t){return Array.isArray(t)?t.join(""):t},ct=function(t,e){void 0!==t&&document.title!==t&&(document.title=at(t)),ut(w.TITLE,e)},ut=function(t,e){var n=document.getElementsByTagName(t)[0];if(n){for(var r=n.getAttribute("data-react-helmet"),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(e),c=0;c=0;l--)n.removeAttribute(i[l]);o.length===i.length?n.removeAttribute("data-react-helmet"):n.getAttribute("data-react-helmet")!==a.join(",")&&n.setAttribute("data-react-helmet",a.join(","))}},st=function(t,e){var n=document.head||document.querySelector(w.HEAD),r=n.querySelectorAll(t+"[data-react-helmet]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return e&&e.length&&e.forEach((function(e){var n=document.createElement(t);for(var r in e)if(e.hasOwnProperty(r))if(r===A)n.innerHTML=e.innerHTML;else if(r===O)n.styleSheet?n.styleSheet.cssText=e.cssText:n.appendChild(document.createTextNode(e.cssText));else{var c=void 0===e[r]?"":e[r];n.setAttribute(r,c)}n.setAttribute("data-react-helmet","true"),o.some((function(t,e){return a=e,n.isEqualNode(t)}))?o.splice(a,1):i.push(n)})),o.forEach((function(t){return t.parentNode.removeChild(t)})),i.forEach((function(t){return n.appendChild(t)})),{oldTags:o,newTags:i}},ft=function(t){return Object.keys(t).reduce((function(e,n){var r=void 0!==t[n]?n+'="'+t[n]+'"':""+n;return e?e+" "+r:r}),"")},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[L[n]||n]=t[n],e}),e)},pt=function(t,e,n){switch(t){case w.TITLE:return{toComponent:function(){return t=e.title,n=e.titleAttributes,(r={key:t})["data-react-helmet"]=!0,o=lt(n,r),[y.a.createElement(w.TITLE,o,t)];var t,n,r,o},toString:function(){return function(t,e,n,r){var o=ft(n),i=at(e);return o?"<"+t+' data-react-helmet="true" '+o+">"+J(i,r)+"":"<"+t+' data-react-helmet="true">'+J(i,r)+""}(t,e.title,e.titleAttributes,n)}};case m:case v:return{toComponent:function(){return lt(e)},toString:function(){return ft(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,n){var r,o=((r={key:n})["data-react-helmet"]=!0,r);return Object.keys(e).forEach((function(t){var n=L[t]||t;if(n===A||n===O){var r=e.innerHTML||e.cssText;o.dangerouslySetInnerHTML={__html:r}}else o[n]=e[t]})),y.a.createElement(t,o)}))}(t,e)},toString:function(){return function(t,e,n){return e.reduce((function(e,r){var o=Object.keys(r).filter((function(t){return!(t===A||t===O)})).reduce((function(t,e){var o=void 0===r[e]?e:e+'="'+J(r[e],n)+'"';return t?t+" "+o:o}),""),i=r.innerHTML||r.cssText||"",a=-1===q.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+o+(a?"/>":">"+i+"")}),"")}(t,e,n)}}}},dt=function(t){var e=t.baseTag,n=t.bodyAttributes,r=t.encode,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.scriptTags,s=t.styleTags,f=t.title,l=void 0===f?"":f,p=t.titleAttributes;return{base:pt(w.BASE,e,r),bodyAttributes:pt(m,n,r),htmlAttributes:pt(v,o,r),link:pt(w.LINK,i,r),meta:pt(w.META,a,r),noscript:pt(w.NOSCRIPT,c,r),script:pt(w.SCRIPT,u,r),style:pt(w.STYLE,s,r),title:pt(w.TITLE,{title:l,titleAttributes:p},r)}},yt=f()((function(t){return{baseTag:Q([S,I],t),bodyAttributes:G(m,t),defer:X(t,M),encode:X(t,R),htmlAttributes:G(v,t),linkTags:V(w.LINK,[x,S],t),metaTags:V(w.META,[C,T,E,P,j],t),noscriptTags:V(w.NOSCRIPT,[A],t),onChangeClientState:$(t),scriptTags:V(w.SCRIPT,[k,A],t),styleTags:V(w.STYLE,[O],t),title:z(t),titleAttributes:G(g,t)}}),(function(t){ot&&nt(ot),t.defer?ot=et((function(){it(t,(function(){ot=null}))})):(it(t),ot=null)}),dt)((function(){return null})),ht=(o=yt,a=i=function(t){function e(){return W(this,e),K(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!p()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:e};case w.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,n=t.child,r=t.arrayTypeChildren,o=t.newChildProps,i=t.nestedChildren;return U({},r,((e={})[n.type]=[].concat(r[n.type]||[],[U({},o,this.mapNestedChildrenToProps(n,i))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,n,r=t.child,o=t.newProps,i=t.newChildProps,a=t.nestedChildren;switch(r.type){case w.TITLE:return U({},o,((e={})[r.type]=a,e.titleAttributes=U({},i),e));case w.BODY:return U({},o,{bodyAttributes:U({},i)});case w.HTML:return U({},o,{htmlAttributes:U({},i)})}return U({},o,((n={})[r.type]=U({},i),n))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var n=U({},e);return Object.keys(t).forEach((function(e){var r;n=U({},n,((r={})[e]=t[e],r))})),n},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var n=this,r={};return y.a.Children.forEach(t,(function(t){if(t&&t.props){var o=t.props,i=o.children,a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[_[n]||n]=t[n],e}),e)}(B(o,["children"]));switch(n.warnOnInvalidChildren(t,i),t.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:r=n.flattenArrayTypeChildren({child:t,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:e=n.mapObjectTypeChildren({child:t,newProps:e,newChildProps:a,nestedChildren:i})}}})),e=this.mapArrayTypeChildrenToProps(r,e)},e.prototype.render=function(){var t=this.props,e=t.children,n=B(t,["children"]),r=U({},n);return e&&(r=this.mapChildrenToProps(e,r)),y.a.createElement(o,r)},Y(e,null,[{key:"canUseDOM",set:function(t){o.canUseDOM=t}}]),e}(y.a.Component),i.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var t=o.rewind();return t||(t=dt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},a);ht.renderStatic=ht.rewind}).call(this,n(84))},220:function(t,e,n){"use strict";var r,o=n(0),i=(r=o)&&"object"==typeof r&&"default"in r?r.default:r;function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,n){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function f(){u=t(s.map((function(t){return t.props}))),l.canUseDOM?e(u):n&&(u=n(u))}var l=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,o.peek=function(){return u},o.rewind=function(){if(o.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,s=[],t};var a=o.prototype;return a.UNSAFE_componentWillMount=function(){s.push(this),f()},a.componentDidUpdate=function(){f()},a.componentWillUnmount=function(){var t=s.indexOf(this);s.splice(t,1),f()},a.render=function(){return i.createElement(r,this.props)},o}(o.PureComponent);return a(l,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(r)+")"),a(l,"canUseDOM",c),l}}},221:function(t,e,n){"use strict";var r=Array.isArray,o=Object.keys,i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;t.exports=function(t,e){try{return function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){var c,u,s,f=r(e),l=r(n);if(f&&l){if((u=e.length)!=n.length)return!1;for(c=u;0!=c--;)if(!t(e[c],n[c]))return!1;return!0}if(f!=l)return!1;var p=e instanceof Date,d=n instanceof Date;if(p!=d)return!1;if(p&&d)return e.getTime()==n.getTime();var y=e instanceof RegExp,h=n instanceof RegExp;if(y!=h)return!1;if(y&&h)return e.toString()==n.toString();var b=o(e);if((u=b.length)!==o(n).length)return!1;for(c=u;0!=c--;)if(!i.call(n,b[c]))return!1;if(a&&e instanceof Element&&n instanceof Element)return e===n;for(c=u;0!=c--;)if(!("_owner"===(s=b[c])&&e.$$typeof||t(e[s],n[s])))return!1;return!0}return e!=e&&n!=n}(t,e)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},222:function(t,e,n){"use strict";var r=n(12),o=n(28),i=n(205),a=n(69),c=n(49),u=n(78),s=Object.assign;t.exports=!s||n(18)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r}))?function(t,e){for(var n=c(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var d,y=u(arguments[f++]),h=l?o(y).concat(l(y)):o(y),b=h.length,m=0;b>m;)d=h[m++],r&&!p.call(y,d)||(n[d]=y[d]);return n}:s},223:function(t,e,n){"use strict";var r=n(6),o=n(24),i=n(12),a=n(17),c=n(13),u=n(224).KEY,s=n(18),f=n(39),l=n(41),p=n(37),d=n(3),y=n(213),h=n(225),b=n(226),m=n(214),v=n(8),g=n(11),w=n(49),T=n(25),O=n(71),S=n(50),E=n(82),A=n(227),j=n(195),C=n(205),P=n(23),x=n(28),k=j.f,I=P.f,L=A.f,N=r.Symbol,M=r.JSON,R=M&&M.stringify,F=d("_hidden"),D=d("toPrimitive"),_={}.propertyIsEnumerable,q=f("symbol-registry"),H=f("symbols"),W=f("op-symbols"),Y=Object.prototype,U="function"==typeof N&&!!C.f,B=r.QObject,K=!B||!B.prototype||!B.prototype.findChild,J=i&&s((function(){return 7!=E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=k(Y,e);r&&delete Y[e],I(t,e,n),r&&t!==Y&&I(Y,e,r)}:I,z=function(t){var e=H[t]=E(N.prototype);return e._k=t,e},$=U&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},G=function(t,e,n){return t===Y&&G(W,e,n),v(t),e=O(e,!0),v(n),o(H,e)?(n.enumerable?(o(t,F)&&t[F][e]&&(t[F][e]=!1),n=E(n,{enumerable:S(0,!1)})):(o(t,F)||I(t,F,S(1,{})),t[F][e]=!0),J(t,e,n)):I(t,e,n)},Q=function(t,e){v(t);for(var n,r=b(e=T(e)),o=0,i=r.length;i>o;)G(t,n=r[o++],e[n]);return t},V=function(t){var e=_.call(this,t=O(t,!0));return!(this===Y&&o(H,t)&&!o(W,t))&&(!(e||!o(this,t)||!o(H,t)||o(this,F)&&this[F][t])||e)},X=function(t,e){if(t=T(t),e=O(e,!0),t!==Y||!o(H,e)||o(W,e)){var n=k(t,e);return!n||!o(H,e)||o(t,F)&&t[F][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=L(T(t)),r=[],i=0;n.length>i;)o(H,e=n[i++])||e==F||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===Y,r=L(n?W:T(t)),i=[],a=0;r.length>a;)!o(H,e=r[a++])||n&&!o(Y,e)||i.push(H[e]);return i};U||(c((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(W,n),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),J(this,t,S(1,n))};return i&&K&&J(Y,t,{configurable:!0,set:e}),z(t)}).prototype,"toString",(function(){return this._k})),j.f=X,P.f=G,n(191).f=A.f=Z,n(69).f=V,C.f=tt,i&&!n(36)&&c(Y,"propertyIsEnumerable",V,!0),y.f=function(t){return z(d(t))}),a(a.G+a.W+a.F*!U,{Symbol:N});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=x(d.store),ot=0;rt.length>ot;)h(rt[ot++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return o(q,t+="")?q[t]:q[t]=N(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var e in q)if(q[e]===t)return e},useSetter:function(){K=!0},useSimple:function(){K=!1}}),a(a.S+a.F*!U,"Object",{create:function(t,e){return void 0===e?E(t):Q(E(t),e)},defineProperty:G,defineProperties:Q,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=s((function(){C.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return C.f(w(t))}}),M&&a(a.S+a.F*(!U||s((function(){var t=N();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(g(e)||void 0!==t)&&!$(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$(e))return e}),r[1]=e,R.apply(M,r)}}),N.prototype[D]||n(10)(N.prototype,D,N.prototype.valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},224:function(t,e,n){var r=n(37)("meta"),o=n(11),i=n(24),a=n(23).f,c=0,u=Object.isExtensible||function(){return!0},s=!n(18)((function(){return u(Object.preventExtensions({}))})),f=function(t){a(t,r,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&u(t)&&!i(t,r)&&f(t),t}}},225:function(t,e,n){var r=n(6),o=n(14),i=n(36),a=n(213),c=n(23).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:a.f(t)})}},226:function(t,e,n){var r=n(28),o=n(205),i=n(69);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,c=n(t),u=i.f,s=0;c.length>s;)u.call(t,a=c[s++])&&e.push(a);return e}},227:function(t,e,n){var r=n(25),o=n(191).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(e){return a.slice()}}(t):o(r(t))}}}]); \ No newline at end of file diff --git a/1.b01500b4.js.LICENSE.txt b/1.93fdc54d.js.LICENSE.txt similarity index 100% rename from 1.b01500b4.js.LICENSE.txt rename to 1.93fdc54d.js.LICENSE.txt diff --git a/1.b01500b4.js b/1.b01500b4.js deleted file mode 100644 index cedbcdd7..00000000 --- a/1.b01500b4.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1.b01500b4.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{152:function(e,t,n){"use strict";var r=n(0),o=n(35);t.a=function(){return Object(r.useContext)(o.a)}},153:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t(!y&&p&&window.docusaurus.prefetch(l),()=>{y&&b&&b.disconnect()}),[l,y,p]),l&&p&&!l.startsWith("#")?o.a.createElement(h,Object.assign({},n,{onMouseEnter:()=>{d.current||(window.docusaurus.preload(l),d.current=!0)},innerRef:e=>{var t,n;y&&e&&p&&(t=e,n=()=>{window.docusaurus.prefetch(l)},b=new window.IntersectionObserver(e=>{e.forEach(e=>{t===e.target&&(e.isIntersecting||e.intersectionRatio>0)&&(b.unobserve(t),b.disconnect(),n())})}),b.observe(t))},to:l})):o.a.createElement("a",Object.assign({href:l},!p&&{target:"_blank",rel:"noopener noreferrer"},n))}},156:function(e,t,n){"use strict";function r(e){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(e)}n.d(t,"a",(function(){return r}))},164:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(173);t.a=function(e){return o.a.createElement(i.a,e)}},173:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ye}));var r,o,i,a,c=n(9),u=n.n(c),s=n(174),f=n.n(s),l=n(175),p=n.n(l),d=n(0),h=n.n(d),y=n(34),b=n.n(y),m="bodyAttributes",v="htmlAttributes",T="titleAttributes",g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},w=(Object.keys(g).map((function(e){return g[e]})),"charset"),O="cssText",A="href",C="http-equiv",E="innerHTML",S="itemprop",j="name",P="property",k="rel",x="src",I="target",L={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N="defaultTitle",R="defer",M="encodeSpecialCharacters",D="onChangeClientState",H="titleTemplate",_=Object.keys(L).reduce((function(e,t){return e[L[t]]=t,e}),{}),q=[g.NOSCRIPT,g.SCRIPT,g.STYLE],U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},F=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},W=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},z=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},J=function(e){var t=X(e,g.TITLE),n=X(e,H);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=X(e,N);return t||r||void 0},$=function(e){return X(e,D)||function(){}},G=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return B({},e,t)}),{})},Q=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),o=0;o=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},Z=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){Z(e)}),0)}),ee=function(e){return clearTimeout(e)},te="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Z:e.requestAnimationFrame||Z,ne="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||ee:e.cancelAnimationFrame||ee,re=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},oe=null,ie=function(e,t){var n=e.baseTag,r=e.bodyAttributes,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,s=e.scriptTags,f=e.styleTags,l=e.title,p=e.titleAttributes;ue(g.BODY,r),ue(g.HTML,o),ce(l,p);var d={baseTag:se(g.BASE,n),linkTags:se(g.LINK,i),metaTags:se(g.META,a),noscriptTags:se(g.NOSCRIPT,c),scriptTags:se(g.SCRIPT,s),styleTags:se(g.STYLE,f)},h={},y={};Object.keys(d).forEach((function(e){var t=d[e],n=t.newTags,r=t.oldTags;n.length&&(h[e]=n),r.length&&(y[e]=d[e].oldTags)})),t&&t(),u(e,h,y)},ae=function(e){return Array.isArray(e)?e.join(""):e},ce=function(e,t){void 0!==e&&document.title!==e&&(document.title=ae(e)),ue(g.TITLE,t)},ue=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-react-helmet"),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(t),c=0;c=0;l--)n.removeAttribute(i[l]);o.length===i.length?n.removeAttribute("data-react-helmet"):n.getAttribute("data-react-helmet")!==a.join(",")&&n.setAttribute("data-react-helmet",a.join(","))}},se=function(e,t){var n=document.head||document.querySelector(g.HEAD),r=n.querySelectorAll(e+"[data-react-helmet]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===E)n.innerHTML=t.innerHTML;else if(r===O)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute("data-react-helmet","true"),o.some((function(e,t){return a=t,n.isEqualNode(e)}))?o.splice(a,1):i.push(n)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return n.appendChild(e)})),{oldTags:o,newTags:i}},fe=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[L[n]||n]=e[n],t}),t)},pe=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})["data-react-helmet"]=!0,o=le(n,r),[h.a.createElement(g.TITLE,o,e)];var e,n,r,o},toString:function(){return function(e,t,n,r){var o=fe(n),i=ae(t);return o?"<"+e+' data-react-helmet="true" '+o+">"+z(i,r)+"":"<"+e+' data-react-helmet="true">'+z(i,r)+""}(e,t.title,t.titleAttributes,n)}};case m:case v:return{toComponent:function(){return le(t)},toString:function(){return fe(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,o=((r={key:n})["data-react-helmet"]=!0,r);return Object.keys(t).forEach((function(e){var n=L[e]||e;if(n===E||n===O){var r=t.innerHTML||t.cssText;o.dangerouslySetInnerHTML={__html:r}}else o[n]=t[e]})),h.a.createElement(e,o)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var o=Object.keys(r).filter((function(e){return!(e===E||e===O)})).reduce((function(e,t){var o=void 0===r[t]?t:t+'="'+z(r[t],n)+'"';return e?e+" "+o:o}),""),i=r.innerHTML||r.cssText||"",a=-1===q.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+o+(a?"/>":">"+i+"")}),"")}(e,t,n)}}}},de=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.scriptTags,s=e.styleTags,f=e.title,l=void 0===f?"":f,p=e.titleAttributes;return{base:pe(g.BASE,t,r),bodyAttributes:pe(m,n,r),htmlAttributes:pe(v,o,r),link:pe(g.LINK,i,r),meta:pe(g.META,a,r),noscript:pe(g.NOSCRIPT,c,r),script:pe(g.SCRIPT,u,r),style:pe(g.STYLE,s,r),title:pe(g.TITLE,{title:l,titleAttributes:p},r)}},he=f()((function(e){return{baseTag:Q([A,I],e),bodyAttributes:G(m,e),defer:X(e,R),encode:X(e,M),htmlAttributes:G(v,e),linkTags:V(g.LINK,[k,A],e),metaTags:V(g.META,[j,w,C,P,S],e),noscriptTags:V(g.NOSCRIPT,[E],e),onChangeClientState:$(e),scriptTags:V(g.SCRIPT,[x,E],e),styleTags:V(g.STYLE,[O],e),title:J(e),titleAttributes:G(T,e)}}),(function(e){oe&&ne(oe),e.defer?oe=te((function(){ie(e,(function(){oe=null}))})):(ie(e),oe=null)}),de)((function(){return null})),ye=(o=he,a=i=function(e){function t(){return Y(this,t),W(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!p()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,o=e.newChildProps,i=e.nestedChildren;return B({},r,((t={})[n.type]=[].concat(r[n.type]||[],[B({},o,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,i=e.newChildProps,a=e.nestedChildren;switch(r.type){case g.TITLE:return B({},o,((t={})[r.type]=a,t.titleAttributes=B({},i),t));case g.BODY:return B({},o,{bodyAttributes:B({},i)});case g.HTML:return B({},o,{htmlAttributes:B({},i)})}return B({},o,((n={})[r.type]=B({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=B({},t);return Object.keys(e).forEach((function(t){var r;n=B({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return h.a.Children.forEach(e,(function(e){if(e&&e.props){var o=e.props,i=o.children,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[_[n]||n]=e[n],t}),t)}(K(o,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:i})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=K(e,["children"]),r=B({},n);return t&&(r=this.mapChildrenToProps(t,r)),h.a.createElement(o,r)},F(t,null,[{key:"canUseDOM",set:function(e){o.canUseDOM=e}}]),t}(h.a.Component),i.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var e=o.rewind();return e||(e=de({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);ye.renderStatic=ye.rewind}).call(this,n(51))},174:function(e,t,n){"use strict";var r,o=n(0),i=(r=o)&&"object"==typeof r&&"default"in r?r.default:r;function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function f(){u=e(s.map((function(e){return e.props}))),l.canUseDOM?t(u):n&&(u=n(u))}var l=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o.peek=function(){return u},o.rewind=function(){if(o.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,s=[],e};var a=o.prototype;return a.UNSAFE_componentWillMount=function(){s.push(this),f()},a.componentDidUpdate=function(){f()},a.componentWillUnmount=function(){var e=s.indexOf(this);s.splice(e,1),f()},a.render=function(){return i.createElement(r,this.props)},o}(o.PureComponent);return a(l,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),a(l,"canUseDOM",c),l}}},175:function(e,t,n){"use strict";var r=Array.isArray,o=Object.keys,i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var c,u,s,f=r(t),l=r(n);if(f&&l){if((u=t.length)!=n.length)return!1;for(c=u;0!=c--;)if(!e(t[c],n[c]))return!1;return!0}if(f!=l)return!1;var p=t instanceof Date,d=n instanceof Date;if(p!=d)return!1;if(p&&d)return t.getTime()==n.getTime();var h=t instanceof RegExp,y=n instanceof RegExp;if(h!=y)return!1;if(h&&y)return t.toString()==n.toString();var b=o(t);if((u=b.length)!==o(n).length)return!1;for(c=u;0!=c--;)if(!i.call(n,b[c]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(c=u;0!=c--;)if(!("_owner"===(s=b[c])&&t.$$typeof||e(t[s],n[s])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}}}]); \ No newline at end of file diff --git a/10f76bbd.13b7a611.js b/10f76bbd.13b7a611.js deleted file mode 100644 index 6a3aad4d..00000000 --- a/10f76bbd.13b7a611.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{100:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return s})),n.d(t,"rightToc",(function(){return c})),n.d(t,"default",(function(){return l}));var r=n(2),o=n(6),a=(n(0),n(151)),i={id:"token_swap",title:"Token Swap"},s={id:"version-5.1.1/auth/token_swap",title:"Token Swap",description:"This way uses server-side code or at least access to an exchange server, otherwise, compared to other",source:"@site/versioned_docs/version-5.1.1/auth/token_swap.md",permalink:"/docs/auth/token_swap",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/auth/token_swap.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar:"version-5.1.1/someSidebar",previous:{title:"Client Credentials",permalink:"/docs/auth/client_credentials"}},c=[{value:"Using TokenSwapWebAPIFactory",id:"using-tokenswapwebapifactory",children:[]},{value:"Using TokenSwapAuth",id:"using-tokenswapauth",children:[]},{value:"Token Swap Endpoint",id:"token-swap-endpoint",children:[]},{value:"Remarks",id:"remarks",children:[]}],p={rightToc:c};function l(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"This way uses server-side code or at least access to an exchange server, otherwise, compared to other\nmethods, it is impossible to use."),Object(a.b)("p",null,'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".'),Object(a.b)("p",null,"The exchange server ",Object(a.b)("strong",{parentName:"p"},"must")," be able to:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},'Return the authorization code from Spotify API authenticate page via GET request to the "server URI".'),Object(a.b)("li",{parentName:"ul"},"Request the token response object via POST to the Spotify API token page."),Object(a.b)("li",{parentName:"ul"},"Request a refreshed token response object via POST to the Spotify API token page.")),Object(a.b)("p",null,Object(a.b)("strong",{parentName:"p"},"The good news is that you do not need to code it yourself.")),Object(a.b)("p",null,"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 ",Object(a.b)("strong",{parentName:"p"},"never")," exposed and is completely hidden compared to other methods (excluding ",Object(a.b)("a",Object(r.a)({parentName:"p"},{href:"/SpotifyWebAPI/auth#implicitgrantauth"}),"ImplicitGrantAuth"),"\nas it does not deal with a client secret). This means\nyour Spotify app ",Object(a.b)("strong",{parentName:"p"},"cannot")," be spoofed by a malicious third party."),Object(a.b)("h2",{id:"using-tokenswapwebapifactory"},"Using TokenSwapWebAPIFactory"),Object(a.b)("p",null,"The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you."),Object(a.b)("p",null,"It does this through the method GetWebApiAsync ",Object(a.b)("strong",{parentName:"p"},"asynchronously"),", which means it will not halt execution of your program while obtaining it for you. If you would like to halt execution, which is ",Object(a.b)("strong",{parentName:"p"},"synchronous"),", use ",Object(a.b)("inlineCode",{parentName:"p"},"GetWebApiAsync().Result")," without using ",Object(a.b)("strong",{parentName:"p"},"await"),"."),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'TokenSwapWebAPIFactory webApiFactory;\nSpotifyWebAPI spotify;\n\n// 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.\nwebApiFactory = new TokenSwapWebAPIFactory("INSERT LINK TO YOUR index.php HERE")\n{\n Scope = Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate,\n AutoRefresh = true\n};\n// You may want to react to being able to use the Spotify service.\n// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;\n// You may want to react to your user\'s access expiring.\n// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;\n\ntry\n{\n spotify = await webApiFactory.GetWebApiAsync();\n // Synchronous way:\n // spotify = webApiFactory.GetWebApiAsync().Result;\n}\ncatch (Exception ex)\n{\n // Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper\n // UpdateStatus($"Spotify failed to load: {ex.Message}");\n}\n')),Object(a.b)("h2",{id:"using-tokenswapauth"},"Using TokenSwapAuth"),Object(a.b)("p",null,"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."),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'TokenSwapAuth auth = new TokenSwapAuth(\n exchangeServerUri: "INSERT LINK TO YOUR index.php HERE",\n serverUri: "http://localhost:4002",\n scope: Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate\n);\nauth.AuthReceived += async (sender, response) =>\n{\n lastToken = await auth.ExchangeCodeAsync(response.Code);\n\n spotify = new SpotifyWebAPI()\n {\n TokenType = lastToken.TokenType,\n AccessToken = lastToken.AccessToken\n };\n\n authenticated = true;\n auth.Stop();\n};\nauth.OnAccessTokenExpired += async (sender, e) => spotify.AccessToken = (await auth.RefreshAuthAsync(lastToken.RefreshToken)).AccessToken;\nauth.Start();\nauth.OpenBrowser();\n')),Object(a.b)("h2",{id:"token-swap-endpoint"},"Token Swap Endpoint"),Object(a.b)("p",null,"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."),Object(a.b)("p",null,"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:"),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"/swap")," - Swaps out an ",Object(a.b)("inlineCode",{parentName:"p"},"authorization_code")," with an ",Object(a.b)("inlineCode",{parentName:"p"},"access_token")," and ",Object(a.b)("inlineCode",{parentName:"p"},"refresh_token")," - The following parameters are required in the JSON POST Body:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"grant_type")," (set to ",Object(a.b)("inlineCode",{parentName:"li"},'"authorization_code"'),")"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"code")," (the ",Object(a.b)("inlineCode",{parentName:"li"},"authorization_code"),")"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"redirect_uri")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("ul",{parentName:"li"},Object(a.b)("li",{parentName:"ul"},Object(a.b)("strong",{parentName:"li"},"Important")," The page that the redirect URI links to must return the authorization code json to your ",Object(a.b)("inlineCode",{parentName:"li"},"serverUri")," (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.")))),Object(a.b)("p",null,Object(a.b)("inlineCode",{parentName:"p"},"/refresh")," - Refreshes an ",Object(a.b)("inlineCode",{parentName:"p"},"access_token")," - The following parameters are required in the JSON POST Body:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"grant_type")," (set to ",Object(a.b)("inlineCode",{parentName:"li"},'"refresh_token"'),")"),Object(a.b)("li",{parentName:"ul"},Object(a.b)("inlineCode",{parentName:"li"},"refresh_token"))),Object(a.b)("p",null,"The following open-source token swap endpoint code can be used for your website:"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",Object(r.a)({parentName:"li"},{href:"https://github.com/rollersteaam/spotify-token-swap-php"}),"rollersteaam/spotify-token-swap-php")),Object(a.b)("li",{parentName:"ul"},Object(a.b)("a",Object(r.a)({parentName:"li"},{href:"https://github.com/simontaen/SpotifyTokenSwap"}),"simontaen/SpotifyTokenSwap"))),Object(a.b)("h2",{id:"remarks"},"Remarks"),Object(a.b)("p",null,"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."),Object(a.b)("p",null,"Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail."),Object(a.b)("p",null,"If you did not use the WebAPIFactory or you provided a ",Object(a.b)("inlineCode",{parentName:"p"},"serverUri")," different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your ",Object(a.b)("inlineCode",{parentName:"p"},"serverUri")," (such as changing the areas which refer to ",Object(a.b)("inlineCode",{parentName:"p"},"localhost:4002")," if you had changed ",Object(a.b)("inlineCode",{parentName:"p"},"serverUri")," from its default), otherwise it will never reach your new ",Object(a.b)("inlineCode",{parentName:"p"},"serverUri"),"."))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(0),o=n.n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=o.a.createContext({}),l=function(e){var t=o.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s({},t,{},e)),n},u=function(e){var t=l(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},h=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(n),h=r,d=u["".concat(i,".").concat(h)]||u[h]||b[h]||a;return n?o.a.createElement(d,s({ref:t},p,{components:n})):o.a.createElement(d,s({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:r,i[1]=s;for(var p=2;p