diff --git a/031dc046.7dbba755.js b/031dc046.090aca02.js similarity index 98% rename from 031dc046.7dbba755.js rename to 031dc046.090aca02.js index b2725b67..a7042498 100644 --- a/031dc046.7dbba755.js +++ b/031dc046.090aca02.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{132:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return c})),r.d(t,"metadata",(function(){return s})),r.d(t,"rightToc",(function(){return l})),r.d(t,"default",(function(){return u}));var n=r(2),o=r(9),a=(r(0),r(187)),i=r(189),c={id:"example_blazor_wasm",title:"Blazor WASM"},s={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:"dependabot-preview[bot]",lastUpdatedAt:1603439315,sidebar:"docs",previous:{title:"ASP.NET",permalink:"/SpotifyAPI-NET/docs/next/example_asp"},next:{title:"Blazor ServerSide",permalink:"/SpotifyAPI-NET/docs/next/example_blazor"}},l=[{value:"Description",id:"description",children:[]},{value:"Run it",id:"run-it",children:[]}],p={rightToc:l};function u(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)("img",{alt:"BlazorWASM Spotify Example",src:Object(i.a)("img/blazorwasm_homepage.png")}),Object(a.b)("img",{alt:"BlazorWASM Spotify Example - network tools",src:Object(i.a)("img/blazorwasm_network_tools.png")}),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')))}u.isMDXComponent=!0},187:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),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 c(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 l=o.a.createContext({}),p=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},b={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,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),m=n,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||a;return r?o.a.createElement(d,c({ref:t},l,{components:r})):o.a.createElement(d,c({ref:t},l))}));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 c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l1?arguments[1]:void 0,t.length)),n=String(e);return i?i.call(t,n,r):t.slice(r,r+n.length)===n}})},191:function(e,t,r){var n=r(69),o=r(23);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(e))}},192:function(e,t,r){var n=r(3)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(o){}}return!0}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{132:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return c})),r.d(t,"metadata",(function(){return s})),r.d(t,"rightToc",(function(){return l})),r.d(t,"default",(function(){return u}));var n=r(2),o=r(9),a=(r(0),r(187)),i=r(189),c={id:"example_blazor_wasm",title:"Blazor WASM"},s={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:"dependabot-preview[bot]",lastUpdatedAt:1604184624,sidebar:"docs",previous:{title:"ASP.NET",permalink:"/SpotifyAPI-NET/docs/next/example_asp"},next:{title:"Blazor ServerSide",permalink:"/SpotifyAPI-NET/docs/next/example_blazor"}},l=[{value:"Description",id:"description",children:[]},{value:"Run it",id:"run-it",children:[]}],p={rightToc:l};function u(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)("img",{alt:"BlazorWASM Spotify Example",src:Object(i.a)("img/blazorwasm_homepage.png")}),Object(a.b)("img",{alt:"BlazorWASM Spotify Example - network tools",src:Object(i.a)("img/blazorwasm_network_tools.png")}),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')))}u.isMDXComponent=!0},187:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),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 c(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 l=o.a.createContext({}),p=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},b={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,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),m=n,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||a;return r?o.a.createElement(d,c({ref:t},l,{components:r})):o.a.createElement(d,c({ref:t},l))}));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 c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l1?arguments[1]:void 0,t.length)),n=String(e);return i?i.call(t,n,r):t.slice(r,r+n.length)===n}})},191:function(e,t,r){var n=r(69),o=r(23);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(e))}},192:function(e,t,r){var n=r(3)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(o){}}return!0}}}]); \ No newline at end of file diff --git a/0951e901.85a4968e.js b/0951e901.f19c304d.js similarity index 99% rename from 0951e901.85a4968e.js rename to 0951e901.f19c304d.js index 68eb47b4..127e8c71 100644 --- a/0951e901.85a4968e.js +++ b/0951e901.f19c304d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{133:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return l})),a.d(t,"metadata",(function(){return c})),a.d(t,"rightToc",(function(){return p})),a.d(t,"default",(function(){return o}));var n=a(2),b=a(9),r=(a(0),a(187)),l={id:"player",title:"Player",sidebar_label:"Player"},c={id:"version-5.1.1/web/player",title:"Player",description:"GetDevices",source:"@site/versioned_docs/version-5.1.1/web/player.md",permalink:"/SpotifyAPI-NET/docs/web/player",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/player.md",version:"5.1.1",lastUpdatedBy:"dependabot-preview[bot]",lastUpdatedAt:1603439315,sidebar_label:"Player",sidebar:"version-5.1.1/someSidebar",previous:{title:"Personalization",permalink:"/SpotifyAPI-NET/docs/web/personalization"},next:{title:"Playlists",permalink:"/SpotifyAPI-NET/docs/web/playlists"}},p=[{value:"GetDevices",id:"getdevices",children:[]},{value:"GetPlayback",id:"getplayback",children:[]},{value:"GetPlayingTrack",id:"getplayingtrack",children:[]},{value:"TransferPlayback",id:"transferplayback",children:[]},{value:"ResumePlayback",id:"resumeplayback",children:[]},{value:"PausePlayback",id:"pauseplayback",children:[]},{value:"SkipPlaybackToNext",id:"skipplaybacktonext",children:[]},{value:"SkipPlaybackToPrevious",id:"skipplaybacktoprevious",children:[]},{value:"SeekPlayback",id:"seekplayback",children:[]},{value:"SetRepeatMode",id:"setrepeatmode",children:[]},{value:"SetVolume",id:"setvolume",children:[]},{value:"SetShuffle",id:"setshuffle",children:[]},{value:"AddToQueue",id:"addtoqueue",children:[]}],i={rightToc:p};function o(e){var t=e.components,a=Object(b.a)(e,["components"]);return Object(r.b)("wrapper",Object(n.a)({},i,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"getdevices"},"GetDevices"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Get information about a user\u2019s available devices.")),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)("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"}),"AvailabeDevices devices = _spotify.GetDevices();\ndevices.Devices.ForEach(device => 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},187: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 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},187: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