diff --git a/031dc046.3010d1aa.js b/031dc046.3010d1aa.js new file mode 100644 index 00000000..139977d4 --- /dev/null +++ b/031dc046.3010d1aa.js @@ -0,0 +1 @@ +(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/0951e901.f78795c5.js b/0951e901.f78795c5.js new file mode 100644 index 00000000..b98694e2 --- /dev/null +++ b/0951e901.f78795c5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{151: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}}]); \ No newline at end of file diff --git a/1.b01500b4.js b/1.b01500b4.js new file mode 100644 index 00000000..cedbcdd7 --- /dev/null +++ b/1.b01500b4.js @@ -0,0 +1,2 @@ +/*! 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/1.b01500b4.js.LICENSE.txt b/1.b01500b4.js.LICENSE.txt new file mode 100644 index 00000000..bae6dd8e --- /dev/null +++ b/1.b01500b4.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2017 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/10f76bbd.13b7a611.js b/10f76bbd.13b7a611.js new file mode 100644 index 00000000..6a3aad4d --- /dev/null +++ b/10f76bbd.13b7a611.js @@ -0,0 +1 @@ +(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\n {\n auth.Stop();\n Token token = await auth.ExchangeCode(payload.Code);\n SpotifyWebAPI api = new SpotifyWebAPI()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken\n };\n // Do requests with API client\n };\n auth.Start(); // Starts an internal HTTP Server\n auth.OpenBrowser();\n}\n')),Object(a.b)("h2",{id:"token-refresh"},"Token Refresh"),Object(a.b)("p",null,"Once the ",Object(a.b)("inlineCode",{parentName:"p"},"AccessToken")," is expired, you can use your ",Object(a.b)("inlineCode",{parentName:"p"},"RefreshToken")," to get a new one.\nIn this procedure, no HTTP Server is needed in the background and a single HTTP Request is made."),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),"// Auth code from above\n\nif(token.IsExpired())\n{\n Token newToken = await auth.RefreshToken(token.RefreshToken);\n api.AccessToken = newToken.AccessToken\n api.TokenType = newToken.TokenType\n}\n")))}p.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f}));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 c(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 u=o.a.createContext({}),p=function(e){var t=o.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},d=function(e){var t=p(e.components);return o.a.createElement(u.Provider,{value:t},e.children)},l={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,u=s(e,["components","mdxType","originalType","parentName"]),d=p(n),h=r,f=d["".concat(i,".").concat(h)]||d[h]||l[h]||a;return n?o.a.createElement(f,c({ref:t},u,{components:n})):o.a.createElement(f,c({ref:t},u))}));function f(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 c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var u=2;u{let n=[],c=[];function i(){const i=function(){let e=0,t=null;for(n=document.getElementsByClassName("anchor");e=0&&r<=a&&(t=l),e+=1}return t}();if(i){let a=0,n=!1;for(c=document.getElementsByClassName(e);a{document.removeEventListener("scroll",i),document.removeEventListener("resize",i)}})},E=a(153),g=a.n(E),u=a(91),v=a.n(u);function p({headings:e}){return d("table-of-contents__link","table-of-contents__link--active",100),l.a.createElement("div",{className:"col col--3"},l.a.createElement("div",{className:v.a.tableOfContents},l.a.createElement(h,{headings:e})))}function h({headings:e,isChild:t}){return e.length?l.a.createElement("ul",{className:t?"":"table-of-contents table-of-contents__left-border"},e.map(e=>l.a.createElement("li",{key:e.id},l.a.createElement("a",{href:"#"+e.id,className:"table-of-contents__link",dangerouslySetInnerHTML:{__html:e.value}}),l.a.createElement(h,{isChild:!0,headings:e.children})))):null}t.default=function(e){const{siteConfig:t={}}=Object(i.a)(),{url:a,title:n}=t,{content:o}=e,{metadata:d}=o,{description:E,title:u,permalink:h,editUrl:_,lastUpdatedAt:f,lastUpdatedBy:N,version:b}=d,{frontMatter:{image:w,keywords:k,hide_title:y,hide_table_of_contents:C}}=o,x=u?`${u} | ${n}`:n;let L=a+Object(m.a)(w);return Object(c.a)(w)||(L=w),l.a.createElement(l.a.Fragment,null,l.a.createElement(r.a,null,l.a.createElement("title",null,x),l.a.createElement("meta",{property:"og:title",content:x}),E&&l.a.createElement("meta",{name:"description",content:E}),E&&l.a.createElement("meta",{property:"og:description",content:E}),k&&k.length&&l.a.createElement("meta",{name:"keywords",content:k.join(",")}),w&&l.a.createElement("meta",{property:"og:image",content:L}),w&&l.a.createElement("meta",{property:"twitter:image",content:L}),w&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+u}),h&&l.a.createElement("meta",{property:"og:url",content:a+h}),h&&l.a.createElement("link",{rel:"canonical",href:a+h})),l.a.createElement("div",{className:g()("container padding-vert--lg",v.a.docItemWrapper)},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:g()("col",{[v.a.docItemCol]:!C})},l.a.createElement("div",{className:v.a.docItemContainer},l.a.createElement("article",null,b&&l.a.createElement("div",null,l.a.createElement("span",{className:"badge badge--secondary"},"Version: ",b)),!y&&l.a.createElement("header",null,l.a.createElement("h1",{className:v.a.docTitle},u)),l.a.createElement("div",{className:"markdown"},l.a.createElement(o,null))),(_||f||N)&&l.a.createElement("div",{className:"margin-vert--xl"},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col"},_&&l.a.createElement("a",{href:_,target:"_blank",rel:"noreferrer noopener"},l.a.createElement("svg",{fill:"currentColor",height:"1.2em",width:"1.2em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 40 40",style:{marginRight:"0.3em",verticalAlign:"sub"}},l.a.createElement("g",null,l.a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"}))),"Edit this page")),(f||N)&&l.a.createElement("div",{className:"col text--right"},l.a.createElement("em",null,l.a.createElement("small",null,"Last updated"," ",f&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("time",{dateTime:new Date(1e3*f).toISOString(),className:v.a.docLastUpdatedAt},new Date(1e3*f).toLocaleDateString()),N&&" "),N&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,N)),!1))))),l.a.createElement("div",{className:"margin-vert--lg"},l.a.createElement(s,{metadata:d})))),!C&&o.rightToc&&l.a.createElement(p,{headings:o.rightToc}))))}}}]); \ No newline at end of file diff --git a/18116e9d.fb5bea49.js b/18116e9d.fb5bea49.js new file mode 100644 index 00000000..2b81320c --- /dev/null +++ b/18116e9d.fb5bea49.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{102:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return i})),a.d(t,"metadata",(function(){return b})),a.d(t,"rightToc",(function(){return c})),a.d(t,"default",(function(){return s}));var o=a(2),r=a(6),n=(a(0),a(151)),i={id:"home",title:"SpotifyAPI-NET",sidebar_label:"Home"},b={id:"version-5.1.1/home",title:"SpotifyAPI-NET",description:"This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API",source:"@site/versioned_docs/version-5.1.1/home.md",permalink:"/docs/home",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/home.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar_label:"Home",sidebar:"version-5.1.1/someSidebar",next:{title:"Getting Started",permalink:"/docs/web/getting_started"}},c=[{value:"Installing",id:"installing",children:[]},{value:"Getting Started",id:"getting-started",children:[]},{value:"Projects",id:"projects",children:[{value:"lidarr by @lidarr",id:"lidarr-by-lidarr",children:[]},{value:"botframework-solutions by @microsoft",id:"botframework-solutions-by-microsoft",children:[]},{value:"Spytify by @jwallet",id:"spytify-by-jwallet",children:[]},{value:"audio-band by @dsafa",id:"audio-band-by-dsafa",children:[]},{value:"rocksmith-custom-song-toolkit by @catara",id:"rocksmith-custom-song-toolkit-by-catara",children:[]},{value:"Spofy by @eltoncezar",id:"spofy-by-eltoncezar",children:[]},{value:"Toastify by @aleab",id:"toastify-by-aleab",children:[]},{value:"Spotify Oculus by @CaptainMorgs",id:"spotify-oculus-by-captainmorgs",children:[]},{value:"Songify by @Inzaniity",id:"songify-by-inzaniity",children:[]},{value:"Elite G19s Companion app by @MagicMau",id:"elite-g19s-companion-app-by-magicmau",children:[]},{value:"ARDUINO-Spotify-Remote-Control by @NADER11NDEU",id:"arduino-spotify-remote-control-by-nader11ndeu",children:[]}]}],l={rightToc:c};function s(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(n.b)("wrapper",Object(o.a)({},l,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("p",null,"This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API"),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"Spotify's Web API")," (",Object(n.b)("a",Object(o.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/"}),"link"),")"),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue.\nThe API also provides access to user-related data such as playlists and music saved in a \u201cYour Music\u201d library, subject to user\u2019s authorization.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"SpotifyAPI.Web")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access.")),Object(n.b)("p",null,Object(n.b)("strong",{parentName:"p"},"SpotifyAPI.Web.Auth")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A library providing C# implementations of the 3 supported Authentication modes, including ",Object(n.b)("inlineCode",{parentName:"p"},"ImplicitGrantAuth"),", ",Object(n.b)("inlineCode",{parentName:"p"},"AuthorizationCodeAuth")," and ",Object(n.b)("inlineCode",{parentName:"p"},"CredentialsAuth"))),Object(n.b)("hr",null),Object(n.b)("h2",{id:"installing"},"Installing"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Via NuGet Package:")),Object(n.b)("pre",null,Object(n.b)("code",Object(o.a)({parentName:"pre"},{className:"language-bash"}),"Install-Package SpotifyAPI.Web -Version 5.1.1\nInstall-Package SpotifyAPI.Web.Auth -Version 5.1.1\n")),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Download the latest binaries on the ",Object(n.b)("a",Object(o.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/releases"}),"GitHub Release Page")," and add it to your Project"),Object(n.b)("li",{parentName:"ul"},"Clone the Repo and build the project yourself.")),Object(n.b)("hr",null),Object(n.b)("h2",{id:"getting-started"},"Getting Started"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("a",Object(o.a)({parentName:"li"},{href:"/docs/web/getting_started"}),"SpotifyAPI.Web")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("a",Object(o.a)({parentName:"li"},{href:"auth/getting_started"}),"SpotifyAPI.Web.Auth"))),Object(n.b)("h2",{id:"projects"},"Projects"),Object(n.b)("h3",{id:"lidarr-by-lidarr"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/lidarr/Lidarr"}),"lidarr")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/lidarr"}),"@lidarr")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Looks and smells like Sonarr but made for music.")),Object(n.b)("h3",{id:"botframework-solutions-by-microsoft"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/microsoft/botframework-solutions"}),"botframework-solutions")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/microsoft"}),"@microsoft")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework")),Object(n.b)("h3",{id:"spytify-by-jwallet"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/jwallet/spy-spotify"}),"Spytify")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/jwallet"}),"@jwallet")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files")),Object(n.b)("h3",{id:"audio-band-by-dsafa"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/dsafa/audio-band"}),"audio-band")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/dsafa"}),"@dsafa")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Display and control songs from the Windows taskbar")),Object(n.b)("h3",{id:"rocksmith-custom-song-toolkit-by-catara"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/catara/rocksmith-custom-song-toolkit"}),"rocksmith-custom-song-toolkit")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/catara"}),"@catara")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"MASS Manipulation of Rocksmith DLC Library")),Object(n.b)("h3",{id:"spofy-by-eltoncezar"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/eltoncezar/Spofy"}),"Spofy")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/eltoncezar"}),"@eltoncezar")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A Spotify mini player and notifier for Windows")),Object(n.b)("h3",{id:"toastify-by-aleab"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/aleab/toastify"}),"Toastify")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/aleab"}),"@aleab")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Toastify adds global hotkeys and toast notifications to Spotify"),Object(n.b)("p",{parentName:"blockquote"},Object(n.b)("em",{parentName:"p"},"Forked from ",Object(n.b)("a",Object(o.a)({parentName:"em"},{href:"https://github.com/nachmore/toastify"}),"nachmore/toastify")))),Object(n.b)("h3",{id:"spotify-oculus-by-captainmorgs"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/CaptainMorgs/spotify-oculus-release"}),"Spotify Oculus")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/CaptainMorgs"}),"@CaptainMorgs")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Unity project for interacting with Spotify in virtual reality for the Oculus Rift.")),Object(n.b)("h3",{id:"songify-by-inzaniity"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/Inzaniity/Songify"}),"Songify")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/Inzaniity"}),"@Inzaniity")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"A simple tool that gets the current track from Spotify, YouTube and Nightbot.")),Object(n.b)("h3",{id:"elite-g19s-companion-app-by-magicmau"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://forums.frontier.co.uk/threads/elite-g19s-companion-app-with-simulated-space-traffic-control.226782/"}),"Elite G19s Companion app")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/MagicMau"}),"@MagicMau")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.")),Object(n.b)("h3",{id:"arduino-spotify-remote-control-by-nader11ndeu"},Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/NADER11NDEU/ARDUINO-Spotify-Remote-Control"}),"ARDUINO-Spotify-Remote-Control")," by ",Object(n.b)("a",Object(o.a)({parentName:"h3"},{href:"https://github.com/NADER11NDEU"}),"@NADER11NDEU")),Object(n.b)("blockquote",null,Object(n.b)("p",{parentName:"blockquote"},"Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.")))}s.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return h}));var o=a(0),r=a.n(o);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function b(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):b({},t,{},e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(o.forwardRef)((function(e,t){var a=e.components,o=e.mdxType,n=e.originalType,i=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),p=s(a),d=o,h=p["".concat(i,".").concat(d)]||p[d]||u[d]||n;return a?r.a.createElement(h,b({ref:t},l,{components:a})):r.a.createElement(h,b({ref:t},l))}));function h(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var n=a.length,i=new Array(n);i[0]=d;var b={};for(var c in t)hasOwnProperty.call(t,c)&&(b[c]=t[c]);b.originalType=e,b.mdxType="string"==typeof e?e:o,i[1]=b;for(var l=2;l HandleRetry(IRequest request, IResponse response, IRetryHandler.RetryFunc retry)\n {\n // request is the sent request and response the received response, obviously?\n\n // don't retry:\n return response;\n\n // retry once\n var newResponse = retry(request);\n return newResponse;\n\n // use retry as often as you want, make sure to return a response\n }\n}\n")),Object(o.b)("h2",{id:"simpleretryhandler"},"SimpleRetryHandler"),Object(o.b)("p",null,"A ",Object(o.b)("inlineCode",{parentName:"p"},"SimpleRetryHandler")," is included, which contains the following retry logic:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Retries the (configurable) status codes: 500, 502, 503 and 429"),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"RetryAfter")," - specifies the delay between retried calls"),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"RetryTimes")," - specifies the maxiumum amount of performed retries per call"),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"TooManyRequestsConsumesARetry"),' - Whether a failure of type "Too Many Requests" should use up one of the retry attempts.')),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"var config = SpotifyClientConfig\n .CreateDefault()\n .WithRetryHandler(new SimpleRetryHandler() { RetryAfter = TimeSpan.FromSeconds(1) });\n\nvar spotify = new SpotifyClient(config);\n")))}p.isMDXComponent=!0},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));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 s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},y=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=p(r),y=n,b=u["".concat(i,".").concat(y)]||u[y]||d[y]||o;return r?a.a.createElement(b,l({ref:t},s,{components:r})):a.a.createElement(b,l({ref:t},s))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=y;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 s=2;s{e.preventDefault(),e.target.blur(),b(e=>!e)});switch(u){case"category":return i.length>0&&r.a.createElement("li",{className:d()("menu__list-item",{"menu__list-item--collapsed":p}),key:s},r.a.createElement("a",Object(m.a)({className:d()("menu__link",{"menu__link--sublist":a,"menu__link--active":a&&!e.collapsed}),href:"#!",onClick:a?v:void 0},c),s),r.a.createElement("ul",{className:"menu__list"},i.map(e=>r.a.createElement(N,{tabIndex:p?"-1":"0",key:e.label,item:e,onItemClick:t,collapsible:a,activePath:l}))));case"link":default:return r.a.createElement("li",{className:"menu__list-item",key:s},r.a.createElement(g.a,Object(m.a)({className:d()("menu__link",{"menu__link--active":o===l}),to:o},Object(h.a)(o)?{isNavLink:!0,exact:!0,onClick:t}:{target:"_blank",rel:"noreferrer noopener"},c),s))}}var O=function(e){const[t,a]=Object(n.useState)(!1),{siteConfig:{themeConfig:{navbar:{title:l,hideOnScroll:i=!1}={}}}={},isClient:o}=Object(c.a)(),{logoLink:s,logoLinkProps:u,logoImageUrl:h,logoAlt:v}=Object(f.a)(),{isAnnouncementBarClosed:O}=Object(p.a)(),{scrollY:_}=Object(E.a)(),{docsSidebars:k,path:w,sidebar:j,sidebarCollapsible:C}=e;if(Object(b.a)(t),!j)return null;const x=k[j];if(!x)throw new Error(`Cannot find the sidebar "${j}" in the sidebar config!`);return C&&x.forEach(e=>function e(t,a){const{items:n,href:r,type:l}=t;switch(l){case"category":{const r=n.map(t=>e(t,a)).filter(e=>e).length>0;return t.collapsed=!r,r}case"link":default:return r===a}}(e,w)),r.a.createElement("div",{className:d()(y.a.sidebar,{[y.a.sidebarWithHideableNavbar]:i})},i&&r.a.createElement(g.a,Object(m.a)({tabIndex:"-1",className:y.a.sidebarLogo,to:s},u),null!=h&&r.a.createElement("img",{key:o,src:h,alt:v}),null!=l&&r.a.createElement("strong",null,l)),r.a.createElement("div",{className:d()("menu","menu--responsive",y.a.menu,{"menu--show":t,[y.a.menuWithAnnouncementBar]:!O&&0===_})},r.a.createElement("button",{"aria-label":t?"Close Menu":"Open Menu","aria-haspopup":"true",className:"button button--secondary button--sm menu__button",type:"button",onClick:()=>{a(!t)}},t?r.a.createElement("span",{className:d()(y.a.sidebarMenuIcon,y.a.sidebarMenuCloseIcon)},"\xd7"):r.a.createElement("svg",{"aria-label":"Menu",className:y.a.sidebarMenuIcon,xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 32 32",role:"img",focusable:"false"},r.a.createElement("title",null,"Menu"),r.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),r.a.createElement("ul",{className:"menu__list"},x.map(e=>r.a.createElement(N,{key:e.label,item:e,onItemClick:e=>{e.target.blur(),a(!1)},collapsible:C,activePath:w})))))},_=a(162),k=(a(106),a(107)),w=a.n(k);var j=e=>function({id:t,...a}){const{siteConfig:{themeConfig:{navbar:{hideOnScroll:n=!1}={}}={}}={}}=Object(c.a)();return t?r.a.createElement(e,a,r.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:d()("anchor",{[w.a.enhancedAnchor]:!n}),id:t}),a.children,r.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+t,title:"Direct link to heading"},"#")):r.a.createElement(e,a)},C=a(108),x=a.n(C),P={code:e=>{const{children:t}=e;return"string"==typeof t?r.a.createElement(_.a,e):t},a:e=>/\.[^./]+$/.test(e.href)?r.a.createElement("a",e):r.a.createElement(g.a,e),pre:e=>r.a.createElement("div",Object(m.a)({className:x.a.mdxCodeBlock},e)),h1:j("h1"),h2:j("h2"),h3:j("h3"),h4:j("h4"),h5:j("h5"),h6:j("h6")},I=a(166),S=a(169),M=a(109),L=a.n(M);t.default=function(e){const{route:t,docsMetadata:a,location:n,content:m}=e,{permalinkToSidebar:u,docsSidebars:d,version:p,isHomePage:b,homePagePath:f}=a,E=b?{}:t.routes.find(e=>Object(S.a)(n.pathname,e))||{},g=b?m.metadata.sidebar:u[E.path],{siteConfig:{themeConfig:{sidebarCollapsible:h=!0}={}}={},isClient:v}=Object(c.a)();return b||0!==Object.keys(E).length?r.a.createElement(o.a,{version:p,key:v},r.a.createElement("div",{className:L.a.docPage},g&&r.a.createElement("div",{className:L.a.docSidebarContainer},r.a.createElement(O,{docsSidebars:d,path:b?f:E.path,sidebar:g,sidebarCollapsible:h})),r.a.createElement("main",{className:L.a.docMainContainer},r.a.createElement(l.a,{components:P},b?r.a.createElement(s.default,{content:m}):Object(i.a)(t.routes))))):r.a.createElement(I.default,e)}},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return b}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(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 i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),m=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},u=function(e){var t=m(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=m(a),p=n,b=u["".concat(c,".").concat(p)]||u[p]||d[p]||l;return a?r.a.createElement(b,i({ref:t},s,{components:a})):r.a.createElement(b,i({ref:t},s))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,c=new Array(l);c[0]=p;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var s=2;s{let n=[],c=[];function i(){const i=function(){let e=0,t=null;for(n=document.getElementsByClassName("anchor");e=0&&l<=a&&(t=r),e+=1}return t}();if(i){let a=0,n=!1;for(c=document.getElementsByClassName(e);a{document.removeEventListener("scroll",i),document.removeEventListener("resize",i)}})},d=a(153),p=a.n(d),b=a(91),f=a.n(b);function E({headings:e}){return u("table-of-contents__link","table-of-contents__link--active",100),r.a.createElement("div",{className:"col col--3"},r.a.createElement("div",{className:f.a.tableOfContents},r.a.createElement(g,{headings:e})))}function g({headings:e,isChild:t}){return e.length?r.a.createElement("ul",{className:t?"":"table-of-contents table-of-contents__left-border"},e.map(e=>r.a.createElement("li",{key:e.id},r.a.createElement("a",{href:"#"+e.id,className:"table-of-contents__link",dangerouslySetInnerHTML:{__html:e.value}}),r.a.createElement(g,{isChild:!0,headings:e.children})))):null}t.default=function(e){const{siteConfig:t={}}=Object(i.a)(),{url:a,title:n}=t,{content:s}=e,{metadata:u}=s,{description:d,title:b,permalink:g,editUrl:h,lastUpdatedAt:v,lastUpdatedBy:y,version:N}=u,{frontMatter:{image:O,keywords:_,hide_title:k,hide_table_of_contents:w}}=s,j=b?`${b} | ${n}`:n;let C=a+Object(o.a)(O);return Object(c.a)(O)||(C=O),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,r.a.createElement("title",null,j),r.a.createElement("meta",{property:"og:title",content:j}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),_&&_.length&&r.a.createElement("meta",{name:"keywords",content:_.join(",")}),O&&r.a.createElement("meta",{property:"og:image",content:C}),O&&r.a.createElement("meta",{property:"twitter:image",content:C}),O&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+b}),g&&r.a.createElement("meta",{property:"og:url",content:a+g}),g&&r.a.createElement("link",{rel:"canonical",href:a+g})),r.a.createElement("div",{className:p()("container padding-vert--lg",f.a.docItemWrapper)},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:p()("col",{[f.a.docItemCol]:!w})},r.a.createElement("div",{className:f.a.docItemContainer},r.a.createElement("article",null,N&&r.a.createElement("div",null,r.a.createElement("span",{className:"badge badge--secondary"},"Version: ",N)),!k&&r.a.createElement("header",null,r.a.createElement("h1",{className:f.a.docTitle},b)),r.a.createElement("div",{className:"markdown"},r.a.createElement(s,null))),(h||v||y)&&r.a.createElement("div",{className:"margin-vert--xl"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col"},h&&r.a.createElement("a",{href:h,target:"_blank",rel:"noreferrer noopener"},r.a.createElement("svg",{fill:"currentColor",height:"1.2em",width:"1.2em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 40 40",style:{marginRight:"0.3em",verticalAlign:"sub"}},r.a.createElement("g",null,r.a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"}))),"Edit this page")),(v||y)&&r.a.createElement("div",{className:"col text--right"},r.a.createElement("em",null,r.a.createElement("small",null,"Last updated"," ",v&&r.a.createElement(r.a.Fragment,null,"on"," ",r.a.createElement("time",{dateTime:new Date(1e3*v).toISOString(),className:f.a.docLastUpdatedAt},new Date(1e3*v).toLocaleDateString()),y&&" "),y&&r.a.createElement(r.a.Fragment,null,"by ",r.a.createElement("strong",null,y)),!1))))),r.a.createElement("div",{className:"margin-vert--lg"},r.a.createElement(m,{metadata:u})))),!w&&s.rightToc&&r.a.createElement(E,{headings:s.rightToc}))))}}}]); \ No newline at end of file diff --git a/1f220079.4a9deec3.js b/1f220079.4a9deec3.js new file mode 100644 index 00000000..370da2c2 --- /dev/null +++ b/1f220079.4a9deec3.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{110:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return p}));var r=n(2),i=n(6),a=(n(0),n(151)),o={id:"utilities",title:"Utilities",sidebar_label:"Utilities"},c={id:"version-5.1.1/web/utilities",title:"Utilities",description:"Paging-Methods",source:"@site/versioned_docs/version-5.1.1/web/utilities.md",permalink:"/docs/web/utilities",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/utilities.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar_label:"Utilities",sidebar:"version-5.1.1/someSidebar",previous:{title:"Tracks",permalink:"/docs/web/tracks"},next:{title:"Getting Started",permalink:"/docs/auth/getting_started"}},l=[{value:"Paging-Methods",id:"paging-methods",children:[]}],s={rightToc:l};function p(e){var t=e.components,n=Object(i.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"paging-methods"},"Paging-Methods"),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"SpotifyWebAPI")," features two paging-helper Methods, ",Object(a.b)("inlineCode",{parentName:"p"},"GetNextPage(Paging page)")," and ",Object(a.b)("inlineCode",{parentName:"p"},"GetPreviousPage(Paging page)"),".\nBoth are an easy way to receive the next/previous page of a Paging-Object."),Object(a.b)("p",null,"Sample:"),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'var playlistTracks = _spotify.GetPlaylistTracks("1122095781", "4EcNf2l8rXInbJOf3tQdgU", "", 50);\nwhile (true)\n{\n Console.WriteLine(playlistTracks.Items.Count);\n if (!playlistTracks.HasNextPage())\n break;\n playlistTracks = _spotify.GetNextPage(playlistTracks);\n}\n')))}p.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var r=n(0),i=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 o(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 c(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=i.a.createContext({}),p=function(e){var t=i.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return i.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,f=u["".concat(o,".").concat(d)]||u[d]||b[d]||a;return n?i.a.createElement(f,c({ref:t},s,{components:n})):i.a.createElement(f,c({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var s=2;s{const{siteConfig:{themeConfig:{disableDarkMode:e}}={}}=Object(o.a)(),[t,a]=Object(n.useState)("undefined"!=typeof document?document.documentElement.getAttribute("data-theme"):i),r=Object(n.useCallback)(e=>{try{localStorage.setItem("theme",e)}catch(t){console.error(t)}},[a]),c=Object(n.useCallback)(()=>{a(i),r(i)},[]),l=Object(n.useCallback)(()=>{a(u),r(u)},[]);return Object(n.useEffect)(()=>{document.documentElement.setAttribute("data-theme",t)},[t]),Object(n.useEffect)(()=>{if(!e)try{const e=localStorage.getItem("theme");null!==e&&a(e)}catch(t){console.error(t)}},[a]),Object(n.useEffect)(()=>{e||window.matchMedia("(prefers-color-scheme: dark)").addListener(({matches:e})=>{a(e?u:i)})},[]),{isDarkTheme:t===u,setLightTheme:c,setDarkTheme:l}},d=a(157);var h=function(e){const{isDarkTheme:t,setLightTheme:a,setDarkTheme:n}=m();return r.a.createElement(d.a.Provider,{value:{isDarkTheme:t,setLightTheme:a,setDarkTheme:n}},e.children)};var f=()=>{const[e,t]=Object(n.useState)({}),a=Object(n.useCallback)((e,t)=>{try{localStorage.setItem("docusaurus.tab."+e,t)}catch(a){console.error(a)}},[]);return Object(n.useEffect)(()=>{try{const e={};for(let t=0;t{t(t=>({...t,[e]:n})),a(e,n)}}},b=a(158);var v=function(e){const{tabGroupChoices:t,setTabGroupChoices:a}=f();return r.a.createElement(b.a.Provider,{value:{tabGroupChoices:t,setTabGroupChoices:a}},e.children)},g=a(167);var p=()=>{const{siteConfig:{themeConfig:{announcementBar:{id:e}={}}}={}}=Object(o.a)(),[t,a]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{if(!e)return;const t=localStorage.getItem("docusaurus.announcement.id"),n=e!==t;localStorage.setItem("docusaurus.announcement.id",e),n&&localStorage.setItem("docusaurus.announcement.dismiss",!1),(n||"false"===localStorage.getItem("docusaurus.announcement.dismiss"))&&a(!1)},[]),{isAnnouncementBarClosed:t,closeAnnouncementBar:()=>{localStorage.setItem("docusaurus.announcement.dismiss",!0),a(!0)}}};var k=function(e){const{isAnnouncementBarClosed:t,closeAnnouncementBar:a}=p();return r.a.createElement(g.a.Provider,{value:{isAnnouncementBarClosed:t,closeAnnouncementBar:a}},e.children)},E=a(168),_=a(93),O=a.n(_);var y=function(){const{siteConfig:{themeConfig:{announcementBar:e={}}}={}}=Object(o.a)(),{content:t,backgroundColor:a,textColor:n}=e,{isAnnouncementBarClosed:c,closeAnnouncementBar:l}=Object(E.a)();return!t||c?null:r.a.createElement("div",{className:O.a.announcementBar,style:{backgroundColor:a,color:n},role:"banner"},r.a.createElement("div",{className:O.a.announcementBarContent,dangerouslySetInnerHTML:{__html:t}}),r.a.createElement("button",{type:"button",className:O.a.announcementBarClose,onClick:l,"aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")))},j=a(2),C=a(153),N=a.n(C),w=a(155),T=()=>null,S=a(176),B=a.n(S),L=a(94),M=a.n(L);const x=()=>r.a.createElement("span",{className:N()(M.a.toggle,M.a.moon)}),D=()=>r.a.createElement("span",{className:N()(M.a.toggle,M.a.sun)});var I=function(e){const{isClient:t}=Object(o.a)();return r.a.createElement(B.a,Object(j.a)({disabled:!t,icons:{checked:r.a.createElement(x,null),unchecked:r.a.createElement(D,null)}},e))},P=a(159),A=a(169);var X=function(e){const[t,a]=Object(n.useState)(e);return Object(n.useEffect)(()=>{const e=()=>a(window.location.hash);return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[t,a]},F=a(170);var H=e=>{const[t,a]=Object(n.useState)(!0),[r,c]=Object(n.useState)(!1),[l,o]=Object(n.useState)(0),[s,i]=Object(n.useState)(0),u=Object(n.useCallback)(e=>{null!==e&&i(e.getBoundingClientRect().height)},[]),m=Object(A.b)(),[d,h]=X(m.hash);return Object(F.a)(({scrollY:t})=>{if(!e)return;if(0===t&&a(!0),t=l?a(!1):t+i{e&&(a(!0),h(m.hash))},[m]),Object(n.useEffect)(()=>{e&&d&&c(!0)},[d]),{navbarRef:u,isNavbarVisible:t}},R=a(171),U=a(172),G=a(95),Y=a.n(G);function V({activeBasePath:e,activeBaseRegex:t,to:a,href:n,label:c,activeClassName:l="navbar__link--active",prependBaseUrlToHref:o,...i}){const u=Object(s.a)(a),m=Object(s.a)(e),d=Object(s.a)(n,!0);return r.a.createElement(w.a,Object(j.a)({},n?{target:"_blank",rel:"noopener noreferrer",href:o?d:n}:{isNavLink:!0,activeClassName:l,to:u,...e||t?{isActive:(e,a)=>t?new RegExp(t).test(a.pathname):a.pathname.startsWith(m)}:null},i),c)}function W({items:e,position:t,className:a,...n}){const c=(e,t=!1)=>N()({"navbar__item navbar__link":!t,dropdown__link:t},e);return e?r.a.createElement("div",{className:N()("navbar__item","dropdown","dropdown--hoverable",{"dropdown--left":"left"===t,"dropdown--right":"right"===t})},r.a.createElement(V,Object(j.a)({className:c(a)},n,{onClick:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&e.target.parentNode.classList.toggle("dropdown--show")}}),n.label),r.a.createElement("ul",{className:"dropdown__menu"},e.map(({className:e,...t},a)=>r.a.createElement("li",{key:a},r.a.createElement(V,Object(j.a)({activeClassName:"dropdown__link--active",className:c(e,!0)},t)))))):r.a.createElement(V,Object(j.a)({className:c(a)},n))}function J({items:e,position:t,className:a,...n}){const c=(e,t=!1)=>N()("menu__link",{"menu__link--sublist":t},e);return e?r.a.createElement("li",{className:"menu__list-item"},r.a.createElement(V,Object(j.a)({className:c(a,!0)},n),n.label),r.a.createElement("ul",{className:"menu__list"},e.map(({className:e,...t},a)=>r.a.createElement("li",{className:"menu__list-item",key:a},r.a.createElement(V,Object(j.a)({activeClassName:"menu__link--active",className:c(e)},t,{onClick:n.onClick})))))):r.a.createElement("li",{className:"menu__list-item"},r.a.createElement(V,Object(j.a)({className:c(a)},n)))}var K=function(){const{siteConfig:{themeConfig:{navbar:{title:e,links:t=[],hideOnScroll:a=!1}={},disableDarkMode:c=!1}},isClient:l}=Object(o.a)(),[s,i]=Object(n.useState)(!1),[u,m]=Object(n.useState)(!1),{isDarkTheme:d,setLightTheme:h,setDarkTheme:f}=Object(P.a)(),{navbarRef:b,isNavbarVisible:v}=H(a),{logoLink:g,logoLinkProps:p,logoImageUrl:k,logoAlt:E}=Object(U.a)();Object(R.a)(s);const _=Object(n.useCallback)(()=>{i(!0)},[i]),O=Object(n.useCallback)(()=>{i(!1)},[i]),y=Object(n.useCallback)(e=>e.target.checked?f():h(),[h,f]);return r.a.createElement("nav",{ref:b,className:N()("navbar","navbar--light","navbar--fixed-top",{"navbar-sidebar--show":s,[Y.a.navbarHideable]:a,[Y.a.navbarHidden]:!v})},r.a.createElement("div",{className:"navbar__inner"},r.a.createElement("div",{className:"navbar__items"},null!=t&&0!==t.length&&r.a.createElement("div",{"aria-label":"Navigation bar toggle",className:"navbar__toggle",role:"button",tabIndex:0,onClick:_,onKeyDown:_},r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",role:"img",focusable:"false"},r.a.createElement("title",null,"Menu"),r.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),r.a.createElement(w.a,Object(j.a)({className:"navbar__brand",to:g},p),null!=k&&r.a.createElement("img",{key:l,className:"navbar__logo",src:k,alt:E}),null!=e&&r.a.createElement("strong",{className:N()("navbar__title",{[Y.a.hideLogoText]:u})},e)),t.filter(e=>"left"===e.position).map((e,t)=>r.a.createElement(W,Object(j.a)({},e,{key:t})))),r.a.createElement("div",{className:"navbar__items navbar__items--right"},t.filter(e=>"right"===e.position).map((e,t)=>r.a.createElement(W,Object(j.a)({},e,{key:t}))),!c&&r.a.createElement(I,{className:Y.a.displayOnlyInLargeViewport,"aria-label":"Dark mode toggle",checked:d,onChange:y}),r.a.createElement(T,{handleSearchBarToggle:m,isSearchBarExpanded:u}))),r.a.createElement("div",{role:"presentation",className:"navbar-sidebar__backdrop",onClick:O}),r.a.createElement("div",{className:"navbar-sidebar"},r.a.createElement("div",{className:"navbar-sidebar__brand"},r.a.createElement(w.a,Object(j.a)({className:"navbar__brand",onClick:O,to:g},p),null!=k&&r.a.createElement("img",{key:l,className:"navbar__logo",src:k,alt:E}),null!=e&&r.a.createElement("strong",{className:"navbar__title"},e)),!c&&s&&r.a.createElement(I,{"aria-label":"Dark mode toggle in sidebar",checked:d,onChange:y})),r.a.createElement("div",{className:"navbar-sidebar__items"},r.a.createElement("div",{className:"menu"},r.a.createElement("ul",{className:"menu__list"},t.map((e,t)=>r.a.createElement(J,Object(j.a)({},e,{onClick:O,key:t}))))))))},$=a(96),q=a.n($);function z({to:e,href:t,label:a,prependBaseUrlToHref:n,...c}){const l=Object(s.a)(e),o=Object(s.a)(t,!0);return r.a.createElement(w.a,Object(j.a)({className:"footer__link-item"},t?{target:"_blank",rel:"noopener noreferrer",href:n?o:t}:{to:l},c),a)}const Q=({url:e,alt:t})=>r.a.createElement("img",{className:"footer__logo",alt:t,src:e});var Z=function(){const e=Object(o.a)(),{siteConfig:t={}}=e,{themeConfig:a={}}=t,{footer:n}=a,{copyright:c,links:l=[],logo:i={}}=n||{},u=Object(s.a)(i.src);return n?r.a.createElement("footer",{className:N()("footer",{"footer--dark":"dark"===n.style})},r.a.createElement("div",{className:"container"},l&&l.length>0&&r.a.createElement("div",{className:"row footer__links"},l.map((e,t)=>r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((e,t)=>e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(z,e)))):null))),(i||c)&&r.a.createElement("div",{className:"text--center"},i&&i.src&&r.a.createElement("div",{className:"margin-bottom--sm"},i.href?r.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:q.a.footerLogoLink},r.a.createElement(Q,{alt:i.alt,url:u})):r.a.createElement(Q,{alt:i.alt,url:u})),r.a.createElement("div",{dangerouslySetInnerHTML:{__html:c}})))):null};a(97);t.a=function(e){const{siteConfig:t={}}=Object(o.a)(),{favicon:a,title:n,themeConfig:{image:i},url:u}=t,{children:m,title:d,noFooter:f,description:b,image:g,keywords:p,permalink:E,version:_}=e,O=d?`${d} | ${n}`:n,j=g||i;let C=u+Object(s.a)(j);Object(l.a)(j)||(C=j);const N=Object(s.a)(a);return r.a.createElement(h,null,r.a.createElement(v,null,r.a.createElement(k,null,r.a.createElement(c.a,null,r.a.createElement("html",{lang:"en"}),O&&r.a.createElement("title",null,O),O&&r.a.createElement("meta",{property:"og:title",content:O}),a&&r.a.createElement("link",{rel:"shortcut icon",href:N}),b&&r.a.createElement("meta",{name:"description",content:b}),b&&r.a.createElement("meta",{property:"og:description",content:b}),_&&r.a.createElement("meta",{name:"docsearch:version",content:_}),p&&p.length&&r.a.createElement("meta",{name:"keywords",content:p.join(",")}),j&&r.a.createElement("meta",{property:"og:image",content:C}),j&&r.a.createElement("meta",{property:"twitter:image",content:C}),j&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+O}),E&&r.a.createElement("meta",{property:"og:url",content:u+E}),E&&r.a.createElement("link",{rel:"canonical",href:u+E}),r.a.createElement("meta",{name:"twitter:card",content:"summary_large_image"})),r.a.createElement(y,null),r.a.createElement(K,null),r.a.createElement("div",{className:"main-wrapper"},m),!f&&r.a.createElement(Z,null))))}},167:function(e,t,a){"use strict";var n=a(0);const r=Object(n.createContext)({isAnnouncementBarClosed:!1,closeAnnouncementBar:()=>{}});t.a=r},168:function(e,t,a){"use strict";var n=a(0),r=a(167);t.a=function(){return Object(n.useContext)(r.a)}},169:function(e,t,a){"use strict";var n=a(18);a.d(t,"a",(function(){return n.d})),a.d(t,"b",(function(){return n.e}))},170:function(e,t,a){"use strict";var n=a(0),r=a(36);const c=()=>({scrollX:r.a.canUseDOM?window.pageXOffset:0,scrollY:r.a.canUseDOM?window.pageYOffset:0});t.a=(e,t=[])=>{const[a,r]=Object(n.useState)(c()),l=()=>{const t=c();r(t),e&&e(t)};return Object(n.useEffect)(()=>(window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l,{passive:!0})),t),a}},171:function(e,t,a){"use strict";var n=a(0);t.a=function(e=!0){Object(n.useEffect)(()=>(document.body.style.overflow=e?"hidden":"visible",()=>{document.body.style.overflow="visible"}),[e])}},172:function(e,t,a){"use strict";var n=a(152),r=a(159),c=a(154),l=a(156);t.a=()=>{const{siteConfig:{themeConfig:{navbar:{logo:e={}}={}}}={}}=Object(n.a)(),{isDarkTheme:t}=Object(r.a)(),a=Object(c.a)(e.href||"/");let o={};e.target?o={target:e.target}:Object(l.a)(a)||(o={rel:"noopener noreferrer",target:"_blank"});const s=e.srcDark&&t?e.srcDark:e.src;return{logoLink:a,logoLinkProps:o,logoImageUrl:Object(c.a)(s),logoAlt:e.alt}}},176:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=ta?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),c=(0,o.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return l.default.createElement("div",{className:c,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},l.default.createElement("div",{className:"react-toggle-track"},l.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),l.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),l.default.createElement("div",{className:"react-toggle-thumb"}),l.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(c.PureComponent);t.default=h,h.displayName="Toggle",h.defaultProps={icons:{checked:l.default.createElement(i.default,null),unchecked:l.default.createElement(u.default,null)}},h.propTypes={checked:s.default.bool,disabled:s.default.bool,defaultChecked:s.default.bool,onChange:s.default.func,onFocus:s.default.func,onBlur:s.default.func,className:s.default.string,name:s.default.string,value:s.default.string,id:s.default.string,"aria-labelledby":s.default.string,"aria-label":s.default.string,icons:s.default.oneOfType([s.default.bool,s.default.shape({checked:s.default.node,unchecked:s.default.node})])}},177:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),c=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return c.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},c.default.createElement("title",null,"switch-check"),c.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},178:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),c=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return c.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},c.default.createElement("title",null,"switch-x"),c.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},179:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}}}]); \ No newline at end of file diff --git a/20ac7829.057f084f.js b/20ac7829.057f084f.js new file mode 100644 index 00000000..f8377007 --- /dev/null +++ b/20ac7829.057f084f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{111:function(e){e.exports=JSON.parse('{"docsSidebars":{"version-5.1.1/someSidebar":[{"type":"category","label":"SpotifyAPI-NET","items":[{"type":"link","label":"Home","href":"/docs/home"}]},{"type":"category","label":"SpotifyAPI-NET.Web","items":[{"type":"link","label":"Getting Started","href":"/docs/web/getting_started"},{"type":"link","label":"Albums","href":"/docs/web/albums"},{"type":"link","label":"Artists","href":"/docs/web/artists"},{"type":"link","label":"Browse","href":"/docs/web/browse"},{"type":"link","label":"Follow","href":"/docs/web/follow"},{"type":"link","label":"Library","href":"/docs/web/library"},{"type":"link","label":"Personalization","href":"/docs/web/personalization"},{"type":"link","label":"Player","href":"/docs/web/player"},{"type":"link","label":"Playlists","href":"/docs/web/playlists"},{"type":"link","label":"Profiles","href":"/docs/web/profiles"},{"type":"link","label":"Proxy Settings","href":"/docs/web/proxy"},{"type":"link","label":"Search","href":"/docs/web/search"},{"type":"link","label":"Tracks","href":"/docs/web/tracks"},{"type":"link","label":"Utilities","href":"/docs/web/utilities"}]},{"type":"category","label":"SpotifyAPI-NET.Auth","items":[{"type":"link","label":"Getting Started","href":"/docs/auth/getting_started"},{"type":"link","label":"Implicit Grant","href":"/docs/auth/implicit_grant"},{"type":"link","label":"Authorization Code","href":"/docs/auth/authorization_code"},{"type":"link","label":"Client Credentials","href":"/docs/auth/client_credentials"},{"type":"link","label":"Token Swap","href":"/docs/auth/token_swap"}]}]},"permalinkToSidebar":{"/docs/auth/authorization_code":"version-5.1.1/someSidebar","/docs/auth/client_credentials":"version-5.1.1/someSidebar","/docs/auth/getting_started":"version-5.1.1/someSidebar","/docs/auth/implicit_grant":"version-5.1.1/someSidebar","/docs/auth/token_swap":"version-5.1.1/someSidebar","/docs/home":"version-5.1.1/someSidebar","/docs/web/albums":"version-5.1.1/someSidebar","/docs/web/artists":"version-5.1.1/someSidebar","/docs/web/browse":"version-5.1.1/someSidebar","/docs/web/follow":"version-5.1.1/someSidebar","/docs/web/getting_started":"version-5.1.1/someSidebar","/docs/web/library":"version-5.1.1/someSidebar","/docs/web/personalization":"version-5.1.1/someSidebar","/docs/web/player":"version-5.1.1/someSidebar","/docs/web/playlists":"version-5.1.1/someSidebar","/docs/web/profiles":"version-5.1.1/someSidebar","/docs/web/proxy":"version-5.1.1/someSidebar","/docs/web/search":"version-5.1.1/someSidebar","/docs/web/tracks":"version-5.1.1/someSidebar","/docs/web/utilities":"version-5.1.1/someSidebar"},"version":"5.1.1"}')}}]); \ No newline at end of file diff --git a/22a09cbf.2dc06596.js b/22a09cbf.2dc06596.js new file mode 100644 index 00000000..e212d4c0 --- /dev/null +++ b/22a09cbf.2dc06596.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{112:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return l}));var r=n(2),a=n(6),o=(n(0),n(151)),i={id:"implicit_grant",title:"Implicit Grant",sidebar_label:"Implicit Grant"},c={id:"version-5.1.1/auth/implicit_grant",title:"Implicit Grant",description:"This way is recommended and the only auth-process which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application.",source:"@site/versioned_docs/version-5.1.1/auth/implicit_grant.md",permalink:"/docs/auth/implicit_grant",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/auth/implicit_grant.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar_label:"Implicit Grant",sidebar:"version-5.1.1/someSidebar",previous:{title:"Getting Started",permalink:"/docs/auth/getting_started"},next:{title:"Authorization Code",permalink:"/docs/auth/authorization_code"}},p=[],s={rightToc:p};function l(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"This way is ",Object(o.b)("strong",{parentName:"p"},"recommended"),' and the only auth-process which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application.\nYou won\'t be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.'),Object(o.b)("p",null,"More info: ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#implicit-grant-flow"}),"here")),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'static async void Main(string[] args)\n{\n ImplicitGrantAuth auth = new ImplicitGrantAuth(\n _clientId,\n "http://localhost:4002",\n "http://localhost:4002",\n Scope.UserReadPrivate\n );\n auth.AuthReceived += async (sender, payload) =>\n {\n auth.Stop(); // `sender` is also the auth instance\n SpotifyWebAPI api = new SpotifyWebAPI()\n {\n TokenType = payload.TokenType,\n AccessToken = payload.AccessToken\n };\n // Do requests with API client\n };\n auth.Start(); // Starts an internal HTTP Server\n auth.OpenBrowser();\n}\n')))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var r=n(0),a=n.n(r);function o(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 c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),l=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=l(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=l(n),h=r,f=u["".concat(i,".").concat(h)]||u[h]||d[h]||o;return n?a.a.createElement(f,c({ref:t},s,{components:n})):a.a.createElement(f,c({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=h;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),s=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a({},t,{},e)),n},u=function(e){var t=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),m=r,d=u["".concat(c,".").concat(m)]||u[m]||f[m]||i;return n?o.a.createElement(d,a({ref:t},l,{components:n})):o.a.createElement(d,a({ref:t},l))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,c=new Array(i);c[0]=m;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a.mdxType="string"==typeof e?e:r,c[1]=a;for(var l=2;l();\n\n // This Uri contains your access token in the Fragment part\n Console.WriteLine(eventArgs.Uri);\n }\n}\n")),Object(i.b)("p",null,"For a real example, have a look at the ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.UWP"}),"Example.UWP"),", ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.ASP"}),"Example.ASP")," or ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.ASPBlazor"}),"Example.ASPBlazor")),Object(i.b)("h1",{id:"using-spotifywebauth"},"Using Spotify.Web.Auth"),Object(i.b)("p",null,"For cross-platform CLI and desktop apps (non ",Object(i.b)("inlineCode",{parentName:"p"},"UWP")," apps), custom protocol handlers are sometimes not an option. The fallback here is a small cross-platform embedded web server running on ",Object(i.b)("inlineCode",{parentName:"p"},"http://localhost:5000")," serving javascript. The javscript will parse the fragment part of the URI and sends a request to the web server in the background. The web server then notifies your appliciation via event."),Object(i.b)("pre",null,Object(i.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'private static EmbedIOAuthServer _server;\n\npublic static async Task Main()\n{\n // Make sure "http://localhost:5000/callback" is in your spotify application as redirect uri!\n _server = new EmbedIOAuthServer(new Uri("http://localhost:5000/callback"), 5000);\n await _server.Start();\n\n _server.ImplictGrantReceived += OnImplictGrantReceived;\n\n var request = new LoginRequest(_server.BaseUri, "ClientId", LoginRequest.ResponseType.Code)\n {\n Scope = new List { Scopes.UserReadEmail }\n };\n BrowserUtil.Open(uri);\n}\n\nprivate static async Task OnImplictGrantReceived(object sender, ImplictGrantResponse response)\n{\n await _server.Stop();\n var spotify = new SpotifyClient(response.AccessToken);\n // do calls with spotify\n}\n')),Object(i.b)("p",null,"For real examples, have a look at ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.CLI.PersistentConfig"}),"Example.CLI.PersistentConfig")," and ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.CLI.CustomHTML"}),"Example.CLI.CustomHTML")))}p.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var r=n(0),a=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s({},t,{},e)),n},b=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),b=p(n),d=r,m=b["".concat(o,".").concat(d)]||b[d]||u[d]||i;return n?a.a.createElement(m,s({ref:t},l,{components:n})):a.a.createElement(m,s({ref:t},l))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=d;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,o[1]=s;for(var l=2;l=0||(n[a]=t[a]);return n}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}var l=n.a.createContext({}),s=function(t){var e=n.a.useContext(l),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},p=function(t){var e=s(t.components);return n.a.createElement(l.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return n.a.createElement(n.a.Fragment,{},e)}},m=Object(o.forwardRef)((function(t,e){var a=t.components,o=t.mdxType,r=t.originalType,i=t.parentName,l=b(t,["components","mdxType","originalType","parentName"]),p=s(a),m=o,h=p["".concat(i,".").concat(m)]||p[m]||u[m]||r;return a?n.a.createElement(h,c({ref:e},l,{components:a})):n.a.createElement(h,c({ref:e},l))}));function h(t,e){var a=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var r=a.length,i=new Array(r);i[0]=m;var c={};for(var b in e)hasOwnProperty.call(e,b)&&(c[b]=e[b]);c.originalType=t,c.mdxType="string"==typeof t?t:o,i[1]=c;for(var l=2;l=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 u=o.a.createContext({}),s=function(e){var t=o.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(u.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),d=r,f=p["".concat(i,".").concat(d)]||p[d]||b[d]||a;return n?o.a.createElement(f,c({ref:t},u,{components:n})):o.a.createElement(f,c({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var u=2;u=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 s=a.a.createContext({}),l=function(e){var t=a.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=l(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=l(r),d=n,m=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return r?a.a.createElement(m,c({ref:t},s,{components:r})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=d;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,i[1]=c;for(var s=2;s{},setDarkTheme:()=>{}});t.a=o},158:function(e,t,n){"use strict";var r=n(0);const o=Object(r.createContext)({tabGroupChoices:{},setTabGroupChoices:()=>{}});t.a=o},159:function(e,t,n){"use strict";var r=n(0),o=n(157);t.a=function(){return Object(r.useContext)(o.a)}},162:function(e,t,n){"use strict";var r=n(2),o=n(0),i=n.n(o),a=n(153),s=n.n(a),c={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","at-rule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},l={Prism:n(33).a,theme:c};function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){return(f=Object.assign||function(e){for(var t=1;t0&&e[n-1]===t?e:e.concat(t)},d=function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=f({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=f({},n,{backgroundColor:null}),o};function g(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var m=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),u(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?d(e.theme,e.language):void 0;return t.themeDict=n})),u(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,i=f({},g(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),a=t.getThemeDict(t.props);return void 0!==a&&(i.style=a.plain),void 0!==o&&(i.style=void 0!==i.style?f({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),u(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,i=t.getThemeDict(t.props);if(void 0!==i){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return i[n[0]];var a=r?{display:"inline-block"}:{},s=n.map((function(e){return i[e]}));return Object.assign.apply(Object,[a].concat(s))}})),u(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,i=e.token,a=f({},g(e,["key","className","style","token"]),{className:"token "+i.types.join(" "),children:i.content,style:t.getStyleForToken(i),key:void 0});return void 0!==o&&(a.style=void 0!==a.style?f({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,i=this.getThemeDict(this.props),a=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],i=0,a=0,s=[],c=[s];a>-1;){for(;(i=r[a]++)0?u:["plain"],l=f):(u=h(u,f.type),f.alias&&(u=h(u,f.alias)),l=f.content),"string"==typeof l){var d=l.split(p),g=d.length;s.push({types:u,content:d[0]});for(var m=1;m{const{siteConfig:{themeConfig:{prism:e={}}}}=Object(j.a)(),{isDarkTheme:t}=Object(x.a)(),n=e.theme||T,r=e.darkTheme||n;return t?r:n},S=n(105),O=n.n(S);const C=/{([\d,-]+)}/,A=(e=["js","jsBlock","jsx","python","html"])=>{const t={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},python:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},n=["highlight-next-line","highlight-start","highlight-end"].join("|"),r=e.map(e=>`(?:${t[e].start}\\s*(${n})\\s*${t[e].end})`).join("|");return new RegExp(`^\\s*(?:${r})\\s*$`)},L=/title=".*"/;t.a=({children:e,className:t,metastring:n})=>{const{siteConfig:{themeConfig:{prism:a={}}}}=Object(j.a)(),[c,u]=Object(o.useState)(!1),[f,p]=Object(o.useState)(!1);Object(o.useEffect)(()=>{p(!0)},[]);const y=Object(o.useRef)(null),h=Object(o.useRef)(null);let d=[],g="";const v=w();if(n&&C.test(n)){const e=n.match(C)[1];d=E.a.parse(e).filter(e=>e>0)}n&&L.test(n)&&(g=n.match(L)[0].split("title=")[1].replace(/"+/g,"")),Object(o.useEffect)(()=>{let e;return h.current&&(e=new b.a(h.current,{target:()=>y.current})),()=>{e&&e.destroy()}},[h.current,y.current]);let k=t&&t.replace(/language-/,"");!k&&a.defaultLanguage&&(k=a.defaultLanguage);let T=e.replace(/\n$/,"");if(0===d.length&&void 0!==k){let t="";const n=(e=>{switch(e){case"js":case"javascript":case"ts":case"typescript":return A(["js","jsBlock"]);case"jsx":case"tsx":return A(["js","jsBlock","jsx"]);case"html":return A(["js","jsBlock","html"]);case"python":case"py":return A(["python"]);default:return A()}})(k),r=e.replace(/\n$/,"").split("\n");let o;for(let e=0;ee||t,void 0)){case"highlight-next-line":t+=i+",";break;case"highlight-start":o=i;break;case"highlight-end":t+=`${o}-${i-1},`}r.splice(e,1)}else e+=1}d=E.a.parse(t),T=r.join("\n")}const x=()=>{window.getSelection().empty(),u(!0),setTimeout(()=>u(!1),2e3)};return i.a.createElement(m,Object(r.a)({},l,{key:f,theme:v,code:T,language:k}),({className:e,style:t,tokens:n,getLineProps:o,getTokenProps:a})=>i.a.createElement(i.a.Fragment,null,g&&i.a.createElement("div",{style:t,className:O.a.codeBlockTitle},g),i.a.createElement("div",{className:O.a.codeBlockContent},i.a.createElement("button",{ref:h,type:"button","aria-label":"Copy code to clipboard",className:s()(O.a.copyButton,{[O.a.copyButtonWithTitle]:g}),onClick:x},c?"Copied":"Copy"),i.a.createElement("div",{tabIndex:"0",className:s()(e,O.a.codeBlock,{[O.a.codeBlockWithTitle]:g})},i.a.createElement("div",{ref:y,className:O.a.codeBlockLines,style:t},n.map((e,t)=>{1===e.length&&""===e[0].content&&(e[0].content="\n");const n=o({line:e,key:t});return d.includes(t+1)&&(n.className=n.className+" docusaurus-highlight-code-line"),i.a.createElement("div",Object(r.a)({key:t},n),e.map((e,t)=>i.a.createElement("span",Object(r.a)({key:t},a({token:e,key:t})))))}))))))}},180:function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=o()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=o()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),l=n.n(c),u=n(2),f=n.n(u),p="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(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=f()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return d("action",e)}},{key:"defaultTarget",value:function(e){var t=d("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return d("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(l.a);function d(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=h}]).default},e.exports=r()},181:function(e,t){e.exports.parse=function(e){var t=e.split(",").map((function(e){return function(e){if(/^-?\d+$/.test(e))return parseInt(e,10);var t;if(t=e.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){var n=t[1],r=t[2],o=t[3];if(n&&o){var i=[],a=(n=parseInt(n))<(o=parseInt(o))?1:-1;"-"!=r&&".."!=r&&"\u2025"!=r||(o+=a);for(var s=n;s!=o;s+=a)i.push(s);return i}}return[]}(e)}));return 0===t.length?[]:1===t.length?Array.isArray(t[0])?t[0]:t:t.reduce((function(e,t){return Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.concat(t)}))}}}]); \ No newline at end of file diff --git a/3.6fe0d7f0.js.LICENSE.txt b/3.6fe0d7f0.js.LICENSE.txt new file mode 100644 index 00000000..73d480c6 --- /dev/null +++ b/3.6fe0d7f0.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*! + * clipboard.js v2.0.6 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ diff --git a/35214713.21acf8a2.js b/35214713.21acf8a2.js new file mode 100644 index 00000000..0f52e390 --- /dev/null +++ b/35214713.21acf8a2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{118:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return l}));var r=n(2),a=n(6),o=(n(0),n(151)),i={id:"error_handling",title:"Error Handling"},c={id:"error_handling",title:"Error Handling",description:"API calls can fail when input data is malformed or the server detects issues with the request. As an example, the following request obviously fails:",source:"@site/docs/error_handling.md",permalink:"/docs/next/error_handling",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/error_handling.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591199053,sidebar:"docs",previous:{title:"Getting Started",permalink:"/docs/next/getting_started"},next:{title:"Configuration",permalink:"/docs/next/configuration"}},s=[{value:"APIException",id:"apiexception",children:[]},{value:"APIUnauthorizedException",id:"apiunauthorizedexception",children:[]},{value:"APITooManyRequestsException",id:"apitoomanyrequestsexception",children:[]}],p={rightToc:s};function l(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"API calls can fail when input data is malformed or the server detects issues with the request. As an example, the following request obviously fails:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'var track = await spotify.Tracks.Get("NotExistingTrackId");\nConsole.WriteLine(track.Name);\n')),Object(o.b)("p",null,"When a request fails an ",Object(o.b)("inlineCode",{parentName:"p"},"APIException")," is thrown. Specific errors may throw a child exception of ",Object(o.b)("inlineCode",{parentName:"p"},"APIException"),"."),Object(o.b)("h2",{id:"apiexception"},"APIException"),Object(o.b)("p",null,"A very general API error. The message is parsed from the API response JSON body and the response is available as public property."),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'try {\n var track = await spotify.Tracks.Get("NotExistingTrackId");\n} catch(APIException e) {\n // Prints: invalid id\n Console.WriteLine(e.Message);\n // Prints: BadRequest\n Console.WriteLine(e.Response?.StatusCode);\n}\n')),Object(o.b)("h2",{id:"apiunauthorizedexception"},"APIUnauthorizedException"),Object(o.b)("p",null,"Provides the same properties as ",Object(o.b)("inlineCode",{parentName:"p"},"APIException")," and occurs, when the access token is expired or not provided. Notice that an access token has to be included in ",Object(o.b)("strong",{parentName:"p"},"every")," request. Spotify does not allow unauthorized API access."),Object(o.b)("h2",{id:"apitoomanyrequestsexception"},"APITooManyRequestsException"),Object(o.b)("p",null,"Provides the same properties as ",Object(o.b)("inlineCode",{parentName:"p"},"APIException")," and occurs, when too many requests has been sent by your application. It also provides the property ",Object(o.b)("inlineCode",{parentName:"p"},"TimeSpan RetryAfter"),", which maps to the received ",Object(o.b)("inlineCode",{parentName:"p"},"Retry-After")," Header."),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'try {\n // call it very often?\n var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");\n} catch(APITooManyRequestsException e) {\n // Prints: seconds to wait, often 1 or 2\n Console.WriteLine(e.RetryAfter);\n}\n')))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var r=n(0),a=n.n(r);function o(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 c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),l=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=l(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),b=r,f=u["".concat(i,".").concat(b)]||u[b]||d[b]||o;return n?a.a.createElement(f,c({ref:t},p,{components:n})):a.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=b;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=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({}),s=function(e){var t=o.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=r,b=u["".concat(i,".").concat(f)]||u[f]||g[f]||a;return n?o.a.createElement(b,c({ref:t},p,{components:n})):o.a.createElement(b,c({ref:t},p))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),b=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=b(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=b(n),d=r,O=u["".concat(o,".").concat(d)]||u[d]||s[d]||i;return n?a.a.createElement(O,c({ref:t},p,{components:n})):a.a.createElement(O,c({ref:t},p))}));function O(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var p=2;p + + + + + +Page Not Found | SpotifyAPI-NET + + + + + +
+

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + \ No newline at end of file diff --git a/516486bd.7eba38cb.js b/516486bd.7eba38cb.js new file mode 100644 index 00000000..ec3240ea --- /dev/null +++ b/516486bd.7eba38cb.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{121:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return b})),a.d(t,"metadata",(function(){return l})),a.d(t,"rightToc",(function(){return i})),a.d(t,"default",(function(){return p}));var r=a(2),n=a(6),c=(a(0),a(151)),b={id:"tracks",title:"Tracks",sidebar_label:"Tracks"},l={id:"version-5.1.1/web/tracks",title:"Tracks",description:"GetSeveralTracks",source:"@site/versioned_docs/version-5.1.1/web/tracks.md",permalink:"/docs/web/tracks",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/tracks.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar_label:"Tracks",sidebar:"version-5.1.1/someSidebar",previous:{title:"Search",permalink:"/docs/web/search"},next:{title:"Utilities",permalink:"/docs/web/utilities"}},i=[{value:"GetSeveralTracks",id:"getseveraltracks",children:[]},{value:"GetTrack",id:"gettrack",children:[]},{value:"GetAudioAnalysis",id:"getaudioanalysis",children:[]}],o={rightToc:i};function p(e){var t=e.components,a=Object(n.a)(e,["components"]);return Object(c.b)("wrapper",Object(r.a)({},o,a,{components:t,mdxType:"MDXLayout"}),Object(c.b)("h2",{id:"getseveraltracks"},"GetSeveralTracks"),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Get Spotify catalog information for multiple tracks based on their Spotify IDs.")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Parameters")),Object(c.b)("table",null,Object(c.b)("thead",{parentName:"table"},Object(c.b)("tr",{parentName:"thead"},Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(c.b)("tbody",{parentName:"table"},Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"ids"),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs for the tracks. Maximum: 50 IDs."),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},'new List {"6Y1CLPwYe7zvI8PJiWVz6T"}'))),Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"market"),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(c.b)("p",null,"Returns a ",Object(c.b)("inlineCode",{parentName:"p"},"SeveralTracks")," object which has one property, ",Object(c.b)("inlineCode",{parentName:"p"},"List Tracks")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Usage")),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'SeveralTracks severalTracks = _spotify.GetSeveralTracks(new List {"6Y1CLPwYe7zvI8PJiWVz6T"});\nseveralTracks.Tracks.ForEach(track => Console.WriteLine(track.Name));\n')),Object(c.b)("hr",null),Object(c.b)("h2",{id:"gettrack"},"GetTrack"),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Get Spotify catalog information for a single track identified by its unique Spotify ID.")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Parameters")),Object(c.b)("table",null,Object(c.b)("thead",{parentName:"table"},Object(c.b)("tr",{parentName:"thead"},Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(c.b)("tbody",{parentName:"table"},Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"id"),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The Spotify ID for the track."),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},'"6Y1CLPwYe7zvI8PJiWVz6T"'))),Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"market"),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(c.b)("p",null,"Returns a ",Object(c.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#track-object-full"}),"FullTrack")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Usage")),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'FullTrack track = _spotify.GetTrack("6Y1CLPwYe7zvI8PJiWVz6T");\nConsole.WriteLine(track.Name);\n')),Object(c.b)("hr",null),Object(c.b)("h2",{id:"getaudioanalysis"},"GetAudioAnalysis"),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Get a detailed audio analysis for a single track identified by its unique Spotify ID.")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Parameters")),Object(c.b)("table",null,Object(c.b)("thead",{parentName:"table"},Object(c.b)("tr",{parentName:"thead"},Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(c.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(c.b)("tbody",{parentName:"table"},Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"id"),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The Spotify ID for the track."),Object(c.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},'"6Y1CLPwYe7zvI8PJiWVz6T"'))))),Object(c.b)("p",null,"Returns a AudioAnalysis. This object is currently lacking Spotify documentation but archived ",Object(c.b)("a",Object(r.a)({parentName:"p"},{href:"https://web.archive.org/web/20160528174915/http://developer.echonest.com/docs/v4/_static/AnalyzeDocumentation.pdf"}),"EchoNest documentation")," is relevant."),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Usage")),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'AudioAnalysis analysis = _spotify.GetAudioAnalysis("6Y1CLPwYe7zvI8PJiWVz6T");\nConsole.WriteLine(analysis.Meta.DetailedStatus);\n')))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return j}));var r=a(0),n=a.n(r);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=n.a.createContext({}),p=function(e){var t=n.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l({},t,{},e)),a},s=function(e){var t=p(e.components);return n.a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},O=Object(r.forwardRef)((function(e,t){var a=e.components,r=e.mdxType,c=e.originalType,b=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),s=p(a),O=r,j=s["".concat(b,".").concat(O)]||s[O]||u[O]||c;return a?n.a.createElement(j,l({ref:t},o,{components:a})):n.a.createElement(j,l({ref:t},o))}));function j(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=a.length,b=new Array(c);b[0]=O;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:r,b[1]=l;for(var o=2;o Artists"),",",Object(c.b)("inlineCode",{parentName:"p"},"Paging Tracks"),", ",Object(c.b)("inlineCode",{parentName:"p"},"Paging Albums"),", ",Object(c.b)("inlineCode",{parentName:"p"},"Paging Playlists"),". They are filled based on your search-type."),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Usage")),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'SearchItem item = _spotify.SearchItems("roadhouse+blues", SearchType.Album | SearchType.Playlist);\nConsole.WriteLine(item.Albums.Total); //How many results are there in total? NOTE: item.Tracks = item.Artists = null\n')),Object(c.b)("hr",null),Object(c.b)("h2",{id:"searchitemsescaped"},"SearchItemsEscaped"),Object(c.b)("blockquote",null,Object(c.b)("p",{parentName:"blockquote"},"Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")),Object(c.b)("p",null,"Works like ",Object(c.b)("inlineCode",{parentName:"p"},"SearchItems"),", but URL escapes all characters"))}s.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return d}));var r=a(0),n=a.n(r);function c(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 r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=n.a.createContext({}),s=function(e){var t=n.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},p=function(e){var t=s(e.components);return n.a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var a=e.components,r=e.mdxType,c=e.originalType,l=e.parentName,o=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=r,d=p["".concat(l,".").concat(m)]||p[m]||u[m]||c;return a?n.a.createElement(d,i({ref:t},o,{components:a})):n.a.createElement(d,i({ref:t},o))}));function d(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=a.length,l=new Array(c);l[0]=m;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:r,l[1]=i;for(var o=2;o{},setDarkTheme:()=>{}});t.a=o},158:function(e,t,a){"use strict";var n=a(0);const o=Object(n.createContext)({tabGroupChoices:{},setTabGroupChoices:()=>{}});t.a=o},159:function(e,t,a){"use strict";var n=a(0),o=a(157);t.a=function(){return Object(n.useContext)(o.a)}},166:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),c=a(161);t.default=function(){return o.a.createElement(c.a,{title:"Page Not Found"},o.a.createElement("div",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file diff --git a/6373637a.07907811.js b/6373637a.07907811.js new file mode 100644 index 00000000..2dfdb9ab --- /dev/null +++ b/6373637a.07907811.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{123:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return p}));var r=n(2),a=n(6),i=(n(0),n(151)),o={id:"client_credentials",title:"Client Credentials"},c={id:"client_credentials",title:"Client Credentials",description:"The Client Credentials flow is used in server-to-server authentication.",source:"@site/docs/client_credentials.md",permalink:"/docs/next/client_credentials",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/client_credentials.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591221448,sidebar:"docs",previous:{title:"Introduction",permalink:"/docs/next/auth_introduction"},next:{title:"Implicit Grant",permalink:"/docs/next/implicit_grant"}},s=[{value:"Request token once",id:"request-token-once",children:[]},{value:"Request Token On-Demand",id:"request-token-on-demand",children:[]}],l={rightToc:s};function p(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(i.b)("wrapper",Object(r.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"The Client Credentials flow is used in server-to-server authentication.\nOnly endpoints that do not access user information can be accessed.")),Object(i.b)("p",null,"By supplying your ",Object(i.b)("inlineCode",{parentName:"p"},"SPOTIFY_CLIENT_ID")," and ",Object(i.b)("inlineCode",{parentName:"p"},"SPOTIFY_CLIENT_SECRET"),", you get an access token."),Object(i.b)("h2",{id:"request-token-once"},"Request token once"),Object(i.b)("p",null,"To request an access token, build a ",Object(i.b)("inlineCode",{parentName:"p"},"ClientCredentialsRequest")," and send it via ",Object(i.b)("inlineCode",{parentName:"p"},"OAuthClient"),". This access token will expire after some time and you need to repeat the process."),Object(i.b)("pre",null,Object(i.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'public static async Task Main()\n{\n var config = SpotifyClientConfig.CreateDefault();\n\n var request = new ClientCredentialsRequest("CLIENT_ID", "CLIENT_SECRET");\n var response = await new OAuthClient(config).RequestToken(request);\n\n var spotify = new SpotifyClient(config.WithToken(response.AccessToken));\n}\n')),Object(i.b)("h2",{id:"request-token-on-demand"},"Request Token On-Demand"),Object(i.b)("p",null,"You can also use ",Object(i.b)("inlineCode",{parentName:"p"},"CredentialsAuthenticator"),", which will make sure the spotify instance will always have an up-to-date access token by automatically refreshing the token on-demand."),Object(i.b)("pre",null,Object(i.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'public static async Task Main()\n{\n var config = SpotifyClientConfig\n .CreateDefault()\n .WithAuthenticator(new CredentialsAuthenticator("CLIENT_ID", "CLIENT_SECRET"));\n\n var spotify = new SpotifyClient(config);\n}\n')),Object(i.b)("div",{className:"admonition admonition-info alert alert--info"},Object(i.b)("div",Object(r.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(r.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(r.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(i.b)("path",Object(r.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"info")),Object(i.b)("div",Object(r.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"There is no thread safety guaranteed when using ",Object(i.b)("inlineCode",{parentName:"p"},"CredentialsAuthenticator"),"."))))}p.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var r=n(0),a=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(n),b=r,m=u["".concat(o,".").concat(b)]||u[b]||d[b]||i;return n?a.a.createElement(m,c({ref:t},l,{components:n})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=b;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var l=2;l=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var s=l.a.createContext({}),o=function(e){var t=l.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},p=function(e){var t=o(e.components);return l.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return l.a.createElement(l.a.Fragment,{},t)}},O=Object(r.forwardRef)((function(e,t){var a=e.components,r=e.mdxType,b=e.originalType,c=e.parentName,s=n(e,["components","mdxType","originalType","parentName"]),p=o(a),O=r,j=p["".concat(c,".").concat(O)]||p[O]||u[O]||b;return a?l.a.createElement(j,i({ref:t},s,{components:a})):l.a.createElement(j,i({ref:t},s))}));function j(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var b=a.length,c=new Array(b);c[0]=O;var i={};for(var n in t)hasOwnProperty.call(t,n)&&(i[n]=t[n]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var s=2;s tracks = _spotify.GetUsersTopTracks();\ntracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)\nConsole.WriteLine(tracks.Total.ToString()) //Display total album track count\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getuserstopartists"},"GetUsersTopArtists"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get the current user\u2019s top artists based on calculated affinity.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[timeRange]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"Over what time frame the affinities are compute."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"TimeRangeType.MediumTerm"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full"}),"FullArtist")," wrapped inside a ",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#paging-object"}),"Paging-object")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{}),"Paging artists = _spotify.GetUsersTopArtists();\nartists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getusersrecentlyplayedtracks"},"GetUsersRecentlyPlayedTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get tracks from the current user\u2019s recent play history.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[after]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"Returns all items after (but not including) this cursor position."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"DateTime.Now.AddDays(-1)"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[before]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"Returns all items before (but not including) this cursor position."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"DateTime.Now.AddDays(-1)"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"PlayHistory")," wrapped inside a ",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#cursor-based-paging-object"}),"CursorPaging-object")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{}),"CursorPaging histories = _spotify.GetUsersRecentlyPlayedTracks();\nhistories.Items.ForEach(item => Console.WriteLine(item.Track.Name));\n")),Object(b.b)("hr",null))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return j}));var r=a(0),n=a.n(r);function b(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 r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=n.a.createContext({}),p=function(e){var t=n.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},s=function(e){var t=p(e.components);return n.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var a=e.components,r=e.mdxType,b=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),s=p(a),u=r,j=s["".concat(l,".").concat(u)]||s[u]||m[u]||b;return a?n.a.createElement(j,i({ref:t},o,{components:a})):n.a.createElement(j,i({ref:t},o))}));function j(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var b=a.length,l=new Array(b);l[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:r,l[1]=i;for(var o=2;o=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 u=o.a.createContext({}),l=function(e){var t=o.a.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},f=function(e){var t=l(e.components);return o.a.createElement(u.Provider,{value:t},e.children)},s={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,c=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),f=l(r),m=n,d=f["".concat(c,".").concat(m)]||f[m]||s[m]||a;return r?o.a.createElement(d,i({ref:t},u,{components:r})):o.a.createElement(d,i({ref:t},u))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,c=new Array(a);c[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var u=2;u")," type."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"The offset-based paging object is a container for a set of objects. It contains a key called items (whose value is an array of the requested objects) along with other keys like previous, next and limit that can be useful in future calls.")),Object(i.b)("p",null,"It allows to receive only a subset of all available data and dynamically check if more requests are required. The library supports ",Object(i.b)("inlineCode",{parentName:"p"},"Paging")," responses in two ways:"),Object(i.b)("h2",{id:"paginateall"},"PaginateAll"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"PaginateAll")," will query all remaining elements based on a first page and return all of them in a ",Object(i.b)("inlineCode",{parentName:"p"},"IList"),". This method should not be used for a huge amount of pages (e.g ",Object(i.b)("inlineCode",{parentName:"p"},"Search")," Endpoint), since it stores every response in memory."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-csharp"}),"// we need the first page, every syntax can be used for pagination\nvar page = await spotify.Playlists.CurrentUsers();\nvar page = spotify.Playlists.CurrentUsers();\nvar page = () => spotify.Playlists.CurrentUsers();\n\n// allPages will include the first page retrived before\nvar allPages = await spotify.PaginateAll(page);\n")),Object(i.b)("h2",{id:"paginate"},"Paginate"),Object(i.b)("div",{className:"admonition admonition-info alert alert--info"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),".NET Standard >= 2.1 required")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}))),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"Paginate")," is based on ",Object(i.b)("inlineCode",{parentName:"p"},"IAsyncEnumerable")," and streams pages instead of returning them all in one list. This allows to break the fetching early and keeps only 1 page in memory at a time. This method should always be preferred to ",Object(i.b)("inlineCode",{parentName:"p"},"PaginateAll")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-csharp"}),'// we need the first page, every syntax can be used for pagination\nvar page = await spotify.Playlists.CurrentUsers();\nvar page = spotify.Playlists.CurrentUsers();\nvar page = () => spotify.Playlists.CurrentUsers();\n\nawait foreach(var item in spotify.Paginate(page))\n{\n Console.WriteLine(item.Name);\n // you can use "break" here!\n}\n')),Object(i.b)("p",null,"Some endpoints have nested and/or multiple paginations objects. When requesting the next page, it will not return the actual paging object but rather the root level endpoint object. A good example is the ",Object(i.b)("inlineCode",{parentName:"p"},"Search")," endpoint, which contains up to 5 Paging objects. Requesting the next page of the nested ",Object(i.b)("inlineCode",{parentName:"p"},"Artists")," paging object will return another ",Object(i.b)("inlineCode",{parentName:"p"},"Search")," response, instead of just ",Object(i.b)("inlineCode",{parentName:"p"},"Artists"),". You will need to supply a mapper function to the ",Object(i.b)("inlineCode",{parentName:"p"},"Paginate")," call, which returns the correct paging object:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-csharp"}),'var search = await spotify.Search.Item(new SearchRequest(\n SearchRequest.Types.All, "Jake"\n));\n\nawait foreach(var item in spotify.Paginate(search.Albums, (s) => s.Albums))\n{\n Console.WriteLine(item.Name);\n // you can use "break" here!\n}\n')),Object(i.b)("h2",{id:"paginators"},"Paginators"),Object(i.b)("p",null,"Via the interface ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IPaginator.cs"}),Object(i.b)("inlineCode",{parentName:"a"},"IPaginator")),", it can be configured how pages are fetched. It can be configured on a global level:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-csharp"}),"var config = SpotifyClientConfig\n .CreateDefault()\n .WithPaginator(new YourCustomPaginator());\n")),Object(i.b)("p",null,"or on method level:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-csharp"}),'await foreach(var item in spotify.Paginate(page, new YourCustomPaginator()))\n{\n Console.WriteLine(item.Name);\n // you can use "break" here!\n}\n')),Object(i.b)("p",null,"By default, ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/SimplePaginator.cs"}),Object(i.b)("inlineCode",{parentName:"a"},"SimplePaginator"))," is used. It fetches pages without any delay."))}p.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=r.a.createContext({}),p=function(e){var t=r.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=p(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),b=p(n),d=a,g=b["".concat(o,".").concat(d)]||b[d]||u[d]||i;return n?r.a.createElement(g,l({ref:t},c,{components:n})):r.a.createElement(g,l({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var c=2;c=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 s=o.a.createContext({}),u=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=u(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=u(n),f=r,b=p["".concat(i,".").concat(f)]||p[f]||d[f]||a;return n?o.a.createElement(b,c({ref:t},s,{components:n})):o.a.createElement(b,c({ref:t},s))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=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({}),s=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=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},y=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(r),y=n,b=u["".concat(i,".").concat(y)]||u[y]||f[y]||a;return r?o.a.createElement(b,c({ref:t},l,{components:r})):o.a.createElement(b,c({ref:t},l))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=y;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,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=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({}),u=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},s=function(e){var t=u(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,c=e.originalType,a=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=u(r),f=n,d=s["".concat(a,".").concat(f)]||s[f]||m[f]||c;return r?o.a.createElement(d,i({ref:t},p,{components:r})):o.a.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=r.length,a=new Array(c);a[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:n,a[1]=i;for(var p=2;p { Scopes.UserReadEmail }\n};\nBrowserUtil.Open(uri);\n')),Object(o.b)("p",null,"Now, swapping out this ",Object(o.b)("inlineCode",{parentName:"p"},"code")," for an ",Object(o.b)("inlineCode",{parentName:"p"},"access_token")," would require the app's client secret. We don't have this on the client-side. Instead, we send a request to our server, which takes care of the code swap:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'public Task GetCallback(string code)\n{\n var response = await new OAuthClient().RequestToken(\n new TokenSwapTokenRequest("https://your-swap-server.com/swap", code)\n );\n\n var spotify = new SpotifyClient(response.AccessToken);\n // Also important for later: response.RefreshToken\n}\n')),Object(o.b)("p",null,"The server swapped out the ",Object(o.b)("inlineCode",{parentName:"p"},"code")," for an ",Object(o.b)("inlineCode",{parentName:"p"},"access_token")," and ",Object(o.b)("inlineCode",{parentName:"p"},"refresh_token"),". Once we realize the ",Object(o.b)("inlineCode",{parentName:"p"},"access_token")," expired, we can also ask the server to refresh it:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'// if response.IsExpired is true\nvar newResponse = await new OAuthClient().RequestToken(\n new TokenSwapTokenRequest("https://your-swap-server.com/refresh", response.RefreshToken)\n);\n\nvar spotify = new SpotifyClient(newResponse.AccessToken);\n')),Object(o.b)("h2",{id:"server-implementation"},"Server Implementation"),Object(o.b)("p",null,"The server needs to support two endpoints, ",Object(o.b)("inlineCode",{parentName:"p"},"/swap")," and ",Object(o.b)("inlineCode",{parentName:"p"},"/refresh")," (endpoints can be named differently of course)"),Object(o.b)("h3",{id:"swap"},"Swap"),Object(o.b)("p",null,"The client sends a body via ",Object(o.b)("inlineCode",{parentName:"p"},"application/x-www-form-urlencoded")," where the received ",Object(o.b)("inlineCode",{parentName:"p"},"code")," is included. In cURL:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),'curl -X POST "https://example.com/v1/swap"\\\n -H "Content-Type: application/x-www-form-urlencoded"\\\n --data "code=AQDy8...xMhKNA"\n')),Object(o.b)("p",null,"The server needs to respond with content-type ",Object(o.b)("inlineCode",{parentName:"p"},"application/json")," and the at least the following body:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-json"}),'{\n "access_token" : "NgAagA...Um_SHo",\n "expires_in" : "3600",\n "refresh_token" : "NgCXRK...MzYjw"\n}\n')),Object(o.b)("h3",{id:"refresh"},"Refresh"),Object(o.b)("p",null,"The client sends a body via ",Object(o.b)("inlineCode",{parentName:"p"},"application/x-www-form-urlencoded")," where the received ",Object(o.b)("inlineCode",{parentName:"p"},"refresh_token")," is included. In cURL:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),'curl -X POST "https://example.com/v1/refresh"\\\n -H "Content-Type: application/x-www-form-urlencoded"\\\n --data "refresh_token=NgCXRK...MzYjw"\n')),Object(o.b)("p",null,"The server needs to respond with content-type ",Object(o.b)("inlineCode",{parentName:"p"},"application/json")," and the at least the following body:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-json"}),'{\n "access_token" : "NgAagA...Um_SHo",\n "expires_in" : "3600"\n}\n')),Object(o.b)("h2",{id:"example"},"Example"),Object(o.b)("p",null,"An example server has been implemented in NodeJS with a .NET CLI client, located at ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.TokenSwap"}),"Example.TokenSwap")))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(0),a=n.n(r);function o(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 p(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.a.createContext({}),l=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):p({},t,{},e)),n},d=function(e){var t=l(e.components);return a.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=l(n),u=r,h=d["".concat(i,".").concat(u)]||d[u]||b[u]||o;return n?a.a.createElement(h,p({ref:t},c,{components:n})):a.a.createElement(h,p({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var c=2;c\n \n ..\\Dlls\\SpotifyAPI.Web.dll\n \n\n')),Object(i.b)("h3",{id:"compile-yourself"},"Compile Yourself"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-sh"}),"git clone https://github.com/JohnnyCrazy/SpotifyAPI-NET.git\ncd SpotifyAPI-NET\ndotnet restore\ndotnet build\n\nls -la SpotifyAPI.Web/bin/Debug/netstandard2.1/SpotifyAPI.Web.dll\n")),Object(i.b)("h2",{id:"first-api-calls"},"First API Calls"),Object(i.b)("p",null,"You're now ready to issue your first calls to the Spotify API, a small console example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'using System;\nusing SpotifyAPI.Web;\n\nclass Program\n{\n static async Task Main()\n {\n var spotify = new SpotifyClient("YourAccessToken");\n\n var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");\n Console.WriteLine(track.Name);\n }\n}\n')),Object(i.b)("div",{className:"admonition admonition-tip alert alert--success"},Object(i.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(i.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})))),"tip")),Object(i.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Notice that the spotify api does not allow unauthorized API access. Wondering where you should get an access token from? For a quick test, head over to the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/console/get-album/"}),"Spotify Developer Console")," and generate an access token with the required scopes! For a permanent solution, head over to the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"/docs/next/auth_introduction"}),"authentication guides"),"."))),Object(i.b)("p",null,"There is no online documentation for every available API call, but XML inline docs are available:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IUserProfileClient.cs"}),"UserProfile")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IBrowseClient.cs"}),"Browse")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IShowsClient.cs"}),"Shows")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IPlaylistsClient.cs"}),"Playlists")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/ISearchClient.cs"}),"Search")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IFollowClient.cs"}),"Follow")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/ITracksClient.cs"}),"Tracks")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IPlayerClient.cs"}),"Player")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IAlbumsClient.cs"}),"Albums")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs"}),"Artists")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IPersonalizationClient.cs"}),"Personalization")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/IEpisodesClient.cs"}),"Episodes")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Clients/Interfaces/ILibraryClient.cs"}),"Library"))),Object(i.b)("p",null,"All calls have the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/documentation/web-api/reference-beta/"}),"Spotify Web API documentation reference")," attached as a remark."),Object(i.b)("h2",{id:"querybody-parameters"},"Query/Body Parameters"),Object(i.b)("p",null,"If an API endpoint has query or body parameters, a request model can be supplied to the method"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'// No optional or required query/body parameters\n// The track ID is part of the request path --\x3e it\'s not treated as query/body parameter\nvar track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");\n\n// Optional query/body parameter\nvar track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH", new TrackRequest{\n Market = "DE"\n});\n\n// Sometimes, query/body parameters are also required!\nvar tracks = await spotify.Tracks.GetSeveral(new TracksRequest(new List {\n "1s6ux0lNiTziSrd7iUAADH",\n "6YlOxoHWLjH6uVQvxUIUug"\n}));\n')),Object(i.b)("p",null,"If a query/body parameter is required, it has to be supplied in the constructor of the request model. In the background, empty/null checks are also performed to make sure required parameters are not empty/null. If it is optional, it can be supplied as a property to the request model."),Object(i.b)("h2",{id:"guides"},"Guides"),Object(i.b)("p",null,'All other relevant topics are covered in the "Guides" and ',Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"/docs/next/auth_introduction"}),"Authentication Guides")," section in the sidebar!"))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return m}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(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||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),b=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},p=function(e){var t=b(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=b(a),d=n,m=p["".concat(o,".").concat(d)]||p[d]||u[d]||i;return a?r.a.createElement(m,c({ref:t},s,{components:a})):r.a.createElement(m,c({ref:t},s))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,o[1]=c;for(var s=2;s{y(e),null!=s&&m(s,e)},O=[];return r.a.createElement("div",null,r.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:l()("tabs",{"tabs--block":t})},c.map(({value:e,label:t})=>r.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":f===e,className:l()("tabs__item",b.a.tabItem,{"tabs__item--active":f===e}),key:e,ref:e=>O.push(e),onKeyDown:e=>((e,t,a)=>{switch(a.keyCode){case u:((e,t)=>{const a=e.indexOf(t)+1;e[a]?e[a].focus():e[0].focus()})(e,t);break;case p:((e,t)=>{const a=e.indexOf(t)-1;e[a]?e[a].focus():e[e.length-1].focus()})(e,t)}})(O,e.target,e),onFocus:()=>h(e),onClick:()=>h(e)},t))),r.a.createElement("div",{role:"tabpanel",className:"margin-vert--md"},n.Children.toArray(a).filter(e=>e.props.value===f)[0]))}},165:function(e,t,a){"use strict";var n=a(0),r=a.n(n),i=a(162),o=a(163),c=a(160);t.a=()=>r.a.createElement("div",{style:{padding:"30px"}},r.a.createElement(o.a,{defaultValue:"cli",values:[{label:".NET CLI",value:"cli"},{label:"Package Manager",value:"nuget"},{label:"Package Reference",value:"reference"}]},r.a.createElement(c.a,{value:"cli"},r.a.createElement(i.a,{metastring:"shell",className:"shell"},"dotnet add package SpotifyAPI.Web --version 6.0.0-beta.1\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\ndotnet add package SpotifyAPI.Web.Auth --version 6.0.0-beta.1\n")),r.a.createElement(c.a,{value:"nuget"},r.a.createElement(i.a,{metastring:"shell",className:"shell"},"Install-Package SpotifyAPI.Web -Version 6.0.0-beta.1\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\nInstall-Package SpotifyAPI.Web.Auth -Version 6.0.0-beta.1\n")),r.a.createElement(c.a,{value:"reference"},r.a.createElement(i.a,{metastring:"xml",className:"xml"},'\n\x3c!-- Optional Auth module, which includes an embedded HTTP Server for OAuth2 --\x3e\n\n'))))}}]); \ No newline at end of file diff --git a/92bb876c.47d4d3de.js.LICENSE.txt b/92bb876c.47d4d3de.js.LICENSE.txt new file mode 100644 index 00000000..bae6dd8e --- /dev/null +++ b/92bb876c.47d4d3de.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2017 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/9ed00105.3148ddcd.js b/9ed00105.3148ddcd.js new file mode 100644 index 00000000..0b6374c2 --- /dev/null +++ b/9ed00105.3148ddcd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{133:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return a})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return s}));var r=n(2),i=n(6),o=(n(0),n(151)),a={id:"configuration",title:"Configuration"},c={id:"configuration",title:"Configuration",description:"To configure the spotify client functionality, the SpotifyClientConfig class exists.",source:"@site/docs/configuration.md",permalink:"/docs/next/configuration",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/configuration.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591277053,sidebar:"docs",previous:{title:"Error Handling",permalink:"/docs/next/error_handling"},next:{title:"Logging",permalink:"/docs/next/logging"}},l=[{value:"HTTPClient Notes",id:"httpclient-notes",children:[]}],p={rightToc:l};function s(e){var t=e.components,n=Object(i.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"To configure the spotify client functionality, the ",Object(o.b)("inlineCode",{parentName:"p"},"SpotifyClientConfig")," class exists."),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'var config = SpotifyClientConfig.CreateDefault("YourAccessToken");\nvar spotify = new SpotifyClient(config);\n\n// is the same as\n\nvar spotify = new SpotifyClient("YourAccessToken");\n')),Object(o.b)("p",null,"We won't cover every possible configuration in this part, head over to the specific guides for that:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"...")),Object(o.b)("h2",{id:"httpclient-notes"},"HTTPClient Notes"),Object(o.b)("p",null,"One important part of the configuration is the used HTTPClient. By default, every time when a ",Object(o.b)("inlineCode",{parentName:"p"},"SpotifyClientConfig")," is instantiated, a new ",Object(o.b)("inlineCode",{parentName:"p"},"HTTPClient")," is created in the background. For Web Applications which require a lot of different configs due to user based access tokens, it is ",Object(o.b)("strong",{parentName:"p"},"not")," advised to create a new config from scratch with every HTTP call. Instead, a default (static) config should be used to create a new config with a new access token."),Object(o.b)("p",null,"Consider the following HTTP Endpoint:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'public HttpResult Get()\n{\n var config = SpotifyClientConfig.CreateDefault("YourAccessToken")\n var spotify = new SpotifyClient(config);\n}\n')),Object(o.b)("p",null,"This creates a new ",Object(o.b)("inlineCode",{parentName:"p"},"HTTPClient")," every time a request is made, which can be quite bad for the performance. Instead we should use a base config and use ",Object(o.b)("inlineCode",{parentName:"p"},"WithToken"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'// somewhere global/static\npublic static SpotifyClientConfig DefaultConfig = SpotifyClientConfig.CreateDefault();\n\npublic HttpResult Get()\n{\n var config = DefaultConfig.WithToken("YourAccessToken");\n var spotify = new SpotifyClient(config);\n}\n')),Object(o.b)("p",null,"This way, a single ",Object(o.b)("inlineCode",{parentName:"p"},"HTTPClient")," will be used. For a real example, checkout the ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"/docs/next/example_asp"}),"ASP.NET Example")))}s.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),i=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 c(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=i.a.createContext({}),s=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return i.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,a=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,d=u["".concat(a,".").concat(b)]||u[b]||f[b]||o;return n?i.a.createElement(d,c({ref:t},p,{components:n})):i.a.createElement(d,c({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,a=new Array(o);a[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=a.a.createContext({}),p=function(e){var t=a.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(u.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,f=s["".concat(o,".").concat(d)]||s[d]||b[d]||i;return n?a.a.createElement(f,l({ref:t},u,{components:n})):a.a.createElement(f,l({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,o[1]=l;for(var u=2;u { "3Hvu1pq89D4R0lyPBoujSv" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.SaveTracks(new List { "3Hvu1pq89D4R0lyPBoujSv" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"savetrack"},"SaveTrack"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Save one track to the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"id"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A Spotify ID"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"3Hvu1pq89D4R0lyPBoujSv"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.SaveTrack("3Hvu1pq89D4R0lyPBoujSv");\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getsavedtracks"},"GetSavedTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a list of the songs saved in the current Spotify user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first object to return. Default: 0 (i.e., the first object)"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(b.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(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"DE"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"Paging**, **SavedTrack")," contains 2 properties, ",Object(b.b)("inlineCode",{parentName:"p"},"DateTime AddedAt")," and ",Object(b.b)("inlineCode",{parentName:"p"},"FullTrack Track")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"Paging savedTracks = _spotify.GetSavedTracks();\nsavedTracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"removesavedtracks"},"RemoveSavedTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Remove one or more tracks from the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List { "3Hvu1pq89D4R0lyPBoujSv" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.RemoveSavedTracks(new List { "3Hvu1pq89D4R0lyPBoujSv" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"checksavedtracks"},"CheckSavedTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Check if one or more tracks is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List { "3Hvu1pq89D4R0lyPBoujSv" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ListResponse")," which contains a property, ",Object(b.b)("inlineCode",{parentName:"p"},"List List")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ListResponse tracksSaved = _spotify.CheckSavedTracks(new List { "3Hvu1pq89D4R0lyPBoujSv" });\nif(tracksSaved.List[0])\n Console.WriteLine("The track is in your library!");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"savealbums"},"SaveAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Save one or more albums to the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List { "1cq06d0kTUnFmJHixz1RaF" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.SaveAlbums(new List { "1cq06d0kTUnFmJHixz1RaF" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"savealbum"},"SaveAlbum"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Save one album to the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"id"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A Spotify ID"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"1cq06d0kTUnFmJHixz1RaF"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.SaveAlbum("1cq06d0kTUnFmJHixz1RaF");\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getsavedalbums"},"GetSavedAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a list of the albums saved in the current Spotify user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first object to return. Default: 0 (i.e., the first object)"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(b.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(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"DE"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"Paging"),", ",Object(b.b)("strong",{parentName:"p"},"SavedAlbum")," contains 2 properties, ",Object(b.b)("inlineCode",{parentName:"p"},"DateTime AddedAt")," and ",Object(b.b)("inlineCode",{parentName:"p"},"FullAlbum Album")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"Paging savedAlbums = _spotify.GetSavedAlbums();\nsavedAlbums.Items.ForEach(album => Console.WriteLine(album.Album.Name));\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"removesavedalbums"},"RemoveSavedAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Remove one or more albums from the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List { "1cq06d0kTUnFmJHixz1RaF" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.RemoveSavedAlbums(new List { "1cq06d0kTUnFmJHixz1RaF" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"checksavedalbums"},"CheckSavedAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Check if one or more albums is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List { "1cq06d0kTUnFmJHixz1RaF" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ListResponse")," which contains a property, ",Object(b.b)("inlineCode",{parentName:"p"},"List List")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ListResponse albumsSaved = _spotify.CheckSavedAlbums(new List { "1cq06d0kTUnFmJHixz1RaF" });\nif(albumsSaved.List[0])\n Console.WriteLine("The album is in your library!");\n')),Object(b.b)("hr",null))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n);function b(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||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),p=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},s=function(e){var t=p(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},j={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},O=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,l=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),s=p(a),O=n,u=s["".concat(l,".").concat(O)]||s[O]||j[O]||b;return a?r.a.createElement(u,c({ref:t},o,{components:a})):r.a.createElement(u,c({ref:t},o))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,l=new Array(b);l[0]=O;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var o=2;oa,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .dropdown-title .arrow{border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid #ccc;border-bottom:0}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#aaa}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number,div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px} \ No newline at end of file diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg deleted file mode 100644 index 03d83913..00000000 --- a/assets/img/search.83621669.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/js/10.002ef499.js b/assets/js/10.002ef499.js deleted file mode 100644 index 274a45b8..00000000 --- a/assets/js/10.002ef499.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{254:function(t,e,s){"use strict";s.r(e);var a=s(28),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" TokenSwapAuth")]),t._v(" "),s("p",[t._v("This way uses server-side code or at least access to an exchange server, otherwise, compared to other\nmethods, it is impossible to use.")]),t._v(" "),s("p",[t._v('With this approach, you provide the URI/URL to your desired exchange server to perform all necessary\nrequests to Spotify, as well as requests that return back to the "server URI".')]),t._v(" "),s("p",[t._v("The exchange server "),s("strong",[t._v("must")]),t._v(" be able to:")]),t._v(" "),s("ul",[s("li",[t._v('Return the authorization code from Spotify API authenticate page via GET request to the "server URI".')]),t._v(" "),s("li",[t._v("Request the token response object via POST to the Spotify API token page.")]),t._v(" "),s("li",[t._v("Request a refreshed token response object via POST to the Spotify API token page.")])]),t._v(" "),s("p",[s("strong",[t._v("The good news is that you do not need to code it yourself.")])]),t._v(" "),s("p",[t._v("The advantages of this method are that the client ID and redirect URI are very well hidden and almost unexposed, but more importantly, your client secret is "),s("strong",[t._v("never")]),t._v(" exposed and is completely hidden compared to other methods (excluding "),s("a",{attrs:{href:"/SpotifyWebAPI/auth#implicitgrantauth"}},[t._v("ImplicitGrantAuth")]),t._v("\nas it does not deal with a client secret). This means\nyour Spotify app "),s("strong",[t._v("cannot")]),t._v(" be spoofed by a malicious third party.")]),t._v(" "),s("h2",{attrs:{id:"using-tokenswapwebapifactory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapwebapifactory","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapWebAPIFactory")]),t._v(" "),s("p",[t._v("The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you.")]),t._v(" "),s("p",[t._v("It does this through the method GetWebApiAsync "),s("strong",[t._v("asynchronously")]),t._v(", which means it will not halt execution of your program while obtaining it for you. If you would like to halt execution, which is "),s("strong",[t._v("synchronous")]),t._v(", use "),s("code",[t._v("GetWebApiAsync().Result")]),t._v(" without using "),s("strong",[t._v("await")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You should store a reference to WebAPIFactory if you are using AutoRefresh or want to manually refresh it later on. New WebAPIFactory objects cannot refresh SpotifyWebAPI object that they did not give to you.")]),t._v("\nwebApiFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapWebAPIFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Scope "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AutoRefresh "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to being able to use the Spotify service.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You may want to react to your user's access expiring.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" webApiFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetWebApiAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Synchronous way:")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// spotify = webApiFactory.GetWebApiAsync().Result;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Exception")]),t._v(" ex"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// UpdateStatus($"Spotify failed to load: {ex.Message}");')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"using-tokenswapauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-tokenswapauth","aria-hidden":"true"}},[t._v("#")]),t._v(" Using TokenSwapAuth")]),t._v(" "),s("p",[t._v("Since the TokenSwapWebAPIFactory not only simplifies the whole process but offers additional functionality too\n(such as AutoRefresh and AuthSuccess AuthFailure events), use of this way is very verbose and is only\nrecommended if you are having issues with TokenSwapWebAPIFactory or need access to the tokens.")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenSwapAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n exchangeServerUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INSERT LINK TO YOUR index.php HERE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n serverUri"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadEmail "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n lastToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCodeAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n authenticated "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("OnAccessTokenExpired "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshAuthAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lastToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nauth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"token-swap-endpoint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#token-swap-endpoint","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Swap Endpoint")]),t._v(" "),s("p",[t._v("To keep your client secret completely secure and your client ID and redirect URI as secure as possible, use of a web server (such as a php website) is required.")]),t._v(" "),s("p",[t._v("To use this method, an external HTTP Server (that you may need to create) needs to be able to supply the following HTTP Endpoints to your application:")]),t._v(" "),s("p",[s("code",[t._v("/swap")]),t._v(" - Swaps out an "),s("code",[t._v("authorization_code")]),t._v(" with an "),s("code",[t._v("access_token")]),t._v(" and "),s("code",[t._v("refresh_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"authorization_code"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("code")]),t._v(" (the "),s("code",[t._v("authorization_code")]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("redirect_uri")])]),t._v(" "),s("li",[s("ul",[s("li",[s("strong",[t._v("Important")]),t._v(" The page that the redirect URI links to must return the authorization code json to your "),s("code",[t._v("serverUri")]),t._v(" (default is 'http://localhost:4002') but to the folder 'auth', like this: 'http://localhost:4002/auth'.")])])])]),t._v(" "),s("p",[s("code",[t._v("/refresh")]),t._v(" - Refreshes an "),s("code",[t._v("access_token")]),t._v(" - The following parameters are required in the JSON POST Body:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("grant_type")]),t._v(" (set to "),s("code",[t._v('"refresh_token"')]),t._v(")")]),t._v(" "),s("li",[s("code",[t._v("refresh_token")])])]),t._v(" "),s("p",[t._v("The following open-source token swap endpoint code can be used for your website:")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://github.com/rollersteaam/spotify-token-swap-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("rollersteaam/spotify-token-swap-php"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/simontaen/SpotifyTokenSwap",target:"_blank",rel:"noopener noreferrer"}},[t._v("simontaen/SpotifyTokenSwap"),s("OutboundLink")],1)])]),t._v(" "),s("h2",{attrs:{id:"remarks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#remarks","aria-hidden":"true"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),s("p",[t._v("It should be noted that GitHub Pages does not support hosting php scripts. Hosting php scripts through it will cause the php to render as plain HTML, potentially compromising your client secret while doing absolutely nothing.")]),t._v(" "),s("p",[t._v("Be sure you have whitelisted your redirect uri in the Spotify Developer Dashboard otherwise the authorization will always fail.")]),t._v(" "),s("p",[t._v("If you did not use the WebAPIFactory or you provided a "),s("code",[t._v("serverUri")]),t._v(" different from its default, you must make sure your redirect uri's script at your endpoint will properly redirect to your "),s("code",[t._v("serverUri")]),t._v(" (such as changing the areas which refer to "),s("code",[t._v("localhost:4002")]),t._v(" if you had changed "),s("code",[t._v("serverUri")]),t._v(" from its default), otherwise it will never reach your new "),s("code",[t._v("serverUri")]),t._v(".")])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/11.7de40808.js b/assets/js/11.7de40808.js deleted file mode 100644 index 82e70594..00000000 --- a/assets/js/11.7de40808.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{255:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"albums"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#albums","aria-hidden":"true"}},[t._v("#")]),t._v(" Albums")]),t._v(" "),s("h2",{attrs:{id:"getalbumtracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getalbumtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetAlbumTracks")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the album.")]),t._v(" "),s("td",[s("code",[t._v('"5O7V8l4SeXTymVp3IesT9C"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first track to return. Default: 0 (the first object).")]),t._v(" "),s("td",[s("code",[t._v("0")])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimpleTrack"),s("OutboundLink")],1),t._v(" wrapped inside a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[t._v("Paging"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimpleTrack"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" tracks "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetAlbumTracks")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5O7V8l4SeXTymVp3IesT9C"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ntracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("item "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("item"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Display all fetched Track-Names (max 20)")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Total"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Display total album track count")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getalbum"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getalbum","aria-hidden":"true"}},[t._v("#")]),t._v(" GetAlbum")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for a single album.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the album.")]),t._v(" "),s("td",[s("code",[t._v("5O7V8l4SeXTymVp3IesT9C")])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#album-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullAlbum"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullAlbum")]),t._v(" album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetAlbum")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5O7V8l4SeXTymVp3IesT9C"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"| Popularity: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" album"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Popularity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Display name and Popularity")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getseveralalbums"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getseveralalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralAlbums")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for multiple albums identified by their Spotify IDs.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("ids")]),t._v(" "),s("td",[t._v("A list of the Spotify IDs for the albums. Maximum: 20 IDs.")]),t._v(" "),s("td",[s("code",[t._v('new List() { "5O7V8l4SeXTymVp3IesT9C" }')])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SeveralAlbums")]),t._v(' which Property "Albums" contains a list of '),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#album-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullAlbum"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralAlbums")]),t._v(" albums "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralAlbums")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token generic-method"}},[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5O7V8l4SeXTymVp3IesT9C"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr")])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.db52d3ac.js b/assets/js/12.db52d3ac.js deleted file mode 100644 index 9e2baaa2..00000000 --- a/assets/js/12.db52d3ac.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{256:function(t,s,a){"use strict";a.r(s);var e=a(28),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"artists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#artists","aria-hidden":"true"}},[t._v("#")]),t._v(" Artists")]),t._v(" "),a("h2",{attrs:{id:"getartist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartist","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtist")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for a single artist identified by their unique Spotify ID.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullArtist")]),t._v(" artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getrelatedartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getrelatedartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetRelatedArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetRelatedArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartiststoptracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartiststoptracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsTopTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's top tracks by country.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("country")]),t._v(" "),a("td",[t._v("The country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralTracks")]),t._v(" object which contains the property "),a("code",[t._v("List Tracks")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" tracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsTopTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DE"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Count"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many tracks did we get?")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getartistsalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getartistsalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" GetArtistsAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("The Spotify ID for the artist.")]),t._v(" "),a("td",[a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])]),t._v(" "),a("tr",[a("td",[t._v("[type]")]),t._v(" "),a("td",[t._v("A list of keywords that will be used to filter the response. If not supplied, all album types will be returned")]),t._v(" "),a("td",[a("code",[t._v("AlbumType.All")])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first album to return. Default: 0")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market")]),t._v(" "),a("td",[a("code",[t._v('"DE"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#album-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimpleAlbum"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimpleAlbum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" albums "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetArtistsAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" AlbumType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("All"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nalbums"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getseveralartists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getseveralartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralArtists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get Spotify catalog information for several artists based on their Spotify IDs.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs for the artists. Maximum: 50 IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List() { "1KpCi9BOfviCVhmpI4G2sY" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("SeveralArtists")]),t._v(" object which contains the property "),a("code",[t._v("List Artists")]),t._v(" ("),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),a("OutboundLink")],1),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralArtists")]),t._v(" artists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralArtists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nartists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("artist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/13.8b5c9b44.js b/assets/js/13.8b5c9b44.js deleted file mode 100644 index dba34385..00000000 --- a/assets/js/13.8b5c9b44.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{257:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"browse"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browse","aria-hidden":"true"}},[t._v("#")]),t._v(" Browse")]),t._v(" "),s("h2",{attrs:{id:"getfeaturedplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getfeaturedplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetFeaturedPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore.")]),t._v(" "),s("td",[s("code",[t._v('"de_DE" //Germany')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[timestamp]")]),t._v(" "),s("td",[t._v("A timestamp in ISO 8601 format")]),t._v(" "),s("td",[s("code",[t._v("DateTime.Now")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("FeaturedPlaylists")]),t._v(" object, which has 2 properties. "),s("code",[t._v("String Message")]),t._v(" and "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FeaturedPlaylists")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetFeaturedPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Message"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getnewalbumreleases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getnewalbumreleases","aria-hidden":"true"}},[t._v("#")]),t._v(" GetNewAlbumReleases")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("NewAlbumReleases")]),t._v(" object, which has the property "),s("code",[t._v("Paging Albums")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewAlbumReleases")]),t._v(" newAlbums "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetNewAlbumReleases")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nnewAlbums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategories"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategories","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategories")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0 (the first object).")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryList")]),t._v(" object, which has the property "),s("code",[t._v("Paging Categories")]),t._v(".")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryList")]),t._v(" categoryList "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategories")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ncategoryList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Categories"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("category"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategory","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategory")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[locale]")]),t._v(" "),s("td",[t._v("The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore")]),t._v(" "),s("td",[s("code",[t._v('"de_DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#category-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Category"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Category")]),t._v(" cat "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cat"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getcategoryplaylists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getcategoryplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetCategoryPlaylists")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a list of Spotify playlists tagged with a particular category.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("categoryId")]),t._v(" "),s("td",[t._v("The Spotify category ID for the category.")]),t._v(" "),s("td",[s("code",[t._v('"party"')])])]),t._v(" "),s("tr",[s("td",[t._v("[country]")]),t._v(" "),s("td",[t._v("A country: an ISO 3166-1 alpha-2 country code.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first item to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("CategoryPlaylist")]),t._v(" object, which has the property "),s("code",[t._v("Paging Playlists")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CategoryPlaylist")]),t._v(" playlists "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetCategoryPlaylists")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"party"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlists"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr")])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/14.c0f35def.js b/assets/js/14.c0f35def.js deleted file mode 100644 index 3ecf437e..00000000 --- a/assets/js/14.c0f35def.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{258:function(e,t,s){"use strict";s.r(t);var a=s(28),r=Object(a.a)({},function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples","aria-hidden":"true"}},[this._v("#")]),this._v(" Examples")]),this._v(" "),t("p",[this._v("This page is currently empty. Do you have useful examples? Please open a PR")])])},[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/15.cfa7a58a.js b/assets/js/15.cfa7a58a.js deleted file mode 100644 index ba81f06f..00000000 --- a/assets/js/15.cfa7a58a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{259:function(t,s,a){"use strict";a.r(s);var e=a(28),n=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"follow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#follow","aria-hidden":"true"}},[t._v("#")]),t._v(" Follow")]),t._v(" "),a("h2",{attrs:{id:"follow-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#follow-2","aria-hidden":"true"}},[t._v("#")]),t._v(" Follow")]),t._v(" "),a("blockquote",[a("p",[t._v("Add the current user as a follower of one or more artists or other Spotify users.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("followType")]),t._v(" "),a("td",[t._v("The ID type: either artist or user.")]),t._v(" "),a("td",[a("code",[t._v("FollowType.Artist")])])]),t._v(" "),a("tr",[a("td",[t._v("ids or id")]),t._v(" "),a("td",[t._v("A list of the artist or the user Spotify IDs or just a Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('new List { "1KpCi9BOfviCVhmpI4G2sY" }')]),t._v(" or "),a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Follow")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("FollowType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//or if it's a User")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Follow")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("FollowType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("User"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"unfollow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#unfollow","aria-hidden":"true"}},[t._v("#")]),t._v(" Unfollow")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove the current user as a follower of one or more artists or other Spotify users.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("followType")]),t._v(" "),a("td",[t._v("The ID type: either artist or user.")]),t._v(" "),a("td",[a("code",[t._v("FollowType.Artist")])])]),t._v(" "),a("tr",[a("td",[t._v("ids or id")]),t._v(" "),a("td",[t._v("A list of the artist or the user Spotify IDs or just a Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('new List { "1KpCi9BOfviCVhmpI4G2sY" }')]),t._v(" or "),a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Unfollow")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("FollowType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Artist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1KpCi9BOfviCVhmpI4G2sY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//or if it's a User")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Unfollow")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("FollowType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("User"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"isfollowing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#isfollowing","aria-hidden":"true"}},[t._v("#")]),t._v(" IsFollowing")]),t._v(" "),a("blockquote",[a("p",[t._v("Check to see if the current user is following one or more artists or other Spotify users.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("followType")]),t._v(" "),a("td",[t._v("The ID type: either artist or user.")]),t._v(" "),a("td",[a("code",[t._v("FollowType.Artist")])])]),t._v(" "),a("tr",[a("td",[t._v("ids or id")]),t._v(" "),a("td",[t._v("A list of the artist or the user Spotify IDs or just a Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('new List { "1KpCi9BOfviCVhmpI4G2sY" }')]),t._v(" or "),a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ListResponse")]),t._v(" which contains the property "),a("code",[t._v("List List")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Are you one of my Followers? :P")]),t._v("\nListResponse"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("Boolean"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("IsFollowing")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("FollowType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("User"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("List"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("?")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Yis!"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"No :("')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"followplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#followplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" FollowPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Add the current user as a follower of a playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ownerId")]),t._v(" "),a("td",[t._v("The Spotify user ID of the person who owns the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"maxloermans"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.")]),t._v(" "),a("td",[a("code",[t._v('"3SIp2VAsKI03mReF0dFBmI"')])])]),t._v(" "),a("tr",[a("td",[t._v("[showPublic]")]),t._v(" "),a("td",[t._v("If true the playlist will be included in user's public playlists, if false it will remain private.")]),t._v(" "),a("td",[a("code",[t._v("true")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("FollowPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"maxloermans"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3SIp2VAsKI03mReF0dFBmI"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"unfollowplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#unfollowplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" UnfollowPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove the current user as a follower of a playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ownerId")]),t._v(" "),a("td",[t._v("The Spotify user ID of the person who owns the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"maxloermans"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID of the playlist that is to be no longer followed.")]),t._v(" "),a("td",[a("code",[t._v('"3SIp2VAsKI03mReF0dFBmI"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("UnfollowPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"maxloermans"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3SIp2VAsKI03mReF0dFBmI"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"isfollowingplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#isfollowingplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" IsFollowingPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Check to see if one or more Spotify users are following a specified playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ownerId")]),t._v(" "),a("td",[t._v("The Spotify user ID of the person who owns the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"maxloermans"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID of the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"3SIp2VAsKI03mReF0dFBmI"')])])]),t._v(" "),a("tr",[a("td",[t._v("ids or id")]),t._v(" "),a("td",[t._v("A list of the artist or the user Spotify IDs or just a Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('new List { "1KpCi9BOfviCVhmpI4G2sY" }')]),t._v(" or "),a("code",[t._v('"1KpCi9BOfviCVhmpI4G2sY"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ListResponse")]),t._v(" which contains the property "),a("code",[t._v("List List")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Am I following the playlist?")]),t._v("\nListResponse"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("Boolean"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("IsFollowing")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"maxloermans"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3SIp2VAsKI03mReF0dFBmI"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("List"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("?")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Yis!"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"No :("')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/16.9c0ba2de.js b/assets/js/16.9c0ba2de.js deleted file mode 100644 index 7e3e78ba..00000000 --- a/assets/js/16.9c0ba2de.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{260:function(t,a,s){"use strict";s.r(a);var e=s(28),r=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"getting-started"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),s("p",[t._v("This API provides full access to the new SpotifyWebAPI introduced "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".\nWith it, you can search for Tracks/Albums/Artists and also get User-based information.\nIt's also possible to create new playlists and add tracks to it.")]),t._v(" "),s("h2",{attrs:{id:"first-steps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#first-steps","aria-hidden":"true"}},[t._v("#")]),t._v(" First steps")]),t._v(" "),s("h3",{attrs:{id:"imports"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#imports","aria-hidden":"true"}},[t._v("#")]),t._v(" Imports")]),t._v(" "),s("p",[t._v("So after you added the API to your project, you may want to add following imports to your files:")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("using")]),t._v(" SpotifyAPI"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Web"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Base Namespace")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("using")]),t._v(" SpotifyAPI"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Web"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Enums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Enums")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("using")]),t._v(" SpotifyAPI"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Web"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Models"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Models for the JSON-responses")]),t._v("\n")])])]),s("h3",{attrs:{id:"basic-usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#basic-usage","aria-hidden":"true"}},[t._v("#")]),t._v(" Basic-Usage")]),t._v(" "),s("p",[t._v("Now you can actually start doing calls to the SpotifyAPI, just create a new Instance of SpotifyWebAPI:")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("String"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n _spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"XXXXXXXXXXXX"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bearer"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullTrack")]),t._v(" track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetTrack")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3Hvu1pq89D4R0lyPBoujSv"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Yeay! We just printed a tracks name.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("You may note that we used "),s("code",[t._v("AccessToken")]),t._v(" and "),s("code",[t._v("TokenType")]),t._v(". Spotify does not allow un-authorized access to their API. You will need to implement one of the auth flows. Luckily, "),s("code",[t._v("SpotifyAPI.Web.Auth")]),t._v(" exists for this reason. A simple way to receive a "),s("code",[t._v("AccessToken")]),t._v(" is via "),s("code",[t._v("CredentialAuth")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"YourClientID"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"YourClientSecret"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetToken")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n_spotify "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("For more info, visit the "),s("RouterLink",{attrs:{to:"/auth/getting_started/"}},[t._v("Getting Started of SpotifyAPI.Web.Auth")])],1),t._v(" "),s("hr"),t._v(" "),s("h2",{attrs:{id:"examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#examples","aria-hidden":"true"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),s("p",[t._v("A list of small examples can be found "),s("RouterLink",{attrs:{to:"/web/examples/"}},[t._v("here")]),t._v(". Do you think a specific example is missing? Feel free to open a PR.mdIssue!")],1),t._v(" "),s("hr"),t._v(" "),s("h2",{attrs:{id:"error-handling"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#error-handling","aria-hidden":"true"}},[t._v("#")]),t._v(" Error-Handling")]),t._v(" "),s("p",[t._v("Every API-Call returns a reponse-model which consists of base-error model. To check if a specific API-Call was successful, use the following approach:")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("PrivateProfile")]),t._v(" profile "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPrivateProfile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("profile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Error Status: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" profile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Status"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Error Msg: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" profile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Message"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In case some or all of the returned values are null, consult error status and message, they can lead to an explanation!")]),t._v(" "),s("h2",{attrs:{id:"sync-vs-asynchronous"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sync-vs-asynchronous","aria-hidden":"true"}},[t._v("#")]),t._v(" Sync vs Asynchronous")]),t._v(" "),s("p",[t._v("Every API-Call has an "),s("code",[t._v("asynchronous")]),t._v(" and "),s("code",[t._v("synchronous")]),t._v(" method.")]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Test")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" asyncProfile "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPrivateProfileAsync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" syncProfile "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPrivateProfile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Note that the "),s("code",[t._v("synchronous")]),t._v(" call will block the current Thread!")]),t._v(" "),s("hr"),t._v(" "),s("h2",{attrs:{id:"api-reference"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#api-reference","aria-hidden":"true"}},[t._v("#")]),t._v(" API-Reference")]),t._v(" "),s("h3",{attrs:{id:"albums"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#albums","aria-hidden":"true"}},[t._v("#")]),t._v(" Albums")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/albums.html#getalbumtracks"}},[t._v("GetAlbumTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/albums.html#getalbum"}},[t._v("GetAlbum")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/albums.html#getseveralalbums"}},[t._v("GetSeveralAlbums")])],1)]),t._v(" "),s("h3",{attrs:{id:"artists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#artists","aria-hidden":"true"}},[t._v("#")]),t._v(" Artists")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/artists.html#getartist"}},[t._v("GetArtist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/artists.html#getrelatedartists"}},[t._v("GetRelatedArtists")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/artists.html#getartiststoptracks"}},[t._v("GetArtistsTopTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/artists.html#getartistsalbums"}},[t._v("GetArtistsAlbums")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/artists.html#getseveralartists"}},[t._v("GetSeveralArtists")])],1)]),t._v(" "),s("h3",{attrs:{id:"browse"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browse","aria-hidden":"true"}},[t._v("#")]),t._v(" Browse")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/browse.html#getfeaturedplaylists"}},[t._v("GetFeaturedPlaylists")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/browse.html#getnewalbumreleases"}},[t._v("GetNewAlbumReleases")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/browse.html#getcategories"}},[t._v("GetCategories")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/browse.html#getcategory"}},[t._v("GetCategory")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/browse.html#getcategoryplaylists"}},[t._v("GetCategoryPlaylists")])],1)]),t._v(" "),s("h3",{attrs:{id:"follow"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#follow","aria-hidden":"true"}},[t._v("#")]),t._v(" Follow")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#follow"}},[t._v("Follow")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#unfollow"}},[t._v("Unfollow")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#isfollowing"}},[t._v("IsFollowing")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#followplaylist"}},[t._v("FollowPlaylist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#unfollowplaylist"}},[t._v("UnfollowPlaylist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/follow.html#isfollowingplaylist"}},[t._v("IsFollowingPlaylist")])],1)]),t._v(" "),s("h3",{attrs:{id:"library"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#library","aria-hidden":"true"}},[t._v("#")]),t._v(" Library")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/library.html#savetracks"}},[t._v("SaveTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#savetrack"}},[t._v("SaveTrack")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#getsavedtracks"}},[t._v("GetSavedTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#removesavedtracks"}},[t._v("RemoveSavedTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#checksavedtracks"}},[t._v("CheckSavedTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#savealbums"}},[t._v("SaveAlbums")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#savealbum"}},[t._v("SaveAlbum")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#getsavedalbums"}},[t._v("GetSavedAlbums")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#removesavedalbums"}},[t._v("RemoveSavedAlbums")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/library.html#checksavedalbums"}},[t._v("CheckSavedAlbums")])],1)]),t._v(" "),s("h3",{attrs:{id:"personalization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#personalization","aria-hidden":"true"}},[t._v("#")]),t._v(" Personalization")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/personalization.html#getuserstoptracks"}},[t._v("GetUsersTopTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/personalization.html#getuserstopartists"}},[t._v("GetUsersTopArtists")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/personalization.html#getusersrecentlyplayedtracks"}},[t._v("GetUsersRecentlyPlayedTracks")])],1)]),t._v(" "),s("h3",{attrs:{id:"player"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#player","aria-hidden":"true"}},[t._v("#")]),t._v(" Player")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/player.html#getdevices"}},[t._v("GetDevices")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#getplayback"}},[t._v("GetPlayback")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#getplayingtrack"}},[t._v("GetPlayingTrack")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#transferplayback"}},[t._v("TransferPlayback")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#resumeplayback"}},[t._v("ResumePlayback")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#pauseplayback"}},[t._v("PausePlayback")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#skipplaybacktonext"}},[t._v("SkipPlaybackToNext")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#skipplaybacktoprevious"}},[t._v("SkipPlaybackToPrevious")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#setrepeatmode"}},[t._v("SetRepeatMode")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#setvolume"}},[t._v("SetVolume")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/player.html#setshuffle"}},[t._v("SetShuffle")])],1)]),t._v(" "),s("h3",{attrs:{id:"playlists"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#playlists","aria-hidden":"true"}},[t._v("#")]),t._v(" Playlists")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#getuserplaylists"}},[t._v("GetUserPlaylists")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#getplaylist"}},[t._v("GetPlaylist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#getplaylisttracks"}},[t._v("GetPlaylistTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#createplaylist"}},[t._v("CreatePlaylist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#updateplaylist"}},[t._v("UpdatePlaylist")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#replaceplaylisttracks"}},[t._v("ReplacePlaylistTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#removeplaylisttracks"}},[t._v("RemovePlaylistTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#removeplaylisttrack"}},[t._v("RemovePlaylistTrack")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#addplaylisttracks"}},[t._v("AddPlaylistTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#addplaylisttrack"}},[t._v("AddPlaylistTrack")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/playlists.html#reorderplaylist"}},[t._v("ReorderPlaylist")])],1)]),t._v(" "),s("h3",{attrs:{id:"profiles"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#profiles","aria-hidden":"true"}},[t._v("#")]),t._v(" Profiles")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/profiles.html#getpublicprofile"}},[t._v("GetPublicProfile")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/profiles.html#getprivateprofile"}},[t._v("GetPrivateProfile")])],1)]),t._v(" "),s("h3",{attrs:{id:"search"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#search","aria-hidden":"true"}},[t._v("#")]),t._v(" Search")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/search.html#searchitems"}},[t._v("SearchItems")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/search.html#searchitemsescaped"}},[t._v("SearchItemsEscaped")])],1)]),t._v(" "),s("h3",{attrs:{id:"tracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tracks","aria-hidden":"true"}},[t._v("#")]),t._v(" Tracks")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/tracks.html#getseveraltracks"}},[t._v("GetSeveralTracks")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/tracks.html#gettrack"}},[t._v("GetTrack")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/web/tracks.html#getaudioanalysis"}},[t._v("GetAudioAnalysis")])],1)]),t._v(" "),s("h3",{attrs:{id:"util"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#util","aria-hidden":"true"}},[t._v("#")]),t._v(" Util")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/web/utils.html"}},[t._v("Utility-Functions")])],1)])])},[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/17.5154e8d9.js b/assets/js/17.5154e8d9.js deleted file mode 100644 index 3a0e2963..00000000 --- a/assets/js/17.5154e8d9.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{261:function(t,s,a){"use strict";a.r(s);var e=a(28),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"library"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#library","aria-hidden":"true"}},[t._v("#")]),t._v(" Library")]),t._v(" "),a("h2",{attrs:{id:"savetracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#savetracks","aria-hidden":"true"}},[t._v("#")]),t._v(" SaveTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Save one or more tracks to the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs")]),t._v(" "),a("td",[a("code",[t._v('new List { "3Hvu1pq89D4R0lyPBoujSv" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("SaveTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3Hvu1pq89D4R0lyPBoujSv"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"savetrack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#savetrack","aria-hidden":"true"}},[t._v("#")]),t._v(" SaveTrack")]),t._v(" "),a("blockquote",[a("p",[t._v("Save one track to the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("A Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('"3Hvu1pq89D4R0lyPBoujSv"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("SaveTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3Hvu1pq89D4R0lyPBoujSv"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getsavedtracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getsavedtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSavedTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a list of the songs saved in the current Spotify user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first object to return. Default: 0 (i.e., the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[a("code",[t._v("DE")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("Paging**, **SavedTrack")]),t._v(" contains 2 properties, "),a("code",[t._v("DateTime AddedAt")]),t._v(" and "),a("code",[t._v("FullTrack Track")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SavedTrack"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" savedTracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSavedTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nsavedTracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removesavedtracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removesavedtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" RemoveSavedTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more tracks from the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List { "3Hvu1pq89D4R0lyPBoujSv" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemoveSavedTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3Hvu1pq89D4R0lyPBoujSv"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"checksavedtracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#checksavedtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" CheckSavedTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Check if one or more tracks is already saved in the current Spotify user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List { "3Hvu1pq89D4R0lyPBoujSv" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ListResponse")]),t._v(" which contains a property, "),a("code",[t._v("List List")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("ListResponse"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("bool")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" tracksSaved "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("CheckSavedTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3Hvu1pq89D4R0lyPBoujSv"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tracksSaved"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("List"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The track is in your library!"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"savealbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#savealbums","aria-hidden":"true"}},[t._v("#")]),t._v(" SaveAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Save one or more albums to the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs")]),t._v(" "),a("td",[a("code",[t._v('new List { "1cq06d0kTUnFmJHixz1RaF" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("SaveAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1cq06d0kTUnFmJHixz1RaF"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"savealbum"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#savealbum","aria-hidden":"true"}},[t._v("#")]),t._v(" SaveAlbum")]),t._v(" "),a("blockquote",[a("p",[t._v("Save one album to the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("id")]),t._v(" "),a("td",[t._v("A Spotify ID")]),t._v(" "),a("td",[a("code",[t._v('"1cq06d0kTUnFmJHixz1RaF"')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("SaveAlbum")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1cq06d0kTUnFmJHixz1RaF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getsavedalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getsavedalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSavedAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a list of the albums saved in the current Spotify user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first object to return. Default: 0 (i.e., the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[a("code",[t._v("DE")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("Paging")]),t._v(", "),a("strong",[t._v("SavedAlbum")]),t._v(" contains 2 properties, "),a("code",[t._v("DateTime AddedAt")]),t._v(" and "),a("code",[t._v("FullAlbum Album")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SavedAlbum"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" savedAlbums "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSavedAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nsavedAlbums"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("album"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Album"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removesavedalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removesavedalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" RemoveSavedAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more albums from the current user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List { "1cq06d0kTUnFmJHixz1RaF" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemoveSavedAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1cq06d0kTUnFmJHixz1RaF"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"checksavedalbums"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#checksavedalbums","aria-hidden":"true"}},[t._v("#")]),t._v(" CheckSavedAlbums")]),t._v(" "),a("blockquote",[a("p",[t._v("Check if one or more albums is already saved in the current Spotify user’s “Your Music” library.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("ids")]),t._v(" "),a("td",[t._v("A list of the Spotify IDs.")]),t._v(" "),a("td",[a("code",[t._v('new List { "1cq06d0kTUnFmJHixz1RaF" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ListResponse")]),t._v(" which contains a property, "),a("code",[t._v("List List")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("ListResponse"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("bool")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" albumsSaved "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("CheckSavedAlbums")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1cq06d0kTUnFmJHixz1RaF"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("albumsSaved"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("List"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The album is in your library!"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/18.6bcd5883.js b/assets/js/18.6bcd5883.js deleted file mode 100644 index f0f3a7ab..00000000 --- a/assets/js/18.6bcd5883.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{262:function(t,e,r){"use strict";r.r(e);var a=r(28),s=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"personalization"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#personalization","aria-hidden":"true"}},[t._v("#")]),t._v(" Personalization")]),t._v(" "),r("h2",{attrs:{id:"getuserstoptracks"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getuserstoptracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersTopTracks")]),t._v(" "),r("blockquote",[r("p",[t._v("Get the current user’s top tracks based on calculated affinity.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[timeRange]")]),t._v(" "),r("td",[t._v("Over what time frame the affinities are compute.")]),t._v(" "),r("td",[r("code",[t._v("TimeRangeType.MediumTerm")])])]),t._v(" "),r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[offset]")]),t._v(" "),r("td",[t._v("The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.")]),t._v(" "),r("td",[r("code",[t._v("0")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),r("OutboundLink")],1),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("Paging tracks = _spotify.GetUsersTopTracks();\ntracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)\nConsole.WriteLine(tracks.Total.ToString()) //Display total album track count\n")])])]),r("hr"),t._v(" "),r("h2",{attrs:{id:"getuserstopartists"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getuserstopartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersTopArtists")]),t._v(" "),r("blockquote",[r("p",[t._v("Get the current user’s top artists based on calculated affinity.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[timeRange]")]),t._v(" "),r("td",[t._v("Over what time frame the affinities are compute.")]),t._v(" "),r("td",[r("code",[t._v("TimeRangeType.MediumTerm")])])]),t._v(" "),r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[offset]")]),t._v(" "),r("td",[t._v("The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.")]),t._v(" "),r("td",[r("code",[t._v("0")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),r("OutboundLink")],1),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("Paging artists = _spotify.GetUsersTopArtists();\nartists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)\n")])])]),r("hr"),t._v(" "),r("h2",{attrs:{id:"getusersrecentlyplayedtracks"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getusersrecentlyplayedtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersRecentlyPlayedTracks")]),t._v(" "),r("blockquote",[r("p",[t._v("Get tracks from the current user’s recent play history.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[after]")]),t._v(" "),r("td",[t._v("Returns all items after (but not including) this cursor position.")]),t._v(" "),r("td",[r("code",[t._v("DateTime.Now.AddDays(-1)")])])]),t._v(" "),r("tr",[r("td",[t._v("[before]")]),t._v(" "),r("td",[t._v("Returns all items before (but not including) this cursor position.")]),t._v(" "),r("td",[r("code",[t._v("DateTime.Now.AddDays(-1)")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("code",[t._v("PlayHistory")]),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#cursor-based-paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("CursorPaging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("CursorPaging histories = _spotify.GetUsersRecentlyPlayedTracks();\nhistories.Items.ForEach(item => Console.WriteLine(item.Track.Name));\n")])])]),r("hr")])},[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/19.598a9a7a.js b/assets/js/19.598a9a7a.js deleted file mode 100644 index e792b3f5..00000000 --- a/assets/js/19.598a9a7a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{263:function(t,a,e){"use strict";e.r(a);var s=e(28),r=Object(s.a)({},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"player"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#player","aria-hidden":"true"}},[t._v("#")]),t._v(" Player")]),t._v(" "),e("h2",{attrs:{id:"getdevices"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getdevices","aria-hidden":"true"}},[t._v("#")]),t._v(" GetDevices")]),t._v(" "),e("blockquote",[e("p",[t._v("Get information about a user’s available devices.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody")]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AvailabeDevices")]),t._v(" devices "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetDevices")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndevices"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Devices"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("device "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("device"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"getplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Get information about the user’s current playback state, including track, track progress, and active device.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[market]")]),t._v(" "),e("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),e("td",[e("code",[t._v('"DE"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("PlaybackContext")]),t._v(" context "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Item "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Item"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Print the current song")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"getplayingtrack"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getplayingtrack","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlayingTrack")]),t._v(" "),e("blockquote",[e("p",[t._v("Get the object currently being played on the user’s Spotify account.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[market]")]),t._v(" "),e("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),e("td",[e("code",[t._v('"DE"')])])])])]),t._v(" "),e("p",[t._v("This is a simpler (less data) version of "),e("code",[t._v("GetPlayback")])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("PlaybackContext")]),t._v(" context "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlayingTrack")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Item "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Item"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Print the current song")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"transferplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#transferplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" TransferPlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Transfer playback to a new device and determine if it should start playing.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("deviceIds or deviceId")]),t._v(" "),e("td",[t._v("A JSON array containing the ID of the device on which playback should be started/transferred")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])]),t._v(" "),e("tr",[e("td",[t._v("play")]),t._v(" "),e("td",[t._v("true: ensure playback happens on new device, false: keep current playback state")]),t._v(" "),e("td",[e("code",[t._v("true")])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("TransferPlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"XXXX-XXXX-XXXX-XXXX"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"resumeplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#resumeplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" ResumePlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Start a new context or resume current playback on the user’s active device.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])]),t._v(" "),e("tr",[e("td",[t._v("contextUri")]),t._v(" "),e("td",[t._v("Spotify URI of the context to play")]),t._v(" "),e("td",[e("code",[t._v('"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"')])])]),t._v(" "),e("tr",[e("td",[t._v("uris")]),t._v(" "),e("td",[t._v("An array of the Spotify track URIs to play.")]),t._v(" "),e("td",[e("code",[t._v('new List { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }')])])]),t._v(" "),e("tr",[e("td",[t._v("offset")]),t._v(" "),e("td",[t._v("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.")]),t._v(" "),e("td",[e("code",[t._v("0")])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("ResumePlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("uris"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"spotify:track:4iV5W9uYEdYUVa79Axb7Rh"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"pauseplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pauseplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" PausePlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Pause playback on the user’s account.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("PausePlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"skipplaybacktonext"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#skipplaybacktonext","aria-hidden":"true"}},[t._v("#")]),t._v(" SkipPlaybackToNext")]),t._v(" "),e("blockquote",[e("p",[t._v("Skips to next track in the user’s queue.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SkipPlaybackToNext")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"skipplaybacktoprevious"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#skipplaybacktoprevious","aria-hidden":"true"}},[t._v("#")]),t._v(" SkipPlaybackToPrevious")]),t._v(" "),e("blockquote",[e("p",[t._v("Skips to previous track in the user’s queue.\nNote that this will ALWAYS skip to the previous track, regardless of the current track’s progress.\nReturning to the start of the current track should be performed using the https://api.spotify.com/v1/me/player/seek endpoint.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SkipPlaybackToPrevious")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"seekplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#seekplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" SeekPlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Seeks to the given position in the user’s currently playing track.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("positionMs")]),t._v(" "),e("td",[t._v("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.")]),t._v(" "),e("td",[e("code",[t._v("50")])])]),t._v(" "),e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SeekPlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"setrepeatmode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setrepeatmode","aria-hidden":"true"}},[t._v("#")]),t._v(" SetRepeatMode")]),t._v(" "),e("blockquote",[e("p",[t._v("Set the repeat mode for the user’s playback. Options are repeat-track, repeat-context, and off.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("state")]),t._v(" "),e("td",[t._v("track, context or off.")]),t._v(" "),e("td",[e("code",[t._v("RepeatState.Track")])])]),t._v(" "),e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SetRepeatMode")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("RepeatState"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"setvolume"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setvolume","aria-hidden":"true"}},[t._v("#")]),t._v(" SetVolume")]),t._v(" "),e("blockquote",[e("p",[t._v("Set the volume for the user’s current playback device.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("volumePercent")]),t._v(" "),e("td",[t._v("Integer. The volume to set. Must be a value from 0 to 100 inclusive.")]),t._v(" "),e("td",[e("code",[t._v("50")])])]),t._v(" "),e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SetVolume")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"setshuffle"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setshuffle","aria-hidden":"true"}},[t._v("#")]),t._v(" SetShuffle")]),t._v(" "),e("blockquote",[e("p",[t._v("Toggle shuffle on or off for user’s playback.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("shuffle")]),t._v(" "),e("td",[t._v("True or False")]),t._v(" "),e("td",[e("code",[t._v("false")])])]),t._v(" "),e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("SetShuffle")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("false")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"addtoqueue"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#addtoqueue","aria-hidden":"true"}},[t._v("#")]),t._v(" AddToQueue")]),t._v(" "),e("blockquote",[e("p",[t._v("Add an Item to the User's Playback Queue. BETA.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("uri")]),t._v(" "),e("td",[t._v("The uri of the item to add to the queue. Must be a track or an episode uri.")]),t._v(" "),e("td",[e("code",[t._v("spotify:track:7zrCVKp6x0AtolOsn2iMif")])])]),t._v(" "),e("tr",[e("td",[t._v("[deviceId]")]),t._v(" "),e("td",[t._v("The id of the device this command is targeting. If not supplied, the user's currently active device is the target.")]),t._v(" "),e("td",[e("code",[t._v('"XXXX-XXXX-XXXX-XXXX"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" error "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("AddToQueue")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"spotify:track:7zrCVKp6x0AtolOsn2iMif"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/2.31113494.js b/assets/js/2.31113494.js deleted file mode 100644 index b5658c56..00000000 --- a/assets/js/2.31113494.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],Array(142).concat([function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"a",function(){return o}),n.d(e,"i",function(){return a}),n.d(e,"f",function(){return u}),n.d(e,"g",function(){return c}),n.d(e,"h",function(){return l}),n.d(e,"b",function(){return f}),n.d(e,"e",function(){return p}),n.d(e,"k",function(){return h}),n.d(e,"l",function(){return d}),n.d(e,"c",function(){return v}),n.d(e,"j",function(){return g});n(17),n(66),n(103),n(167),n(168),n(40),n(29),n(147),n(41),n(169),n(69);var r=/#.*$/,i=/\.(md|html)$/,o=/\/$/,a=/^[a-z]+:/i;function s(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return a.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function f(t){if(u(t))return t;var e=t.match(r),n=e?e[0]:"",i=s(t);return o.test(i)?t:i+".html"+n}function p(t,e){var n=decodeURIComponent(t.hash),i=function(t){var e=t.match(r);if(e)return e[0]}(e);return(!i||n===i)&&s(t.path)===s(e)}function h(t,e,n){if(u(e))return{type:"external",path:e};n&&(e=function(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var i=e.split("/");n&&i[i.length-1]||i.pop();for(var o=t.replace(/^\//,"").split("/"),a=0;a3&&void 0!==arguments[3]?arguments[3]:1;if("string"==typeof e)return h(n,e,r);if(Array.isArray(e))return Object.assign(h(n,e[0],r),{title:e[1]});var o=e.children||[];return 0===o.length&&e.path?Object.assign(h(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,children:o.map(function(e){return t(e,n,r,i+1)}),collapsable:!1!==e.collapsable}}(t,i,c)}):[]}return[]}function v(t){var e;return(t=t.map(function(t){return Object.assign({},t)})).forEach(function(t){2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(function(t){return 2===t.level})}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(175)(Object,"create");t.exports=r},function(t,e,n){var r=n(216);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(222);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){"use strict";var r=n(100),i=n(8),o=n(12),a=n(16),s=n(101),u=n(102);r("match",1,function(t,e,n){return[function(e){var n=a(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,p=[],h=0;null!==(f=u(a,c));){var d=String(f[0]);p[h]=d,""===d&&(a.lastIndex=s(c,o(a.lastIndex),l)),h++}return 0===h?null:p}]})},function(t,e,n){},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){var r=n(151),i=n(174),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(152),i=n(194),o=n(195),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(153).Symbol;t.exports=r},function(t,e,n){var r=n(193),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,function(t,e,n){n(0)({target:"Array",stat:!0},{isArray:n(42)})},function(t,e,n){"use strict";var r=n(0),i=n(43),o=n(10),a=n(30),s=[].join,u=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:u||!c},{join:function(t){return s.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(100),i=n(98),o=n(8),a=n(16),s=n(183),u=n(101),c=n(12),l=n(102),f=n(46),p=n(2),h=[].push,d=Math.min,v=!p(function(){return!RegExp(4294967295,"y")});r("split",2,function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);for(var s,u,c,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,v=new RegExp(t.source,p+"g");(s=f.call(v,r))&&!((u=v.lastIndex)>d&&(l.push(r.slice(d,s.index)),s.length>1&&s.index=o));)v.lastIndex===s.index&&v.lastIndex++;return d===r.length?!c&&v.test("")||l.push(""):l.push(r.slice(d)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var f=o(t),p=String(this),h=s(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),b=new h(v?f:"^(?:"+f.source+")",m),_=void 0===i?4294967295:i>>>0;if(0===_)return[];if(0===p.length)return null===l(b,p)?[p]:[];for(var x=0,y=0,k=[];y-1)&&(e=e.replace(/y/g,""));var s=a(y?new m(t,e):m(t,e),r?this:b,$);return k&&n&&d(s,{sticky:n}),s},C=function(t){t in $||s($,t,{configurable:!0,get:function(){return m[t]},set:function(e){m[t]=e}})},L=u(m),w=0;L.length>w;)C(L[w++]);b.constructor=$,$.prototype=b,p(i,"RegExp",$)}v("RegExp")},function(t,e,n){"use strict";var r=n(13),i=n(8),o=n(2),a=n(99),s=RegExp.prototype,u=s.toString,c=o(function(){return"/a/b"!=u.call({source:"a",flags:"b"})}),l="toString"!=u.name;(c||l)&&r(RegExp.prototype,"toString",function(){var t=i(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n)},{unsafe:!0})},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(203),i=n(208);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){"use strict";n.r(e);n(97);var r=n(142),i={name:"SidebarGroup",components:{DropdownTransition:n(179).a},props:["item","open","collapsable","depth"],beforeCreate:function(){this.$options.components.SidebarLinks=n(178).default},methods:{isActive:r.e}},o=(n(242),n(28)),a=Object(o.a)(i,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?n("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):n("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),n("DropdownTransition",[t.open||!t.collapsable?n("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,depth:t.depth+1}}):t._e()],1)],1)},[],!1,null,null,null).exports;n(243),n(40);function s(t,e,n,r,i){var o={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(o.style={"padding-left":i+"rem"}),t("RouterLink",o,n)}function u(t,e,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return!e||a>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(function(e){var c=Object(r.e)(i,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,n+"#"+e.slug,e.title,c,e.level-1),u(t,e.children,n,i,o,a+1)])}))}var c={functional:!0,props:["item","sidebarDepth"],render:function(t,e){var n=e.parent,i=n.$page,o=(n.$site,n.$route),a=n.$themeConfig,c=n.$themeLocaleConfig,l=e.props,f=l.item,p=l.sidebarDepth,h=Object(r.e)(o,f.path),d="auto"===f.type?h||f.children.some(function(t){return Object(r.e)(o,f.basePath+"#"+t.slug)}):h,v="external"===f.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,f.path,f.title||f.path):s(t,f.path,f.title||f.path,d),g=[i.frontmatter.sidebarDepth,p,c.sidebarDepth,a.sidebarDepth,1].find(function(t){return void 0!==t}),m=c.displayAllHeaders||a.displayAllHeaders;return"auto"===f.type?[v,u(t,f.children,f.basePath,o,g)]:(d||m)&&f.headers&&!r.d.test(f.path)?[v,u(t,Object(r.c)(f.headers),f.path,o,g)]:v}};n(244);function l(t,e){return"group"===e.type&&e.children.some(function(e){return"group"===e.type?l(t,e):"page"===e.type&&Object(r.e)(t,e.path)})}var f={name:"SidebarLinks",components:{SidebarGroup:a,SidebarLink:Object(o.a)(c,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth"],data:function(){return{openGroupIndex:0}},watch:{$route:function(){this.refreshIndex()}},created:function(){this.refreshIndex()},methods:{refreshIndex:function(){var t=function(t,e){for(var n=0;n-1&&(this.openGroupIndex=t)},toggleGroup:function(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive:function(t){return Object(r.e)(this.$route,t.regularPath)}}},p=Object(o.a)(f,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.items.length?n("ul",{staticClass:"sidebar-links"},t._l(t.items,function(e,r){return n("li",{key:r},["group"===e.type?n("SidebarGroup",{attrs:{item:e,open:r===t.openGroupIndex,collapsable:e.collapsable||e.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(r)}}}):n("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:e}})],1)}),0):t._e()},[],!1,null,null,null);e.default=p.exports},function(t,e,n){"use strict";var r={name:"DropdownTransition",methods:{setHeight:function(t){t.style.height=t.scrollHeight+"px"},unsetHeight:function(t){t.style.height=""}}},i=(n(233),n(28)),o=Object(i.a)(r,function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)},[],!1,null,null,null);e.a=o.exports},function(t,e,n){"use strict";var r=n(0),i=n(181);r({target:"String",proto:!0,forced:n(182)("link")},{link:function(t){return i(this,"a","href",t)}})},function(t,e,n){var r=n(16),i=/"/g;t.exports=function(t,e,n,o){var a=String(r(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,""")+'"'),s+">"+a+""}},function(t,e,n){var r=n(2);t.exports=function(t){return r(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})}},function(t,e,n){var r=n(8),i=n(63),o=n(1)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){"use strict";var r=n(148);n.n(r).a},function(t,e,n){var r=n(0),i=n(186);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){var r=n(3),i=n(170).trim,o=n(149),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");t.exports=u?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(2),i=n(149);t.exports=function(t){return r(function(){return!!i[t]()||"​…᠎"!="​…᠎"[t]()||i[t].name!==t})}},function(t,e,n){"use strict";var r,i=n(0),o=n(18).f,a=n(12),s=n(67),u=n(16),c=n(68),l=n(20),f="".endsWith,p=Math.min,h=c("endsWith");i({target:"String",proto:!0,forced:!!(l||h||(r=o(String.prototype,"endsWith"),!r||r.writable))&&!h},{endsWith:function(t){var e=String(u(this));s(t);var n=arguments.length>1?arguments[1]:void 0,r=a(e.length),i=void 0===n?r:p(a(n),r),o=String(t);return f?f.call(e,o,i):e.slice(i-o.length,i)===o}})},function(t,e,n){var r=n(190);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(191),i=n(229);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n-1}},function(t,e,n){var r=n(145);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(175)(n(153),"Map");t.exports=r},function(t,e,n){var r=n(146);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(146);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(146);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(146);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(227);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(152),i=n(228),o=n(143),a=n(150),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n=51||!i(function(){var t=[];return t[d]=!1,t.concat()[0]!==t}),g=f("concat"),m=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(t){var e,n,r,i,o,a=s(this),f=l(a,0),p=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(f,p++,o)}return f.length=p,f}})},function(t,e,n){"use strict";var r=n(156);n.n(r).a},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){"use strict";var r=n(157);n.n(r).a},function(t,e,n){"use strict";var r=n(158);n.n(r).a},function(t,e,n){"use strict";var r=n(159);n.n(r).a},function(t,e,n){"use strict";var r=n(160);n.n(r).a},function(t,e,n){var r=n(151),i=n(143),o=n(174),a="[object String]";t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&r(t)==a}},function(t,e,n){"use strict";var r=n(161);n.n(r).a},function(t,e,n){"use strict";var r=n(162);n.n(r).a},function(t,e,n){"use strict";var r=n(163);n.n(r).a},function(t,e,n){"use strict";var r=n(0),i=n(21).find,o=n(65),a=n(11),s=!0,u=a("find");"find"in[]&&Array(1).find(function(){s=!1}),r({target:"Array",proto:!0,forced:s||!u},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(t,e,n){"use strict";var r=n(164);n.n(r).a},function(t,e,n){"use strict";var r=n(165);n.n(r).a},,function(t,e,n){"use strict";n.r(e);n(97),n(61),n(180);var r=n(142),i={name:"NavLink",props:{item:{required:!0}},computed:{link:function(){return Object(r.b)(this.item.link)},exact:function(){var t=this;return this.$site.locales?Object.keys(this.$site.locales).some(function(e){return e===t.link}):"/"===this.link},isNonHttpURI:function(){return Object(r.g)(this.link)||Object(r.h)(this.link)},isBlankTarget:function(){return"_blank"===this.target},isInternal:function(){return!Object(r.f)(this.link)&&!this.isBlankTarget},target:function(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(r.f)(this.link)?"_blank":""},rel:function(){return this.isNonHttpURI?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":""}},methods:{focusoutAction:function(){this.$emit("focusout")}}},o=n(28),a=Object(o.a)(i,function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction(e)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)},[],!1,null,null,null).exports,s={name:"Home",components:{NavLink:a},computed:{data:function(){return this.$page.frontmatter},actionLink:function(){return{link:this.data.actionLink,text:this.data.actionText}}}},u=(n(184),Object(o.a)(s,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main",{staticClass:"home",attrs:{"aria-labelledby":"main-title"}},[n("header",{staticClass:"hero"},[t.data.heroImage?n("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?n("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?n("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?n("p",{staticClass:"action"},[n("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?n("div",{staticClass:"features"},t._l(t.data.features,function(e,r){return n("div",{key:r,staticClass:"feature"},[n("h2",[t._v(t._s(e.title))]),t._v(" "),n("p",[t._v(t._s(e.details))])])}),0):t._e(),t._v(" "),n("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?n("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)},[],!1,null,null,null).exports),c=(n(185),n(17),n(106),n(103),n(167),n(29),n(108),n(147),n(171),n(168),n(40),n(172),n(173),n(188),n(41),n(169),n(189)),l=n.n(c),f=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=l()(e,"title","");return l()(e,"frontmatter.tags")&&(r+=" ".concat(e.frontmatter.tags.join(" "))),n&&(r+=" ".concat(n)),p(t,r)},p=function(t,e){var n=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},r=t.split(/\s+/g).map(function(t){return t.trim()}).filter(function(t){return!!t}),i=t.endsWith(" ");return new RegExp(r.map(function(t,e){return r.length!==e+1||i?"(?=.*\\b".concat(n(t),"\\b)"):"(?=.*\\b".concat(n(t),")")}).join("")+".+","gi").test(e)},h={name:"SearchBox",data:function(){return{query:"",focused:!1,focusIndex:0,placeholder:void 0}},computed:{showSuggestions:function(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions:function(){var t=this.query.trim().toLowerCase();if(t){for(var e=this.$site.pages,n=this.$site.themeConfig.searchMaxSuggestions||5,r=this.$localePath,i=[],o=0;o=n);o++){var a=e[o];if(this.getPageLocalePath(a)===r&&this.isSearchable(a))if(f(t,a))i.push(a);else if(a.headers)for(var s=0;s=n);s++){var u=a.headers[s];u.title&&f(t,a,u.title)&&i.push(Object.assign({},a,{path:a.path+"#"+u.slug,header:u}))}}return i}},alignRight:function(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted:function(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy:function(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath:function(t){for(var e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable:function(t){var e=null;return null===e||(e=Array.isArray(e)?e:new Array(e)).filter(function(e){return t.path.match(e)}).length>0},onHotkey:function(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp:function(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown:function(){this.showSuggestions&&(this.focusIndex "+t._s(e.header.title))]):t._e()])])}),0):t._e()])},[],!1,null,null,null).exports),v=(n(231),Object(o.a)({},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[n("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[n("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])},[],!1,null,null,null).exports),g=(n(232),n(38)),m=n(179),b=n(234),_=n.n(b),x={name:"DropdownLink",components:{NavLink:a,DropdownTransition:m.a},props:{item:{required:!0}},data:function(){return{open:!1}},computed:{dropdownAriaLabel:function(){return this.item.ariaLabel||this.item.text}},watch:{$route:function(){this.open=!1}},methods:{setOpen:function(t){this.open=t},isLastItemOfArray:function(t,e){return _()(e)===t}}},y=(n(235),{name:"NavLinks",components:{NavLink:a,DropdownLink:Object(o.a)(x,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[n("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),n("DropdownTransition",[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,function(e,r){return n("li",{key:e.link||r,staticClass:"dropdown-item"},["links"===e.type?n("h4",[t._v("\n "+t._s(e.text)+"\n ")]):t._e(),t._v(" "),"links"===e.type?n("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(e.items,function(r){return n("li",{key:r.link,staticClass:"dropdown-subitem"},[n("NavLink",{attrs:{item:r},on:{focusout:function(n){t.isLastItemOfArray(r,e.items)&&t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)}),0):n("NavLink",{attrs:{item:e},on:{focusout:function(n){t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)}),0)])],1)},[],!1,null,null,null).exports},computed:{userNav:function(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav:function(){var t=this,e=this.$site.locales;if(e&&Object.keys(e).length>1){var n=this.$page.path,r=this.$router.options.routes,i=this.$site.themeConfig.locales||{},o={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(e).map(function(o){var a,s=e[o],u=i[o]&&i[o].label||s.lang;return s.lang===t.$lang?a=n:(a=n.replace(t.$localeConfig.path,o),r.some(function(t){return t.path===a})||(a=o)),{text:u,link:a}})};return[].concat(Object(g.a)(this.userNav),[o])}return this.userNav},userLinks:function(){return(this.nav||[]).map(function(t){return Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)})})},repoLink:function(){var t=this.$site.themeConfig.repo;return t?/^https?:/.test(t)?t:"https://github.com/".concat(t):null},repoLabel:function(){if(this.repoLink){if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;for(var t=this.repoLink.match(/^https?:\/\/[^\/]+/)[0],e=["GitHub","GitLab","Bitbucket"],n=0;nMath.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),z=Object(o.a)(W,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?n("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),n("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),n("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?n("Home"):n("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)},[],!1,null,null,null);e.default=z.exports}])]); \ No newline at end of file diff --git a/assets/js/20.540a6f36.js b/assets/js/20.540a6f36.js deleted file mode 100644 index 3394fd3b..00000000 --- a/assets/js/20.540a6f36.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{269:function(t,s,a){"use strict";a.r(s);var e=a(28),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"playlists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#playlists","aria-hidden":"true"}},[t._v("#")]),t._v(" Playlists")]),t._v(" "),a("h2",{attrs:{id:"getuserplaylists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getuserplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUserPlaylists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a list of the playlists owned or followed by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first playlist to return. Default: 0 (the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimplePlaylist"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging Object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimplePlaylist"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" userPlaylists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetUserPlaylists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nuserPlaylists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Owner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DisplayName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Who is the owner of the playlist?")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a playlist owned by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[fields]")]),t._v(" "),a("td",[t._v("Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.")]),t._v(" "),a("td",[a("code",[t._v('"description,uri"')])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[t._v('"DE"')])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullPlaylist")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get full details of the tracks of a playlist owned by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[fields]")]),t._v(" "),a("td",[t._v("Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.")]),t._v(" "),a("td",[a("code",[t._v('"description,uri"')])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.")]),t._v(" "),a("td",[a("code",[t._v("100")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first object to return. Default: 0 (i.e., the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[a("code",[t._v("DE")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("PlaylistTrack"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging Object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("PlaylistTrack"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"createplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#createplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" CreatePlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistName")]),t._v(" "),a("td",[t._v('The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.')]),t._v(" "),a("td",[a("code",[t._v('"This is my new Playlist"')])])]),t._v(" "),a("tr",[a("td",[t._v("[isPublic]")]),t._v(" "),a("td",[t._v("default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.")]),t._v(" "),a("td",[a("code",[t._v("true")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullPlaylist"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullPlaylist")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("CreatePlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"This is my new Playlist"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Playlist-URI: "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Uri"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"updateplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#updateplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" UpdatePlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[newName]")]),t._v(" "),a("td",[t._v('The new name for the playlist, for example "My New Playlist Title".')]),t._v(" "),a("td",[a("code",[t._v('"New Playlistname"')])])]),t._v(" "),a("tr",[a("td",[t._v("[newPublic]")]),t._v(" "),a("td",[t._v("If true the playlist will be public, if false it will be private.")]),t._v(" "),a("td",[t._v("EXAMPLE")])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("UpdatePlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"replaceplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#replaceplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" ReplacePlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.")]),t._v(" "),a("td",[a("code",[t._v('new List { "1ri6UZpjPLmTCswIXZ6Uq1" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ReplacePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removeplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removeplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" RemovePlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more tracks from a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.")]),t._v(" "),a("td",[a("code",[t._v("(example below)")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove multiple tracks")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"47xtGU3vht7mXLHqnbaau5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove multiple tracks at their specified positions")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"47xtGU3vht7mXLHqnbaau5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removeplaylisttrack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removeplaylisttrack","aria-hidden":"true"}},[t._v("#")]),t._v(" RemovePlaylistTrack")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more tracks from a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uri")]),t._v(" "),a("td",[t._v("Spotify URI")]),t._v(" "),a("td",[a("code",[t._v('new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove all tracks with the specified URI")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove all tracks with the specified URI and the specified positions")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"addplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" AddPlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Add one or more tracks to a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("A list of Spotify track URIs to add")]),t._v(" "),a("td",[a("code",[t._v('new List { "1ri6UZpjPLmTCswIXZ6Uq1" }')])])]),t._v(" "),a("tr",[a("td",[t._v("[position]")]),t._v(" "),a("td",[t._v("The position to insert the tracks, a zero-based index")]),t._v(" "),a("td",[a("code",[t._v("10")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("AddPlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"addplaylisttrack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addplaylisttrack","aria-hidden":"true"}},[t._v("#")]),t._v(" AddPlaylistTrack")]),t._v(" "),a("blockquote",[a("p",[t._v("Add one or more tracks to a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uri")]),t._v(" "),a("td",[t._v("A Spotify Track URI")]),t._v(" "),a("td",[a("code",[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')])])]),t._v(" "),a("tr",[a("td",[t._v("position")]),t._v(" "),a("td",[t._v("The position to insert the tracks, a zero-based index")]),t._v(" "),a("td",[a("code",[t._v("10")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("AddPlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"reorderplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reorderplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" ReorderPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Reorder a track or a group of tracks in a playlist.\nMore Info: "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/reorder-playlists-tracks/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Reorder-Playlist"),a("OutboundLink")],1)])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("rangeStart")]),t._v(" "),a("td",[t._v("The position of the first track to be reordered.")]),t._v(" "),a("td",[a("code",[t._v("2")])])]),t._v(" "),a("tr",[a("td",[t._v("insertBefore")]),t._v(" "),a("td",[t._v("The position where the tracks should be inserted.")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[rangeLength]")]),t._v(" "),a("td",[t._v("The amount of tracks to be reordered. Defaults to 1 if not set.")]),t._v(" "),a("td",[a("code",[t._v("2")])])]),t._v(" "),a("tr",[a("td",[t._v("[snapshotId]")]),t._v(" "),a("td",[t._v("The playlist's snapshot ID against which you want to make the changes.")]),t._v(" "),a("td",[t._v("``")])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("Snapshot")]),t._v("-Object which contains the property "),a("code",[t._v("String SnapshotId")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Snapshot")]),t._v(" snapshot "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ReorderPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New SnapshotId: "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" snapshot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("SnapshotId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/21.956153ac.js b/assets/js/21.956153ac.js deleted file mode 100644 index c535c763..00000000 --- a/assets/js/21.956153ac.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{264:function(t,e,a){"use strict";a.r(e);var r=a(28),s=Object(r.a)({},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"profiles"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#profiles","aria-hidden":"true"}},[t._v("#")]),t._v(" Profiles")]),t._v(" "),a("h2",{attrs:{id:"getprivateprofile"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getprivateprofile","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPrivateProfile")]),t._v(" "),a("blockquote",[a("p",[t._v("Get detailed profile information about the current user (including the current user’s username).")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody")]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#user-object-private",target:"_blank",rel:"noopener noreferrer"}},[t._v("PrivateProfile"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("PrivateUser")]),t._v(" user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPrivateProfile")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("user"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DisplayName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getpublicprofile"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getpublicprofile","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPublicProfile")]),t._v(" "),a("blockquote",[a("p",[t._v("Get public profile information about a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[t._v("EXAMPLE")])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#user-object-public",target:"_blank",rel:"noopener noreferrer"}},[t._v("PublicProfile"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code")])]),a("hr")])},[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/22.a4edf47c.js b/assets/js/22.a4edf47c.js deleted file mode 100644 index 91efb023..00000000 --- a/assets/js/22.a4edf47c.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{265:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"proxy-settings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#proxy-settings","aria-hidden":"true"}},[t._v("#")]),t._v(" Proxy Settings")]),t._v(" "),a("p",[t._v("You can forward your proxy settings to the web api by using a field in the "),a("code",[t._v("SpotifyLocalAPIConfig")]),t._v(".")]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ProxyConfig")]),t._v(" proxyConfig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ProxyConfig")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Host "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"127.0.0.1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Port "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("8080")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional values like Username and Password are available")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("proxyConfig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/23.e0985451.js b/assets/js/23.e0985451.js deleted file mode 100644 index 3a1a5508..00000000 --- a/assets/js/23.e0985451.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{266:function(t,a,s){"use strict";s.r(a);var e=s(28),r=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"search"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#search","aria-hidden":"true"}},[t._v("#")]),t._v(" Search")]),t._v(" "),s("h2",{attrs:{id:"searchitems"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitems","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItems")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("You may want to use "),s("code",[t._v("SearchItemsEscaped")]),t._v(" if you're processing user-input without validation")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("q")]),t._v(" "),s("td",[t._v("The search query's keywords (and optional field filters and operators), for example q=roadhouse+blues.")]),t._v(" "),s("td",[s("code",[t._v('"roadhouse+blues"')])])]),t._v(" "),s("tr",[s("td",[t._v("type")]),t._v(" "),s("td",[t._v("A list of item types to search across.")]),t._v(" "),s("td",[s("code",[t._v("SearchType.Album")])])]),t._v(" "),s("tr",[s("td",[t._v("[limit]")]),t._v(" "),s("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),s("td",[s("code",[t._v("20")])])]),t._v(" "),s("tr",[s("td",[t._v("[offset]")]),t._v(" "),s("td",[t._v("The index of the first result to return. Default: 0")]),t._v(" "),s("td",[s("code",[t._v("0")])])]),t._v(" "),s("tr",[s("td",[t._v("[market]")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code or the string from_token.")]),t._v(" "),s("td",[s("code",[t._v('"de"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SearchItem")]),t._v(" which contains the properties "),s("code",[t._v("Paging Artists")]),t._v(","),s("code",[t._v("Paging Tracks")]),t._v(", "),s("code",[t._v("Paging Albums")]),t._v(", "),s("code",[t._v("Paging Playlists")]),t._v(". They are filled based on your search-type.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SearchItem")]),t._v(" item "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("SearchItems")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"roadhouse+blues"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Album "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" SearchType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Playlist"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("item"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Albums"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Total"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//How many results are there in total? NOTE: item.Tracks = item.Artists = null")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"searchitemsescaped"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#searchitemsescaped","aria-hidden":"true"}},[t._v("#")]),t._v(" SearchItemsEscaped")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.")])]),t._v(" "),s("p",[t._v("Works like "),s("code",[t._v("SearchItems")]),t._v(", but URL escapes all characters")])])},[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/24.a9466c6a.js b/assets/js/24.a9466c6a.js deleted file mode 100644 index 4051e237..00000000 --- a/assets/js/24.a9466c6a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{267:function(t,a,s){"use strict";s.r(a);var e=s(28),n=Object(e.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"tracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tracks","aria-hidden":"true"}},[t._v("#")]),t._v(" Tracks")]),t._v(" "),s("h2",{attrs:{id:"getseveraltracks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getseveraltracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetSeveralTracks")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for multiple tracks based on their Spotify IDs.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("ids")]),t._v(" "),s("td",[t._v("A list of the Spotify IDs for the tracks. Maximum: 50 IDs.")]),t._v(" "),s("td",[s("code",[t._v('new List {"6Y1CLPwYe7zvI8PJiWVz6T"}')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("code",[t._v("SeveralTracks")]),t._v(" object which has one property, "),s("code",[t._v("List Tracks")])]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeveralTracks")]),t._v(" severalTracks "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetSeveralTracks")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("String"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nseveralTracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"gettrack"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#gettrack","aria-hidden":"true"}},[t._v("#")]),t._v(" GetTrack")]),t._v(" "),s("blockquote",[s("p",[t._v("Get Spotify catalog information for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])]),t._v(" "),s("tr",[s("td",[t._v("market")]),t._v(" "),s("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),s("td",[s("code",[t._v('"DE"')])])])])]),t._v(" "),s("p",[t._v("Returns a "),s("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullTrack")]),t._v(" track "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetTrack")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("hr"),t._v(" "),s("h2",{attrs:{id:"getaudioanalysis"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#getaudioanalysis","aria-hidden":"true"}},[t._v("#")]),t._v(" GetAudioAnalysis")]),t._v(" "),s("blockquote",[s("p",[t._v("Get a detailed audio analysis for a single track identified by its unique Spotify ID.")])]),t._v(" "),s("p",[s("strong",[t._v("Parameters")])]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Description")]),t._v(" "),s("th",[t._v("Example")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("id")]),t._v(" "),s("td",[t._v("The Spotify ID for the track.")]),t._v(" "),s("td",[s("code",[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')])])])])]),t._v(" "),s("p",[t._v("Returns a AudioAnalysis. This object is currently lacking Spotify documentation but archived "),s("a",{attrs:{href:"https://web.archive.org/web/20160528174915/http://developer.echonest.com/docs/v4/_static/AnalyzeDocumentation.pdf",target:"_blank",rel:"noopener noreferrer"}},[t._v("EchoNest documentation"),s("OutboundLink")],1),t._v(" is relevant.")]),t._v(" "),s("p",[s("strong",[t._v("Usage")])]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AudioAnalysis")]),t._v(" analysis "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetAudioAnalysis")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6Y1CLPwYe7zvI8PJiWVz6T"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("analysis"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Meta"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DetailedStatus"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/25.33dd1a97.js b/assets/js/25.33dd1a97.js deleted file mode 100644 index a7dc5c22..00000000 --- a/assets/js/25.33dd1a97.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{268:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"utilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#utilities","aria-hidden":"true"}},[t._v("#")]),t._v(" Utilities")]),t._v(" "),a("h2",{attrs:{id:"paging-methods"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#paging-methods","aria-hidden":"true"}},[t._v("#")]),t._v(" Paging-Methods")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("SpotifyWebAPI")]),t._v(" features two paging-helper Methods, "),a("code",[t._v("GetNextPage(Paging page)")]),t._v(" and "),a("code",[t._v("GetPreviousPage(Paging page)")]),t._v(".\nBoth are an easy way to receive the next/previous page of a Paging-Object.")]),t._v(" "),a("p",[t._v("Sample:")]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" playlistTracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4EcNf2l8rXInbJOf3tQdgU"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("while")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlistTracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Count"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("playlistTracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasNextPage")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("break")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n playlistTracks "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetNextPage")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlistTracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/26.fd03eb58.js b/assets/js/26.fd03eb58.js deleted file mode 100644 index b8117b3c..00000000 --- a/assets/js/26.fd03eb58.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{141:function(n,w,o){}}]); \ No newline at end of file diff --git a/assets/js/3.7ef0fbfe.js b/assets/js/3.7ef0fbfe.js deleted file mode 100644 index 275b39cc..00000000 --- a/assets/js/3.7ef0fbfe.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{166:function(t,e,n){},246:function(t,e,n){"use strict";var i=n(166);n.n(i).a},270:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||i().default)}},r=(n(246),n(28)),a=Object(r.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/4.2f270ddd.js b/assets/js/4.2f270ddd.js deleted file mode 100644 index 329610ee..00000000 --- a/assets/js/4.2f270ddd.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{248:function(t,e,s){"use strict";s.r(e);var n=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],o={methods:{getMsg:function(){return n[Math.floor(Math.random()*n.length)]}}},i=s(28),h=Object(i.a)(o,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"theme-container"},[e("div",{staticClass:"theme-default-content"},[e("h1",[this._v("404")]),this._v(" "),e("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),e("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])},[],!1,null,null,null);e.default=h.exports}}]); \ No newline at end of file diff --git a/assets/js/5.14f2fea3.js b/assets/js/5.14f2fea3.js deleted file mode 100644 index 8b674cff..00000000 --- a/assets/js/5.14f2fea3.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{249:function(t,e,r){"use strict";r.r(e);var a=r(28),o=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"spotifyapi-net-docs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotifyapi-net-docs","aria-hidden":"true"}},[t._v("#")]),t._v(" SpotifyAPI-NET Docs")]),t._v(" "),r("h2",{attrs:{id:"about"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#about","aria-hidden":"true"}},[t._v("#")]),t._v(" About")]),t._v(" "),r("p",[t._v("This project, written in C#/.NET, provides 2 libraries for an easier usage of the Spotify Web API")]),t._v(" "),r("p",[r("strong",[t._v("Spotify's Web API")]),t._v(" ("),r("a",{attrs:{href:"https://developer.spotify.com/web-api/",target:"_blank",rel:"noopener noreferrer"}},[t._v("link"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("blockquote",[r("p",[t._v("Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue.\nThe API also provides access to user-related data such as playlists and music saved in a “Your Music” library, subject to user’s authorization.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web")])]),t._v(" "),r("blockquote",[r("p",[t._v("A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access.")])]),t._v(" "),r("p",[r("strong",[t._v("SpotifyAPI.Web.Auth")])]),t._v(" "),r("blockquote",[r("p",[t._v("A library providing C# implementations of the 3 supported Authentication modes, including "),r("code",[t._v("ImplicitGrantAuth")]),t._v(", "),r("code",[t._v("AuthorizationCodeAuth")]),t._v(" and "),r("code",[t._v("CredentialsAuth")])])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"installing"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#installing","aria-hidden":"true"}},[t._v("#")]),t._v(" Installing")]),t._v(" "),r("ul",[r("li",[t._v("Via NuGet Package:")])]),t._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[t._v("Install-Package SpotifyAPI.Web\nInstall-Package SpotifyAPI.Web.Auth\n")])])]),r("ul",[r("li",[t._v("Download the latest binaries on the "),r("a",{attrs:{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub Release Page"),r("OutboundLink")],1),t._v(" and add it to your Project")]),t._v(" "),r("li",[t._v("Clone the Repo and build the project yourself.")])]),t._v(" "),r("hr"),t._v(" "),r("h2",{attrs:{id:"getting-started"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/web/getting_started/"}},[t._v("SpotifyAPI.Web")])],1),t._v(" "),r("li",[r("RouterLink",{attrs:{to:"/auth/getting_started/"}},[t._v("SpotifyAPI.Web.Auth")])],1)]),t._v(" "),r("h2",{attrs:{id:"projects"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#projects","aria-hidden":"true"}},[t._v("#")]),t._v(" Projects")]),t._v(" "),r("h3",{attrs:{id:"lidarr-by-lidarr"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#lidarr-by-lidarr","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/lidarr/Lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("lidarr"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/lidarr",target:"_blank",rel:"noopener noreferrer"}},[t._v("@lidarr"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Looks and smells like Sonarr but made for music.")])]),t._v(" "),r("h3",{attrs:{id:"botframework-solutions-by-microsoft"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#botframework-solutions-by-microsoft","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/microsoft/botframework-solutions",target:"_blank",rel:"noopener noreferrer"}},[t._v("botframework-solutions"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/microsoft",target:"_blank",rel:"noopener noreferrer"}},[t._v("@microsoft"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework")])]),t._v(" "),r("h3",{attrs:{id:"spytify-by-jwallet"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spytify-by-jwallet","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/jwallet/spy-spotify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spytify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/jwallet",target:"_blank",rel:"noopener noreferrer"}},[t._v("@jwallet"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files")])]),t._v(" "),r("h3",{attrs:{id:"audio-band-by-dsafa"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#audio-band-by-dsafa","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/dsafa/audio-band",target:"_blank",rel:"noopener noreferrer"}},[t._v("audio-band"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/dsafa",target:"_blank",rel:"noopener noreferrer"}},[t._v("@dsafa"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Display and control songs from the Windows taskbar")])]),t._v(" "),r("h3",{attrs:{id:"rocksmith-custom-song-toolkit-by-catara"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rocksmith-custom-song-toolkit-by-catara","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/catara/rocksmith-custom-song-toolkit",target:"_blank",rel:"noopener noreferrer"}},[t._v("rocksmith-custom-song-toolkit"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/catara",target:"_blank",rel:"noopener noreferrer"}},[t._v("@catara"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("MASS Manipulation of Rocksmith DLC Library")])]),t._v(" "),r("h3",{attrs:{id:"spofy-by-eltoncezar"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spofy-by-eltoncezar","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/eltoncezar/Spofy",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spofy"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/eltoncezar",target:"_blank",rel:"noopener noreferrer"}},[t._v("@eltoncezar"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A Spotify mini player and notifier for Windows")])]),t._v(" "),r("h3",{attrs:{id:"toastify-by-aleab"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#toastify-by-aleab","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/aleab/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Toastify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/aleab",target:"_blank",rel:"noopener noreferrer"}},[t._v("@aleab"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Toastify adds global hotkeys and toast notifications to Spotify")]),t._v(" "),r("p",[r("em",[t._v("Forked from "),r("a",{attrs:{href:"https://github.com/nachmore/toastify",target:"_blank",rel:"noopener noreferrer"}},[t._v("nachmore/toastify"),r("OutboundLink")],1)])])]),t._v(" "),r("h3",{attrs:{id:"spotify-oculus-by-captainmorgs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#spotify-oculus-by-captainmorgs","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/CaptainMorgs/spotify-oculus-release",target:"_blank",rel:"noopener noreferrer"}},[t._v("Spotify Oculus"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/CaptainMorgs",target:"_blank",rel:"noopener noreferrer"}},[t._v("@CaptainMorgs"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Unity project for interacting with Spotify in virtual reality for the Oculus Rift.")])]),t._v(" "),r("h3",{attrs:{id:"songify-by-inzaniity"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#songify-by-inzaniity","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/Inzaniity/Songify",target:"_blank",rel:"noopener noreferrer"}},[t._v("Songify"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/Inzaniity",target:"_blank",rel:"noopener noreferrer"}},[t._v("@Inzaniity"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("A simple tool that gets the current track from Spotify, YouTube and Nightbot.")])]),t._v(" "),r("h3",{attrs:{id:"elite-g19s-companion-app-by-magicmau"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#elite-g19s-companion-app-by-magicmau","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://forums.frontier.co.uk/threads/elite-g19s-companion-app-with-simulated-space-traffic-control.226782/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Elite G19s Companion app"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/MagicMau",target:"_blank",rel:"noopener noreferrer"}},[t._v("@MagicMau"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Main features include: system and station overview, play radio and podcast with audio visualizations, simulated Space Traffic Control, GPS functionality (including planetary races), an orrery view, a screenshot converter, and a news ticker.")])]),t._v(" "),r("h3",{attrs:{id:"arduino-spotify-remote-control-by-nader11ndeu"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#arduino-spotify-remote-control-by-nader11ndeu","aria-hidden":"true"}},[t._v("#")]),t._v(" "),r("a",{attrs:{href:"https://github.com/NADER11NDEU/ARDUINO-Spotify-Remote-Control",target:"_blank",rel:"noopener noreferrer"}},[t._v("ARDUINO-Spotify-Remote-Control"),r("OutboundLink")],1),t._v(" by "),r("a",{attrs:{href:"https://github.com/NADER11NDEU",target:"_blank",rel:"noopener noreferrer"}},[t._v("@NADER11NDEU"),r("OutboundLink")],1)]),t._v(" "),r("blockquote",[r("p",[t._v("Well, with this project we will be able to control active spotify devices with Arduino. How we gonna do that ? We will use serial communication.")])])])},[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/6.66d7c2fe.js b/assets/js/6.66d7c2fe.js deleted file mode 100644 index 469ac2b9..00000000 --- a/assets/js/6.66d7c2fe.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{250:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"autorizationcodeauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#autorizationcodeauth","aria-hidden":"true"}},[t._v("#")]),t._v(" AutorizationCodeAuth")]),t._v(" "),a("p",[t._v("This way is "),a("strong",[t._v("not recommended")]),t._v(" for client-side apps and requires server-side code to run securely.\nWith this approach, you first get a code which you need to trade against the access-token.\nIn this exchange you need to provide your Client-Secret and because of that it's not recommended.\nA good thing about this method: You can always refresh your token, without having the user to auth it again.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AuthorizationCodeAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadPrivate "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" Scope"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("PlaylistReadCollaborative\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ExchangeCode")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Code"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"token-refresh"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#token-refresh","aria-hidden":"true"}},[t._v("#")]),t._v(" Token Refresh")]),t._v(" "),a("p",[t._v("Once the "),a("code",[t._v("AccessToken")]),t._v(" is expired, you can use your "),a("code",[t._v("RefreshToken")]),t._v(" to get a new one.\nIn this procedure, no HTTP Server is needed in the background and a single HTTP Request is made.")]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Auth code from above")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("IsExpired")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" newToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RefreshToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("RefreshToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AccessToken")]),t._v("\n api"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" newToken"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/7.830f290b.js b/assets/js/7.830f290b.js deleted file mode 100644 index 82dd760f..00000000 --- a/assets/js/7.830f290b.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{251:function(t,e,a){"use strict";a.r(e);var s=a(28),n=Object(s.a)({},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"clientcredentialsauth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#clientcredentialsauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ClientCredentialsAuth")]),t._v(" "),a("p",[t._v("With this approach, you make a POST Request with a base64 encoded string (consists of ClientId + ClientSecret). You will directly get the token (Without a local HTTP Server), but it will expire and can't be refreshed.\nIf you want to use it securely, you would need to do it all server-side.\n"),a("strong",[t._v("NOTE:")]),t._v(" You will only be able to query non-user-related information e.g search for a Track.")]),t._v(" "),a("p",[t._v("More info: "),a("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),t._v(" auth "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("CredentialsAuth")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_clientId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _secretId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" auth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetToken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])},[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/8.9cb2269f.js b/assets/js/8.9cb2269f.js deleted file mode 100644 index ae45aaa4..00000000 --- a/assets/js/8.9cb2269f.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{252:function(t,e,o){"use strict";o.r(e);var r=o(28),i=Object(r.a)({},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started","aria-hidden":"true"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),o("h2",{attrs:{id:"auth-methods"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#auth-methods","aria-hidden":"true"}},[t._v("#")]),t._v(" Auth-Methods")]),t._v(" "),o("p",[t._v("Before you can use the Web API's full functionality, you need the user to authenticate your Application.\nIf you want to know more, you can read to the whole auth-process "),o("a",{attrs:{href:"https://developer.spotify.com/web-api/authorization-guide/",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("Before you start, install "),o("code",[t._v("SpotifyAPI.Web.Auth")]),t._v(" and create an application at Spotify: "),o("a",{attrs:{href:"https://developer.spotify.com/my-applications/#!/applications",target:"_blank",rel:"noopener noreferrer"}},[t._v("Your Applications"),o("OutboundLink")],1)]),t._v(" "),o("p",[t._v("After you have created your Application, you will have following important values:")]),t._v(" "),o("table",[o("thead",[o("tr",[o("th",[t._v("Name")]),t._v(" "),o("th",[t._v("Description")])])]),t._v(" "),o("tbody",[o("tr",[o("td",[o("strong",[t._v("Client_Id")])]),t._v(" "),o("td",[t._v("This is your client_id, you don't have to hide it")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Client_Secret")])]),t._v(" "),o("td",[t._v("Never use this in one of your client-side apps! Keep it secret!")])]),t._v(" "),o("tr",[o("td",[o("strong",[t._v("Redirect URIs")])]),t._v(" "),o("td",[t._v("Some of auth flows require that you set the correct redirect URI")])])])]),t._v(" "),o("p",[t._v("Now you can start with the user-authentication. Spotify provides 3 ways (4 if you consider different implementations):")]),t._v(" "),o("ul",[o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/implicit_grant.html"}},[t._v("ImplicitGrantAuth")])],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/token_swap.html"}},[t._v("TokenSwapAuth")]),t._v(" ("),o("strong",[t._v("Recommended")]),t._v(", server-side code mandatory, most secure method. The necessary code is shown here so you do not have to code it yourself.)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/authorization_code.html"}},[t._v("AutorizationCodeAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)]),t._v(" "),o("li",[o("p",[o("RouterLink",{attrs:{to:"/auth/client_credentials.html"}},[t._v("ClientCredentialsAuth")]),t._v(" (Not recommended, server-side code needed, else it's unsecure)")],1)])]),t._v(" "),o("p",[t._v("Overview:\n"),o("img",{attrs:{src:"http://i.imgur.com/uf3ahTl.png",alt:"Overview"}})])])},[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/9.f14800d8.js b/assets/js/9.f14800d8.js deleted file mode 100644 index 8e51263c..00000000 --- a/assets/js/9.f14800d8.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{253:function(t,a,s){"use strict";s.r(a);var n=s(28),e=Object(n.a)({},function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"implicitgrantauth"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implicitgrantauth","aria-hidden":"true"}},[t._v("#")]),t._v(" ImplicitGrantAuth")]),t._v(" "),s("p",[t._v("This way is "),s("strong",[t._v("recommended")]),t._v(' and the only auth-process which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application.\nYou won\'t be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.')]),t._v(" "),s("p",[t._v("More info: "),s("a",{attrs:{href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#implicit-grant-flow",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1)]),t._v(" "),s("div",{staticClass:"language-csharp extra-class"},[s("pre",{pre:!0,attrs:{class:"language-csharp"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Main")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" args"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),t._v(" auth "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImplicitGrantAuth")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n _clientId"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:4002"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n Scope"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UserReadPrivate\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AuthReceived "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sender"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Stop")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// `sender` is also the auth instance")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),t._v(" api "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SpotifyWebAPI")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n TokenType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("TokenType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n AccessToken "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("AccessToken\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do requests with API client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Start")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Starts an internal HTTP Server")]),t._v("\n auth"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("OpenBrowser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])},[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/app.4310edfd.js b/assets/js/app.4310edfd.js deleted file mode 100644 index f5774b6c..00000000 --- a/assets/js/app.4310edfd.js +++ /dev/null @@ -1,13 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],u=e[1],c=e[2],f=0,p=[];f0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(9),i=n(5),a=n(47),s=n(73),u=n(19),c=u.get,l=u.enforce,f=String(String).split("String");(t.exports=function(t,e,n,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),l(n).source=f.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(c=!0):delete t[e],c?t[e]=n:o(t,e,n)):c?t[e]=n:a(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&c(this).source||s(this)})},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(53),o=n(13),i=n(114);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(0),o=n(21).filter,i=n(45),a=n(11),s=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!s||!u},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(6),o=n(70),i=n(22),a=n(10),s=n(31),u=n(5),c=n(71),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var r,o,i,a=n(112),s=n(3),u=n(4),c=n(9),l=n(5),f=n(32),p=n(24),h=s.WeakMap;if(a){var d=new h,v=d.get,y=d.has,m=d.set;r=function(t,e){return m.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return y.call(d,t)}}else{var g=f("state");p[g]=!0,r=function(t,e){return c(t,g,e),e},o=function(t){return l(t,g)?t[g]:{}},i=function(t){return l(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(51),o=n(43),i=n(14),a=n(12),s=n(104),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f;return function(h,d,v,y){for(var m,g,b=i(h),w=o(b),_=r(d,v,3),x=a(w.length),k=0,S=y||s,O=e?S(h,x):n?S(h,0):void 0;x>k;k++)if((p||k in w)&&(g=_(m=w[k],k,b),t))if(e)O[k]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return k;case 2:u.call(O,m)}else if(l)return!1;return f?-1:c||l?l:O}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r=n(77),o=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r,o=n(8),i=n(116),a=n(50),s=n(24),u=n(117),c=n(72),l=n(32),f=l("IE_PROTO"),p=function(){},h=function(t){return" - - diff --git a/auth/client_credentials.html b/auth/client_credentials.html deleted file mode 100644 index e5d1503c..00000000 --- a/auth/client_credentials.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - ClientCredentialsAuth | SpotifyAPI-NET - - - - - - - - -

ClientCredentialsAuth

With this approach, you make a POST Request with a base64 encoded string (consists of ClientId + ClientSecret). You will directly get the token (Without a local HTTP Server), but it will expire and can't be refreshed. -If you want to use it securely, you would need to do it all server-side. -NOTE: You will only be able to query non-user-related information e.g search for a Track.

More info: here

CredentialsAuth auth = new CredentialsAuth(_clientId, _secretId);
-Token token = await auth.GetToken();
-SpotifyWebAPI api = new SpotifyWebAPI()
-{
-  TokenType = token.TokenType,
-  AccessToken = token.AccessToken
-};
-
- - - diff --git a/auth/getting_started.html b/auth/getting_started.html deleted file mode 100644 index f103d19e..00000000 --- a/auth/getting_started.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Getting Started | SpotifyAPI-NET - - - - - - - - -

Getting Started

Auth-Methods

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

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

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

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

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

Overview: -Overview

- - - diff --git a/auth/implicit_grant.html b/auth/implicit_grant.html deleted file mode 100644 index a732b28a..00000000 --- a/auth/implicit_grant.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - ImplicitGrantAuth | SpotifyAPI-NET - - - - - - - - -

ImplicitGrantAuth

This way is recommended and the only auth-process which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application. -You won't be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.

More info: here

static async void Main(string[] args)
-{
-  ImplicitGrantAuth auth = new ImplicitGrantAuth(
-    _clientId,
-    "http://localhost:4002",
-    "http://localhost:4002",
-    Scope.UserReadPrivate
-  );
-  auth.AuthReceived += async (sender, payload) =>
-  {
-    auth.Stop(); // `sender` is also the auth instance
-    SpotifyWebAPI api = new SpotifyWebAPI()
-    {
-      TokenType = payload.TokenType,
-      AccessToken = payload.AccessToken
-    };
-    // Do requests with API client
-  };
-  auth.Start(); // Starts an internal HTTP Server
-  auth.OpenBrowser();
-}
-
- - - diff --git a/auth/token_swap.html b/auth/token_swap.html deleted file mode 100644 index d2492010..00000000 --- a/auth/token_swap.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - TokenSwapAuth | SpotifyAPI-NET - - - - - - - - -

TokenSwapAuth

This way uses server-side code or at least access to an exchange server, otherwise, compared to other -methods, it is impossible to use.

With this approach, you provide the URI/URL to your desired exchange server to perform all necessary -requests to Spotify, as well as requests that return back to the "server URI".

The exchange server must be able to:

  • Return the authorization code from Spotify API authenticate page via GET request to the "server URI".
  • Request the token response object via POST to the Spotify API token page.
  • Request a refreshed token response object via POST to the Spotify API token page.

The good news is that you do not need to code it yourself.

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 never exposed and is completely hidden compared to other methods (excluding ImplicitGrantAuth -as it does not deal with a client secret). This means -your Spotify app cannot be spoofed by a malicious third party.

Using TokenSwapWebAPIFactory

The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you.

It does this through the method GetWebApiAsync 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 synchronous, use GetWebApiAsync().Result without using await.

TokenSwapWebAPIFactory webApiFactory;
-SpotifyWebAPI spotify;
-
-// 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.
-webApiFactory = new TokenSwapWebAPIFactory("INSERT LINK TO YOUR index.php HERE")
-{
-    Scope = Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate,
-    AutoRefresh = true
-};
-// You may want to react to being able to use the Spotify service.
-// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;
-// You may want to react to your user's access expiring.
-// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;
-
-try
-{
-    spotify = await webApiFactory.GetWebApiAsync();
-    // Synchronous way:
-    // spotify = webApiFactory.GetWebApiAsync().Result;
-}
-catch (Exception ex)
-{
-    // Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper
-    // UpdateStatus($"Spotify failed to load: {ex.Message}");
-}
-

Using TokenSwapAuth

Since the TokenSwapWebAPIFactory not only simplifies the whole process but offers additional functionality too -(such as AutoRefresh and AuthSuccess AuthFailure events), use of this way is very verbose and is only -recommended if you are having issues with TokenSwapWebAPIFactory or need access to the tokens.

TokenSwapAuth auth = new TokenSwapAuth(
-    exchangeServerUri: "INSERT LINK TO YOUR index.php HERE",
-    serverUri: "http://localhost:4002",
-    scope: Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate
-);
-auth.AuthReceived += async (sender, response) =>
-{
-    lastToken = await auth.ExchangeCodeAsync(response.Code);
-
-    spotify = new SpotifyWebAPI()
-    {
-        TokenType = lastToken.TokenType,
-        AccessToken = lastToken.AccessToken
-    };
-
-    authenticated = true;
-    auth.Stop();
-};
-auth.OnAccessTokenExpired += async (sender, e) => spotify.AccessToken = (await auth.RefreshAuthAsync(lastToken.RefreshToken)).AccessToken;
-auth.Start();
-auth.OpenBrowser();
-

Token Swap Endpoint

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

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

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

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

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

  • grant_type (set to "refresh_token")
  • refresh_token

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

Remarks

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

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

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

- - - diff --git a/b5ab5f4e.e57ac380.js b/b5ab5f4e.e57ac380.js new file mode 100644 index 00000000..eee16066 --- /dev/null +++ b/b5ab5f4e.e57ac380.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{136:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return a})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return l}));var r=n(2),i=n(6),o=(n(0),n(151)),a={id:"unit_testing",title:"Unit Testing"},c={id:"unit_testing",title:"Unit Testing",description:"The modular structure of the library makes it easy to mock the API when unit testing. Consider the following method:",source:"@site/docs/unit_testing.md",permalink:"/docs/next/unit_testing",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/unit_testing.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591221448,sidebar:"docs",previous:{title:"Retry Handling",permalink:"/docs/next/retry_handling"},next:{title:"Introduction",permalink:"/docs/next/auth_introduction"}},s=[],u={rightToc:s};function l(e){var t=e.components,n=Object(i.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},u,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"The modular structure of the library makes it easy to mock the API when unit testing. Consider the following method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'public static async Task IsAdmin(IUserProfileClient userProfileClient)\n{\n // get loggedin user\n var user = await userProfileClient.Current();\n\n // only my user id is an admin\n return user.Id == "1122095781";\n}\n')),Object(o.b)("p",null,"Using ",Object(o.b)("inlineCode",{parentName:"p"},"Moq"),", this can be tested without doing any network requests:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'[Test]\npublic async Task IsAdmin_SuccessTest()\n{\n var userProfileClient = new Mock();\n userProfileClient.Setup(u => u.Current()).Returns(\n Task.FromResult(new PrivateUser\n {\n Id = "1122095781"\n })\n );\n\n Assert.AreEqual(true, await IsAdmin(userProfileClient.Object));\n}\n')))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return b}));var r=n(0),i=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 c(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=i.a.createContext({}),l=function(e){var t=i.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=l(e.components);return i.a.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,a=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),f=r,b=p["".concat(a,".").concat(f)]||p[f]||d[f]||o;return n?i.a.createElement(b,c({ref:t},u,{components:n})):i.a.createElement(b,c({ref:t},u))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,a=new Array(o);a[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var u=2;u { "1KpCi9BOfviCVhmpI4G2sY" }')," or ",Object(l.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.Follow(FollowType.Artist, "1KpCi9BOfviCVhmpI4G2sY");\n//or if it\'s a User\nErrorResponse response = _spotify.Follow(FollowType.User, "1122095781");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"unfollow"},"Unfollow"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove the current user as a follower of one or more artists or other Spotify users.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"followType"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The ID type: either artist or user."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"FollowType.Artist"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids or id"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the artist or the user Spotify IDs or just a Spotify ID"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new List { "1KpCi9BOfviCVhmpI4G2sY" }')," or ",Object(l.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.Unfollow(FollowType.Artist, "1KpCi9BOfviCVhmpI4G2sY");\n//or if it\'s a User\nErrorResponse response = _spotify.Unfollow(FollowType.User, "1122095781");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"isfollowing"},"IsFollowing"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Check to see if the current user is following one or more artists or other Spotify users.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"followType"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The ID type: either artist or user."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"FollowType.Artist"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids or id"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the artist or the user Spotify IDs or just a Spotify ID"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new List { "1KpCi9BOfviCVhmpI4G2sY" }')," or ",Object(l.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ListResponse")," which contains the property ",Object(l.b)("inlineCode",{parentName:"p"},"List List")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'//Are you one of my Followers? :P\nListResponse response = _spotify.IsFollowing(FollowType.User, "1122095781");\nConsole.WriteLine(response.List[0] ? "Yis!" : "No :(");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"followplaylist"},"FollowPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Add the current user as a follower of a playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ownerId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify user ID of the person who owns the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"maxloermans"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"3SIp2VAsKI03mReF0dFBmI"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[showPublic]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"If true the playlist will be included in user's public playlists, if false it will remain private."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"true"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.FollowPlaylist("maxloermans", "3SIp2VAsKI03mReF0dFBmI");\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"unfollowplaylist"},"UnfollowPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove the current user as a follower of a playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ownerId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify user ID of the person who owns the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"maxloermans"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID of the playlist that is to be no longer followed."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"3SIp2VAsKI03mReF0dFBmI"'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.UnfollowPlaylist("maxloermans", "3SIp2VAsKI03mReF0dFBmI");\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"isfollowingplaylist"},"IsFollowingPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Check to see if one or more Spotify users are following a specified playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ownerId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify user ID of the person who owns the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"maxloermans"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID of the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"3SIp2VAsKI03mReF0dFBmI"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids or id"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the artist or the user Spotify IDs or just a Spotify ID"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new List { "1KpCi9BOfviCVhmpI4G2sY" }')," or ",Object(l.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ListResponse")," which contains the property ",Object(l.b)("inlineCode",{parentName:"p"},"List List")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'//Am I following the playlist?\nListResponse response = _spotify.IsFollowing("maxloermans", "3SIp2VAsKI03mReF0dFBmI", "1122095781");\nConsole.WriteLine(response.List[0] ? "Yis!" : "No :(");\n')),Object(l.b)("hr",null))}c.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return m}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(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 o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o({},t,{},e)),a},s=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},O={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},j=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,b=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),s=c(a),j=n,m=s["".concat(b,".").concat(j)]||s[j]||O[j]||l;return a?r.a.createElement(m,o({ref:t},p,{components:a})):r.a.createElement(m,o({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,b=new Array(l);b[0]=j;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o.mdxType="string"==typeof e?e:n,b[1]=o;for(var p=2;p{t(e.appendChild(this._.current),(function(t){try{e.parentNode.replaceChild(t,e)}catch(e){}}))})}reset(){this.$.current.replaceChild(this._.current,this.$.current.lastChild)}}var g=m,b=a(165);const v=[{title:o.a.createElement(o.a.Fragment,null,"Sane Defaults - Easy To Configure"),imageUrl:"img/undraw_preferences_uuo2.svg",description:()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("code",null,"SpotifyAPI-NET")," allows you to quickly integrate with Spotify's Web API by supplying sane configuration defaults from the start. Later on, behaviour can be customized using extensive configuration possibilities.")},{title:o.a.createElement(o.a.Fragment,null,"All API Calls Integrated"),imageUrl:"img/undraw_project_completed_w0oq.svg",description:()=>o.a.createElement(o.a.Fragment,null,"The Spotify Web API consists of over 74 API calls. ",o.a.createElement("code",null,"SpotifyAPI-NET")," provides fully typed requests/responses for all of them.")},{title:o.a.createElement(o.a.Fragment,null,".NET Standard 2.X"),imageUrl:"img/undraw_Devices_e67q.svg",description:()=>o.a.createElement(o.a.Fragment,null,"With the support of .NET Standard 2.X, ",o.a.createElement("code",null,"SpotifyAPI-NET")," runs on many platforms, including .NET Core, UWP and Xamarin.Forms (Windows, Android, iOS and Mac)")},{title:o.a.createElement(o.a.Fragment,null,"Testable"),imageUrl:"img/undraw_QA_engineers_dg5p.svg",description:()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("code",null,"SpotifyAPI-NET")," is built on a modular structure, which allows easy testing through mocks and stubs. Learn more by visiting the ",o.a.createElement(d.a,{to:Object(h.a)("docs/next/testing")},"Testing Guide"))}];function w({imageUrl:e,title:t,description:a}){const r=Object(h.a)(e);return o.a.createElement("div",{className:i()("col col--4",p.a.feature)},r&&o.a.createElement("div",{className:"text--center"},o.a.createElement("img",{className:p.a.featureImage,src:r,alt:t})),o.a.createElement("h3",null,t),o.a.createElement("p",null,a()))}t.default=function(){const e=Object(u.a)(),{siteConfig:t={}}=e;return o.a.createElement(c.a,{title:""+t.title,description:"Documentation for the C# .NET SpotifyAPI-NET Library"},o.a.createElement("header",{className:i()("hero hero--primary",p.a.heroBanner)},o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--5"},o.a.createElement("img",{src:"img/logo.svg",width:"120",height:"120"}),o.a.createElement("h1",{className:"hero__title"},t.title,o.a.createElement("span",{style:{marginLeft:"50px"}}),o.a.createElement(g,{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET","data-icon":"octicon-star","data-size":"large","data-show-count":"true","aria-label":"Star JohnnyCrazy/SpotifyAPI-NET on GitHub"},"Star"),o.a.createElement("br",null),o.a.createElement("a",{href:"https://www.nuget.org/packages/SpotifyAPI.Web/",rel:"noopener noreferrer"},o.a.createElement("img",{alt:"Nuget",src:"https://img.shields.io/nuget/v/SpotifyAPI.Web?label=SpotifyAPI.Web&style=flat-square"})," "),o.a.createElement("a",{href:"https://www.nuget.org/packages/SpotifyAPI.Web.Auth/",rel:"noopener noreferrer"},o.a.createElement("img",{alt:"Nuget",src:"https://img.shields.io/nuget/v/SpotifyAPI.Web.Auth?label=SpotifyAPI.Web.Auth&style=flat-square"}))),o.a.createElement("p",{className:"hero__subtitle"},t.tagline),o.a.createElement("div",{className:p.a.buttons},o.a.createElement(d.a,{className:i()("button button--outline button--secondary button--lg",p.a.getStarted),to:Object(h.a)("docs/next/introduction")},"Get Started"))),o.a.createElement("div",{className:i()("col col--7",p.a.exampleCode)},o.a.createElement(s.a,{metastring:"csharp",className:"csharp"},'var spotify = new SpotifyClient("YourAccessToken");\n\nvar me = await spotify.UserProfile.Current();\nConsole.WriteLine($"Hello there {me.DisplayName}");\n\nawait foreach(\n var playlist in spotify.Paginate(spotify.Playlists.CurrentUsers())\n)\n{\n Console.WriteLine(playlist.Name);\n}'))))),o.a.createElement("main",null,o.a.createElement("div",{className:"container"},o.a.createElement("h2",{style:{textAlign:"center",marginTop:"30px"}},"Try it out now"),o.a.createElement(b.a,null)),v&&v.length&&o.a.createElement("section",{className:p.a.features},o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"row"},v.map((e,t)=>o.a.createElement(w,Object(r.a)({key:t},e))))))))}},160:function(e,t,a){"use strict";var r=a(0),n=a.n(r);t.a=function(e){return n.a.createElement("div",null,e.children)}},163:function(e,t,a){"use strict";var r=a(0),n=a.n(r),o=a(158);var l=function(){return Object(r.useContext)(o.a)},i=a(153),c=a.n(i),s=a(92),d=a.n(s);const u=37,h=39;t.a=function(e){const{block:t,children:a,defaultValue:o,values:i,groupId:s}=e,{tabGroupChoices:f,setTabGroupChoices:p}=l(),[m,g]=Object(r.useState)(o);if(null!=s){const e=f[s];null!=e&&e!==m&&g(e)}const b=e=>{g(e),null!=s&&p(s,e)},v=[];return n.a.createElement("div",null,n.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:c()("tabs",{"tabs--block":t})},i.map(({value:e,label:t})=>n.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":m===e,className:c()("tabs__item",d.a.tabItem,{"tabs__item--active":m===e}),key:e,ref:e=>v.push(e),onKeyDown:e=>((e,t,a)=>{switch(a.keyCode){case h:((e,t)=>{const a=e.indexOf(t)+1;e[a]?e[a].focus():e[0].focus()})(e,t);break;case u:((e,t)=>{const a=e.indexOf(t)-1;e[a]?e[a].focus():e[e.length-1].focus()})(e,t)}})(v,e.target,e),onFocus:()=>b(e),onClick:()=>b(e)},t))),n.a.createElement("div",{role:"tabpanel",className:"margin-vert--md"},r.Children.toArray(a).filter(e=>e.props.value===m)[0]))}},165:function(e,t,a){"use strict";var r=a(0),n=a.n(r),o=a(162),l=a(163),i=a(160);t.a=()=>n.a.createElement("div",{style:{padding:"30px"}},n.a.createElement(l.a,{defaultValue:"cli",values:[{label:".NET CLI",value:"cli"},{label:"Package Manager",value:"nuget"},{label:"Package Reference",value:"reference"}]},n.a.createElement(i.a,{value:"cli"},n.a.createElement(o.a,{metastring:"shell",className:"shell"},"dotnet add package SpotifyAPI.Web --version 6.0.0-beta.1\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\ndotnet add package SpotifyAPI.Web.Auth --version 6.0.0-beta.1\n")),n.a.createElement(i.a,{value:"nuget"},n.a.createElement(o.a,{metastring:"shell",className:"shell"},"Install-Package SpotifyAPI.Web -Version 6.0.0-beta.1\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\nInstall-Package SpotifyAPI.Web.Auth -Version 6.0.0-beta.1\n")),n.a.createElement(i.a,{value:"reference"},n.a.createElement(o.a,{metastring:"xml",className:"xml"},'\n\x3c!-- Optional Auth module, which includes an embedded HTTP Server for OAuth2 --\x3e\n\n'))))},182:function(e,t,a){"use strict";a.r(t),a.d(t,"render",(function(){return C}));var r=window.document,n=window.Math,o=window.HTMLElement,l=window.XMLHttpRequest,i=function(e){return function(t,a,r){var n=e.createElement(t);if(null!=a)for(var o in a){var l=a[o];null!=l&&(null!=n[o]?n[o]=l:n.setAttribute(o,l))}if(null!=r)for(var i=0,c=r.length;i'},heart:{width:12,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"repo-template":{width:14,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}},v={},w=function(e,t){var a=v[e]||(v[e]=[]);if(!(a.push(t)>1)){var r=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete v[e];t=a.shift();)t.apply(null,arguments)}));if(d){var n=new l;h(n,"abort",r),h(n,"error",r),h(n,"load",(function(){var e;try{e=JSON.parse(n.responseText)}catch(t){return void r(t)}r(200!==n.status,e)})),n.open("GET",e),n.send()}else{var o=this||window;o._=function(e){o._=null,r(200!==e.meta.status,e.data)};var c=i(o.document)("script",{async:!0,src:e+(/\?/.test(e)?"&":"?")+"callback=_"}),s=function(){o._&&o._({meta:{}})};h(c,"load",s),h(c,"error",s),c.readyState&&function(e,t,a){var r=function(n){if(t.test(e.readyState))return f(e,"readystatechange",r),a(n)};h(e,"readystatechange",r)}(c,/de|m/,s),o.document.getElementsByTagName("head")[0].appendChild(c)}}},y=function(e,t,a){var r=i(e.ownerDocument),n=e.appendChild(r("style",{type:"text/css"})),o="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:20px;padding:3px 10px;font-size:12px;line-height:20px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor}"+g(t["data-color-scheme"]);n.styleSheet?n.styleSheet.cssText=o:n.appendChild(e.ownerDocument.createTextNode(o));var l,c,d=r("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:(l=t["data-icon"],c=/^large$/i.test(t["data-size"])?16:14,l=(""+l).toLowerCase().replace(/^octicon-/,""),s(b,l)||(l="mark-github"),'")},[" ",r("span",{},[t["data-text"]||""])]),u=e.appendChild(r("div",{className:"widget"+(/^large$/i.test(t["data-size"])?" widget-lg":"")},[d])),h=d.hostname.split(".").reverse();if(""===h[0]&&h.shift(),"com"!==h[0]||"github"!==h[1])return d.href="#",d.target="_self",void a(u);var f=h.length,p=(" /"+d.pathname).split(/\/+/);if(((2===f||3===f&&"gist"===h[2])&&"archive"===p[3]||2===f&&"releases"===p[3]&&"download"===p[4]||3===f&&"codeload"===h[2])&&(d.target="_top"),/^true$/i.test(t["data-show-count"])&&2===f){var m,v;if(!p[2]&&p[1])m=v="followers";else if(!p[3]&&p[2])v="stargazers_count",m="stargazers";else if(p[4]||"subscription"!==p[3])if(p[4]||"fork"!==p[3]){if("issues"!==p[3])return void a(u);v="open_issues_count",m="issues"}else v="forks_count",m="network/members";else v="subscribers_count",m="watchers";var y=p[2]?"/repos/"+p[1]+"/"+p[2]:"/users/"+p[1];w.call(this,"https://api.github.com"+y,(function(e,t){if(!e){var n=t[v];u.appendChild(r("a",{className:"social-count",href:t.html_url+"/"+m,rel:"noopener",target:"_blank","aria-label":n+" "+v.replace(/_count$/,"").replace("_"," ").slice(0,n<2?-1:void 0)+" on GitHub"},[(""+n).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}a(u)}))}else a(u)},E=window.devicePixelRatio||1,k=function(e){return(E>1?n.ceil(n.round(e*E)/E*2)/2:n.ceil(e))||0},x=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},C=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){for(var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")},a=["icon","color-scheme","text","size","show-count"],r=0,n=a.length;r=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 l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},y=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),y=r,b=s["".concat(i,".").concat(y)]||s[y]||f[y]||a;return n?o.a.createElement(b,c({ref:t},l,{components:n})):o.a.createElement(b,c({ref:t},l))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=y;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l Artists")," (",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full"}),"FullArtist"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'SeveralArtists artists = _spotify.GetRelatedArtists("1KpCi9BOfviCVhmpI4G2sY");\nConsole.WriteLine(artists.Artists[0].Name);\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getartiststoptracks"},"GetArtistsTopTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get Spotify catalog information about an artist's top tracks by country.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"id"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The Spotify ID for the artist."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"country"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The country: an ISO 3166-1 alpha-2 country code."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"SeveralTracks")," object which contains the property ",Object(b.b)("inlineCode",{parentName:"p"},"List Tracks")," (",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#track-object-full"}),"FullTrack"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'SeveralTracks tracks = _spotify.GetArtistsTopTracks("1KpCi9BOfviCVhmpI4G2sY", "DE");\nConsole.WriteLine(tracks.Tracks.Count); //How many tracks did we get?\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getartistsalbums"},"GetArtistsAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"id"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The Spotify ID for the artist."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"1KpCi9BOfviCVhmpI4G2sY"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[type]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"A list of keywords that will be used to filter the response. If not supplied, all album types will be returned"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"AlbumType.All"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"The index of the first album to return. Default: 0"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"[market]"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#album-object-simplified"}),"SimpleAlbum")," wrapped inside a ",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#paging-object"}),"Paging-object")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'Paging albums = _spotify.GetArtistsAlbums("1KpCi9BOfviCVhmpI4G2sY", AlbumType.All);\nalbums.Items.ForEach(album => Console.WriteLine(album.Name));\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getseveralartists"},"GetSeveralArtists"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get Spotify catalog information for several artists based on their Spotify IDs.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs for the artists. Maximum: 50 IDs."),Object(b.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List() { "1KpCi9BOfviCVhmpI4G2sY" } '))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"SeveralArtists")," object which contains the property ",Object(b.b)("inlineCode",{parentName:"p"},"List Artists")," (",Object(b.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full"}),"FullArtist"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(r.a)({parentName:"pre"},{className:"language-csharp"}),'SeveralArtists artists = _spotify.GetSeveralArtists(new List() {"1KpCi9BOfviCVhmpI4G2sY"});\nartists.Artists.ForEach(artist => Console.WriteLine(artist.Name));\n')),Object(b.b)("hr",null))}o.isMDXComponent=!0},151:function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return j}));var r=a(0),n=a.n(r);function b(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function i(t){for(var e=1;e=0||(n[a]=t[a]);return n}(t,e);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}var p=n.a.createContext({}),o=function(t){var e=n.a.useContext(p),a=e;return t&&(a="function"==typeof t?t(e):i({},e,{},t)),a},s=function(t){var e=o(t.components);return n.a.createElement(p.Provider,{value:e},t.children)},O={inlineCode:"code",wrapper:function(t){var e=t.children;return n.a.createElement(n.a.Fragment,{},e)}},m=Object(r.forwardRef)((function(t,e){var a=t.components,r=t.mdxType,b=t.originalType,l=t.parentName,p=c(t,["components","mdxType","originalType","parentName"]),s=o(a),m=r,j=s["".concat(l,".").concat(m)]||s[m]||O[m]||b;return a?n.a.createElement(j,i({ref:e},p,{components:a})):n.a.createElement(j,i({ref:e},p))}));function j(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var b=a.length,l=new Array(b);l[0]=m;var i={};for(var c in e)hasOwnProperty.call(e,c)&&(i[c]=e[c]);i.originalType=t,i.mdxType="string"==typeof t?t:r,l[1]=i;for(var p=2;p { Scopes.UserReadEmail }\n };\n BrowserUtil.Open(uri);\n}\n\nprivate static async Task OnAuthorizationCodeReceived(object sender, AuthorizationCodeResponse response)\n{\n await _server.Stop();\n\n var config = SpotifyClientConfig.CreateDefault();\n var tokenResponse = await new OAuthClient(config).RequestToken(\n new AuthorizationCodeTokenRequest(\n "ClientId", "ClientSecret", response.Code, "http://localhost:5000/callback"\n )\n );\n\n var spotify = new SpotifyClient(tokenResponse.AccessToken);\n // do calls with spotify and save token?\n}\n')),Object(o.b)("p",null,"For real examples, have a look at ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.CLI.PersistentConfig"}),"Example.CLI.PersistentConfig")," and ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/tree/master/SpotifyAPI.Web.Examples/Example.CLI.CustomHTML"}),"Example.CLI.CustomHTML")))}l.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function o(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 a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),l=function(e){var t=r.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 r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=l(n),d=a,h=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return n?r.a.createElement(h,s({ref:t},p,{components:n})):r.a.createElement(h,s({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var p=2;p Playlists")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"FeaturedPlaylists playlists = _spotify.GetFeaturedPlaylists();\nConsole.WriteLine(playlists.Message);\nplaylists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getnewalbumreleases"},"GetNewAlbumReleases"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player\u2019s \u201cBrowse\u201d tab).")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[country]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A country: an ISO 3166-1 alpha-2 country code."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first item to return. Default: 0"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"NewAlbumReleases")," object, which has the property ",Object(b.b)("inlineCode",{parentName:"p"},"Paging Albums"),"."),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"NewAlbumReleases newAlbums = _spotify.GetNewAlbumReleases();\nnewAlbums.Albums.Items.ForEach(album => Console.WriteLine(album.Name));\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getcategories"},"GetCategories"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a list of categories used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab).")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[country]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[locale]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"de_DE"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first item to return. Default: 0 (the first object)."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"CategoryList")," object, which has the property ",Object(b.b)("inlineCode",{parentName:"p"},"Paging Categories"),"."),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),"CategoryList categoryList = _spotify.GetCategories();\ncategoryList.Categories.Items.ForEach(category => Console.WriteLine(category.Name));\n")),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getcategory"},"GetCategory"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a single category used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab).")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"categoryId"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify category ID for the category."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"party"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[country]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[locale]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"de_DE"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#category-object"}),"Category")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'Category cat = _spotify.GetCategory("party");\nConsole.WriteLine(cat.Name);\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getcategoryplaylists"},"GetCategoryPlaylists"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get a list of Spotify playlists tagged with a particular category.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"categoryId"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify category ID for the category."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"party"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[country]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A country: an ISO 3166-1 alpha-2 country code."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"20"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first item to return. Default: 0"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"0"))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"CategoryPlaylist")," object, which has the property ",Object(b.b)("inlineCode",{parentName:"p"},"Paging Playlists")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'CategoryPlaylist playlists = _spotify.GetCategoryPlaylists("party");\nplaylists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));\n')),Object(b.b)("hr",null))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return O})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n);function b(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||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),p=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},O=function(e){var t=p(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},j={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,l=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),O=p(a),m=n,u=O["".concat(l,".").concat(m)]||O[m]||j[m]||b;return a?r.a.createElement(u,c({ref:t},o,{components:a})):r.a.createElement(u,c({ref:t},o))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,l=new Array(b);l[0]=m;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var o=2;o + + + + + +Authorization Code | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Authorization Code

This way is not recommended for client-side apps and requires server-side code to run securely. +With this approach, you first get a code which you need to trade against the access-token. +In this exchange you need to provide your Client-Secret and because of that it's not recommended. +A good thing about this method: You can always refresh your token, without having the user to auth it again.

More info: here

static async void Main(string[] args)
{
AuthorizationCodeAuth auth = new AuthorizationCodeAuth(
_clientId,
_secretId,
"http://localhost:4002",
"http://localhost:4002",
Scope.PlaylistReadPrivate | Scope.PlaylistReadCollaborative
);
+
auth.AuthReceived += async (sender, payload) =>
{
auth.Stop();
Token token = await auth.ExchangeCode(payload.Code);
SpotifyWebAPI api = new SpotifyWebAPI()
{
TokenType = token.TokenType,
AccessToken = token.AccessToken
};
// Do requests with API client
};
auth.Start(); // Starts an internal HTTP Server
auth.OpenBrowser();
}

Token Refresh

Once the AccessToken is expired, you can use your RefreshToken to get a new one. +In this procedure, no HTTP Server is needed in the background and a single HTTP Request is made.

// Auth code from above
+
if(token.IsExpired())
{
Token newToken = await auth.RefreshToken(token.RefreshToken);
api.AccessToken = newToken.AccessToken
api.TokenType = newToken.TokenType
}
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/client_credentials/index.html b/docs/auth/client_credentials/index.html new file mode 100644 index 00000000..80ca196c --- /dev/null +++ b/docs/auth/client_credentials/index.html @@ -0,0 +1,33 @@ + + + + + + +Client Credentials | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Client Credentials

With this approach, you make a POST Request with a base64 encoded string (consists of ClientId + ClientSecret). You will directly get the token (Without a local HTTP Server), but it will expire and can't be refreshed. +If you want to use it securely, you would need to do it all server-side. +NOTE: You will only be able to query non-user-related information e.g search for a Track.

More info: here

CredentialsAuth auth = new CredentialsAuth(_clientId, _secretId);
Token token = await auth.GetToken();
SpotifyWebAPI api = new SpotifyWebAPI()
{
TokenType = token.TokenType,
AccessToken = token.AccessToken
};
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/getting_started/index.html b/docs/auth/getting_started/index.html new file mode 100644 index 00000000..ea203b9e --- /dev/null +++ b/docs/auth/getting_started/index.html @@ -0,0 +1,33 @@ + + + + + + +Getting Started | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Getting Started

Auth-Methods

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

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

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

NameDescription
Client_IdThis is your client_id, you don't have to hide it
Client_SecretNever use this in one of your client-side apps! Keep it secret!
Redirect URIsSome of auth flows require that you set the correct redirect URI

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

Overview: +Overview

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/implicit_grant/index.html b/docs/auth/implicit_grant/index.html new file mode 100644 index 00000000..558dc1e3 --- /dev/null +++ b/docs/auth/implicit_grant/index.html @@ -0,0 +1,32 @@ + + + + + + +Implicit Grant | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Implicit Grant

This way is recommended and the only auth-process which does not need a server-side exchange of keys. With this approach, you directly get a Token object after the user authed your application. +You won't be able to refresh the token. If you want to use the internal Http server, please add "http://localhost:YOURPORT" to your application redirect URIs.

More info: here

static async void Main(string[] args)
{
ImplicitGrantAuth auth = new ImplicitGrantAuth(
_clientId,
"http://localhost:4002",
"http://localhost:4002",
Scope.UserReadPrivate
);
auth.AuthReceived += async (sender, payload) =>
{
auth.Stop(); // `sender` is also the auth instance
SpotifyWebAPI api = new SpotifyWebAPI()
{
TokenType = payload.TokenType,
AccessToken = payload.AccessToken
};
// Do requests with API client
};
auth.Start(); // Starts an internal HTTP Server
auth.OpenBrowser();
}
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/token_swap/index.html b/docs/auth/token_swap/index.html new file mode 100644 index 00000000..4fe2a43e --- /dev/null +++ b/docs/auth/token_swap/index.html @@ -0,0 +1,41 @@ + + + + + + +Token Swap | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Token Swap

This way uses server-side code or at least access to an exchange server, otherwise, compared to other +methods, it is impossible to use.

With this approach, you provide the URI/URL to your desired exchange server to perform all necessary +requests to Spotify, as well as requests that return back to the "server URI".

The exchange server must be able to:

  • Return the authorization code from Spotify API authenticate page via GET request to the "server URI".
  • Request the token response object via POST to the Spotify API token page.
  • Request a refreshed token response object via POST to the Spotify API token page.

The good news is that you do not need to code it yourself.

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 never exposed and is completely hidden compared to other methods (excluding ImplicitGrantAuth +as it does not deal with a client secret). This means +your Spotify app cannot be spoofed by a malicious third party.

Using TokenSwapWebAPIFactory

The TokenSwapWebAPIFactory will create and configure a SpotifyWebAPI object for you.

It does this through the method GetWebApiAsync 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 synchronous, use GetWebApiAsync().Result without using await.

TokenSwapWebAPIFactory webApiFactory;
SpotifyWebAPI spotify;
+
// 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.
webApiFactory = new TokenSwapWebAPIFactory("INSERT LINK TO YOUR index.php HERE")
{
Scope = Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate,
AutoRefresh = true
};
// You may want to react to being able to use the Spotify service.
// webApiFactory.OnAuthSuccess += (sender, e) => authorized = true;
// You may want to react to your user's access expiring.
// webApiFactory.OnAccessTokenExpired += (sender, e) => authorized = false;
+
try
{
spotify = await webApiFactory.GetWebApiAsync();
// Synchronous way:
// spotify = webApiFactory.GetWebApiAsync().Result;
}
catch (Exception ex)
{
// Example way to handle error reporting gracefully with your SpotifyWebAPI wrapper
// UpdateStatus($"Spotify failed to load: {ex.Message}");
}

Using TokenSwapAuth

Since the TokenSwapWebAPIFactory not only simplifies the whole process but offers additional functionality too +(such as AutoRefresh and AuthSuccess AuthFailure events), use of this way is very verbose and is only +recommended if you are having issues with TokenSwapWebAPIFactory or need access to the tokens.

TokenSwapAuth auth = new TokenSwapAuth(
exchangeServerUri: "INSERT LINK TO YOUR index.php HERE",
serverUri: "http://localhost:4002",
scope: Scope.UserReadPrivate | Scope.UserReadEmail | Scope.PlaylistReadPrivate
);
auth.AuthReceived += async (sender, response) =>
{
lastToken = await auth.ExchangeCodeAsync(response.Code);
+
spotify = new SpotifyWebAPI()
{
TokenType = lastToken.TokenType,
AccessToken = lastToken.AccessToken
};
+
authenticated = true;
auth.Stop();
};
auth.OnAccessTokenExpired += async (sender, e) => spotify.AccessToken = (await auth.RefreshAuthAsync(lastToken.RefreshToken)).AccessToken;
auth.Start();
auth.OpenBrowser();

Token Swap Endpoint

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

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

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

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

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

  • grant_type (set to "refresh_token")
  • refresh_token

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

Remarks

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

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

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/home/index.html b/docs/home/index.html new file mode 100644 index 00000000..2e725696 --- /dev/null +++ b/docs/home/index.html @@ -0,0 +1,32 @@ + + + + + + +SpotifyAPI-NET | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

SpotifyAPI-NET

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

Spotify's Web API (link)

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

SpotifyAPI.Web

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

SpotifyAPI.Web.Auth

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


Installing

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

Getting Started

Projects

lidarr by @lidarr

Looks and smells like Sonarr but made for music.

botframework-solutions by @microsoft

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

Spytify by @jwallet

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

audio-band by @dsafa

Display and control songs from the Windows taskbar

rocksmith-custom-song-toolkit by @catara

MASS Manipulation of Rocksmith DLC Library

Spofy by @eltoncezar

A Spotify mini player and notifier for Windows

Toastify by @aleab

Toastify adds global hotkeys and toast notifications to Spotify

Forked from nachmore/toastify

Spotify Oculus by @CaptainMorgs

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

Songify by @Inzaniity

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

Elite G19s Companion app by @MagicMau

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

ARDUINO-Spotify-Remote-Control by @NADER11NDEU

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/auth_introduction/index.html b/docs/next/auth_introduction/index.html new file mode 100644 index 00000000..62b1b741 --- /dev/null +++ b/docs/next/auth_introduction/index.html @@ -0,0 +1,31 @@ + + + + + + +Introduction | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Introduction

Spotify does not allow unauthorized access to the api. Thus, you need an access token to make requets. This access token can be gathered via multiple schemes, all following the OAuth2 spec. Since it's important to choose the correct scheme for your usecase, make sure you have a grasp of the following terminology/docs:

Since every auth flow also needs an application in the spotify dashboard, make sure you have the necessary values (like Client Id and Client Secret).

Then, continue with the docs of the specific auth flows:

auth comparison

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/authorization_code/index.html b/docs/next/authorization_code/index.html new file mode 100644 index 00000000..8f632b49 --- /dev/null +++ b/docs/next/authorization_code/index.html @@ -0,0 +1,40 @@ + + + + + + +Authorization Code | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Authorization Code

This flow is suitable for long-running applications in which the user grants permission only once. It provides an access token that can be refreshed. Since the token exchange involves sending your secret key, perform this on a secure location, like a backend service, and not from a client such as a browser or from a mobile app.

Existing Web-Server

If you are already in control of a Web-Server (like ASP.NET), you can start the flow by generating a login uri

// Make sure "http://localhost:5000" is in your applications redirect URIs!
var loginRequest = new LoginRequest(
new Uri("http://localhost:5000"),
"ClientId",
LoginRequest.ResponseType.Code
)
{
Scope = new[] { Scopes.PlaylistReadPrivate, Scopes.PlaylistReadCollaborative }
};
var uri = loginRequest.ToUri();
// Redirect user to uri via your favorite web-server

When the user is redirected to the generated uri, he will have to login with his spotify account and confirm, that your application wants to access his user data. Once confirmed, he will be redirect to http://localhost:5000 and a code parameter is attached to the query. This code has to be exchanged for an access_token and refresh_token:

// This method should be called from your web-server when the user visits "http://localhost:5000"
public Task GetCallback(string code)
{
var response = await new OAuthClient().RequestToken(
new AuthorizationCodeTokenRequest("ClientId", "ClientSecret", code, "http://localhost:5000")
);
+
var spotify = new SpotifyClient(response.AccessToken);
// Also important for later: response.RefreshToken
}

If the token expires at some point (check via response.IsExpired), you can refresh it:

var newResponse = await new OAuthClient().RequestToken(
new AuthorizationCodeRefreshRequest("ClientId", "ClientSecret", response.RefreshToken)
);
+
var spotify = new SpotifyClient(newResponse.AccessToken);

You can also let the AuthorizationCodeAuthenticator take care of the refresh part:

var response = await new OAuthClient().RequestToken(
new AuthorizationCodeTokenRequest("ClientId", "ClientSecret", code, "http://localhost:5000")
);
var config = SpotifyClientConfig
.CreateDefault()
.WithAuthenticator(new AuthorizationCodeAuthenticator("ClientId", "ClientSecret", response));
+
var spotify = new SpotifyClient(config);

For a real example, have a look at Example.ASP. This also uses the great package AspNet.Security.OAuth.Spotify which takes care of the OAuth flow inside of ASP.NET.

Using Spotify.Web.Auth

For cross-platform CLI and desktop apps (non UWP apps), Spotify.Web.Auth can be used to supply a small embedded Web Server for the code retrieval.

warning

You're client secret will be exposed when embedded in a desktop/cli app. This can be abused and is not preffered. If possible, let the user create an application in spotify dashboard or let a server handle the spotify communication.

private static EmbedIOAuthServer _server;
+
public static async Task Main()
{
// Make sure "http://localhost:5000/callback" is in your spotify application as redirect uri!
_server = new EmbedIOAuthServer(new Uri("http://localhost:5000/callback"), 5000);
await _server.Start();
+
_server.AuthorizationCodeReceived += OnAuthorizationCodeReceived;
+
var request = new LoginRequest(_server.BaseUri, "ClientId", LoginRequest.ResponseType.Code)
{
Scope = new List<string> { Scopes.UserReadEmail }
};
BrowserUtil.Open(uri);
}
+
private static async Task OnAuthorizationCodeReceived(object sender, AuthorizationCodeResponse response)
{
await _server.Stop();
+
var config = SpotifyClientConfig.CreateDefault();
var tokenResponse = await new OAuthClient(config).RequestToken(
new AuthorizationCodeTokenRequest(
"ClientId", "ClientSecret", response.Code, "http://localhost:5000/callback"
)
);
+
var spotify = new SpotifyClient(tokenResponse.AccessToken);
// do calls with spotify and save token?
}

For real examples, have a look at Example.CLI.PersistentConfig and Example.CLI.CustomHTML

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/client_credentials/index.html b/docs/next/client_credentials/index.html new file mode 100644 index 00000000..3ad317b2 --- /dev/null +++ b/docs/next/client_credentials/index.html @@ -0,0 +1,35 @@ + + + + + + +Client Credentials | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Client Credentials

The Client Credentials flow is used in server-to-server authentication. +Only endpoints that do not access user information can be accessed.

By supplying your SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET, you get an access token.

Request token once

To request an access token, build a ClientCredentialsRequest and send it via OAuthClient. This access token will expire after some time and you need to repeat the process.

public static async Task Main()
{
var config = SpotifyClientConfig.CreateDefault();
+
var request = new ClientCredentialsRequest("CLIENT_ID", "CLIENT_SECRET");
var response = await new OAuthClient(config).RequestToken(request);
+
var spotify = new SpotifyClient(config.WithToken(response.AccessToken));
}

Request Token On-Demand

You can also use CredentialsAuthenticator, which will make sure the spotify instance will always have an up-to-date access token by automatically refreshing the token on-demand.

public static async Task Main()
{
var config = SpotifyClientConfig
.CreateDefault()
.WithAuthenticator(new CredentialsAuthenticator("CLIENT_ID", "CLIENT_SECRET"));
+
var spotify = new SpotifyClient(config);
}
info

There is no thread safety guaranteed when using CredentialsAuthenticator.

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/configuration/index.html b/docs/next/configuration/index.html new file mode 100644 index 00000000..ee171fbd --- /dev/null +++ b/docs/next/configuration/index.html @@ -0,0 +1,34 @@ + + + + + + +Configuration | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Configuration

To configure the spotify client functionality, the SpotifyClientConfig class exists.

var config = SpotifyClientConfig.CreateDefault("YourAccessToken");
var spotify = new SpotifyClient(config);
+
// is the same as
+
var spotify = new SpotifyClient("YourAccessToken");

We won't cover every possible configuration in this part, head over to the specific guides for that:

  • ...

HTTPClient Notes

One important part of the configuration is the used HTTPClient. By default, every time when a SpotifyClientConfig is instantiated, a new HTTPClient is created in the background. For Web Applications which require a lot of different configs due to user based access tokens, it is not advised to create a new config from scratch with every HTTP call. Instead, a default (static) config should be used to create a new config with a new access token.

Consider the following HTTP Endpoint:

public HttpResult Get()
{
var config = SpotifyClientConfig.CreateDefault("YourAccessToken")
var spotify = new SpotifyClient(config);
}

This creates a new HTTPClient every time a request is made, which can be quite bad for the performance. Instead we should use a base config and use WithToken:

// somewhere global/static
public static SpotifyClientConfig DefaultConfig = SpotifyClientConfig.CreateDefault();
+
public HttpResult Get()
{
var config = DefaultConfig.WithToken("YourAccessToken");
var spotify = new SpotifyClient(config);
}

This way, a single HTTPClient will be used. For a real example, checkout the ASP.NET Example

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/error_handling/index.html b/docs/next/error_handling/index.html new file mode 100644 index 00000000..b308b9ee --- /dev/null +++ b/docs/next/error_handling/index.html @@ -0,0 +1,31 @@ + + + + + + +Error Handling | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Error Handling

API calls can fail when input data is malformed or the server detects issues with the request. As an example, the following request obviously fails:

var track = await spotify.Tracks.Get("NotExistingTrackId");
Console.WriteLine(track.Name);

When a request fails an APIException is thrown. Specific errors may throw a child exception of APIException.

APIException

A very general API error. The message is parsed from the API response JSON body and the response is available as public property.

try {
var track = await spotify.Tracks.Get("NotExistingTrackId");
} catch(APIException e) {
// Prints: invalid id
Console.WriteLine(e.Message);
// Prints: BadRequest
Console.WriteLine(e.Response?.StatusCode);
}

APIUnauthorizedException

Provides the same properties as APIException and occurs, when the access token is expired or not provided. Notice that an access token has to be included in every request. Spotify does not allow unauthorized API access.

APITooManyRequestsException

Provides the same properties as APIException and occurs, when too many requests has been sent by your application. It also provides the property TimeSpan RetryAfter, which maps to the received Retry-After Header.

try {
// call it very often?
var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");
} catch(APITooManyRequestsException e) {
// Prints: seconds to wait, often 1 or 2
Console.WriteLine(e.RetryAfter);
}
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_asp/index.html b/docs/next/example_asp/index.html new file mode 100644 index 00000000..70e1f5f0 --- /dev/null +++ b/docs/next/example_asp/index.html @@ -0,0 +1,34 @@ + + + + + + +ASP.NET | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

ASP.NET

Description

This example is based on ASP .NET Core. It uses Authorization Code under the hood with the help of AspNet.Security.OAuth.Spotify. It stores the access token in the current user session (cookie-based) and allows to refresh tokens when they expire. Two pages are implemented:

  • Home shows your current playlists via pagination
  • Profile shows your current profile information

ASP Example - Home +ASP Example - Profile

Run it

Before running it, make sure you created an app in your spotify dashboard and https://localhost:5001 is a redirect uri of it.

# Assumes linux and current working directory is the cloned repository
cd SpotifyAPI.Web.Examples/Example.ASP
dotnet restore
+
SPOTIFY_CLIENT_ID=YourClientId SPOTIFY_CLIENT_SECRET=YourClientSecret dotnet run
+
# Visit https://localhost:5001
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_blazor/index.html b/docs/next/example_blazor/index.html new file mode 100644 index 00000000..a51a90fd --- /dev/null +++ b/docs/next/example_blazor/index.html @@ -0,0 +1,33 @@ + + + + + + +Blazor ServerSide | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Blazor ServerSide

Description

Very similar to the Blazor WASM Example, but runs code on the server side and pushes view updates to the client.

ASP Blazor Example - Home

Run it

Before running it, make sure you created an app in your spotify dashboard and https://localhost:5001 is a redirect uri of it.

# Assumes linux and current working directory is the cloned repository
cd SpotifyAPI.Web.Examples/Example.ASPBlazor
dotnet restore
+
SPOTIFY_CLIENT_ID=YourClientId SPOTIFY_CLIENT_SECRET=YourClientSecret dotnet run
+
# Visit https://localhost:5001
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_blazor_wasm/index.html b/docs/next/example_blazor_wasm/index.html new file mode 100644 index 00000000..ebbafd2f --- /dev/null +++ b/docs/next/example_blazor_wasm/index.html @@ -0,0 +1,33 @@ + + + + + + +Blazor WASM | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Blazor WASM

Description

This small cross-platform web app runs on 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 Blazor WebAssembly here

Since this library is compatible with .NET Standard 2.1, you can use all features of SpotifyAPI.Web in your blazor wasm app. The example logs the user in via Implicit Grant and does 2 user-related API requests from the browser. You can observe the requests from your browsers network tools.

BlazorWASM Spotify Example

BlazorWASM Spotify Example - network tools

Run it

Before running it, make sure you created an app in your spotify dashboard and https://localhost:5001 is a redirect uri of it.

# Assumes linux and current working directory is the cloned repository
cd SpotifyAPI.Web.Examples/Example.BlazorWASM
dotnet restore
+
echo "{ \"SPOTIFY_CLIENT_ID\": \"YourSpotifyClientId\" }" > wwwroot/appsettings.json
dotnet run
+
# Visit https://localhost:5001
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_cli_custom_html/index.html b/docs/next/example_cli_custom_html/index.html new file mode 100644 index 00000000..7743d192 --- /dev/null +++ b/docs/next/example_cli_custom_html/index.html @@ -0,0 +1,31 @@ + + + + + + +CLI - Custom HTML | SpotifyAPI-NET + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_cli_persistent_config/index.html b/docs/next/example_cli_persistent_config/index.html new file mode 100644 index 00000000..ce7a4fdc --- /dev/null +++ b/docs/next/example_cli_persistent_config/index.html @@ -0,0 +1,31 @@ + + + + + + +CLI - Persistent Config | SpotifyAPI-NET + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_token_swap/index.html b/docs/next/example_token_swap/index.html new file mode 100644 index 00000000..46beca13 --- /dev/null +++ b/docs/next/example_token_swap/index.html @@ -0,0 +1,31 @@ + + + + + + +Token Swap | SpotifyAPI-NET + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/example_uwp/index.html b/docs/next/example_uwp/index.html new file mode 100644 index 00000000..48939d20 --- /dev/null +++ b/docs/next/example_uwp/index.html @@ -0,0 +1,31 @@ + + + + + + +UWP | SpotifyAPI-NET + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/getting_started/index.html b/docs/next/getting_started/index.html new file mode 100644 index 00000000..baae3155 --- /dev/null +++ b/docs/next/getting_started/index.html @@ -0,0 +1,36 @@ + + + + + + +Getting Started | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Getting Started

Adding SpotifyAPI-NET to your project

The library can be added to your project via the following methods:

Package Managers

dotnet add package SpotifyAPI.Web --version 6.0.0-beta.1
# Optional Auth module, which includes an embedded HTTP Server for OAuth2
dotnet add package SpotifyAPI.Web.Auth --version 6.0.0-beta.1

Add DLL Manually

You can also grab the latest compiled DLL from our GitHub Releases Page. It can be added to your project via Visual Studio or directly in your .csproj:

<ItemGroup>
<Reference Include="SpotifyAPI.Web">
<HintPath>..\Dlls\SpotifyAPI.Web.dll</HintPath>
</Reference>
</ItemGroup>

Compile Yourself

git clone https://github.com/JohnnyCrazy/SpotifyAPI-NET.git
cd SpotifyAPI-NET
dotnet restore
dotnet build
+
ls -la SpotifyAPI.Web/bin/Debug/netstandard2.1/SpotifyAPI.Web.dll

First API Calls

You're now ready to issue your first calls to the Spotify API, a small console example:

using System;
using SpotifyAPI.Web;
+
class Program
{
static async Task Main()
{
var spotify = new SpotifyClient("YourAccessToken");
+
var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");
Console.WriteLine(track.Name);
}
}
tip

Notice that the spotify api does not allow unauthorized API access. Wondering where you should get an access token from? For a quick test, head over to the Spotify Developer Console and generate an access token with the required scopes! For a permanent solution, head over to the authentication guides.

There is no online documentation for every available API call, but XML inline docs are available:

All calls have the Spotify Web API documentation reference attached as a remark.

Query/Body Parameters

If an API endpoint has query or body parameters, a request model can be supplied to the method

// No optional or required query/body parameters
// The track ID is part of the request path --> it's not treated as query/body parameter
var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");
+
// Optional query/body parameter
var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH", new TrackRequest{
Market = "DE"
});
+
// Sometimes, query/body parameters are also required!
var tracks = await spotify.Tracks.GetSeveral(new TracksRequest(new List<string> {
"1s6ux0lNiTziSrd7iUAADH",
"6YlOxoHWLjH6uVQvxUIUug"
}));

If a query/body parameter is required, it has to be supplied in the constructor of the request model. In the background, empty/null checks are also performed to make sure required parameters are not empty/null. If it is optional, it can be supplied as a property to the request model.

Guides

All other relevant topics are covered in the "Guides" and Authentication Guides section in the sidebar!

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/implicit_grant/index.html b/docs/next/implicit_grant/index.html new file mode 100644 index 00000000..53236722 --- /dev/null +++ b/docs/next/implicit_grant/index.html @@ -0,0 +1,37 @@ + + + + + + +Implicit Grant | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Implicit Grant

Implicit grant flow is for clients that are implemented entirely using JavaScript and running in the resource owner’s browser. You do not need any server-side code to use it. Rate limits for requests are improved but there is no refresh token provided. This flow is described in RFC-6749.

This flow is useful for getting a user access token for a short timespan

Existing Web-Server

If you are already in control of a Web-Server (like ASP.NET), you can start the flow by generating a login uri

// Make sure "http://localhost:5000" is in your applications redirect URIs!
var loginRequest = new LoginRequest(
new Uri("http://localhost:5000"),
"ClientId",
LoginRequest.ResponseType.Token
)
{
Scope = new[] { Scopes.PlaylistReadPrivate, Scopes.PlaylistReadCollaborative }
};
var uri = loginRequest.ToUri();
// Redirect user to uri via your favorite web-server

When the user is redirected to the generated uri, he will have to login with his spotify account and confirm, that your application wants to access his user data. Once confirmed, he will be redirect to http://localhost:5000 and the fragment identifier (# part of URI) will contain an access token.

warning

Note, this parameter is not sent to the server! You need JavaScript to access it.

Using custom Protocols

This flow can also be used with custom protocols instead of http/https. This is especially interesting for UWP apps, since your able to register custom protocol handlers quite easily.

protocol handlers

The process is very similar, you generate a uri and open it for the user

// Make sure "spotifyapi.web.oauth://token" is in your applications redirect URIs!
var loginRequest = new LoginRequest(
new Uri("spotifyapi.web.oauth://token"),
"ClientId",
LoginRequest.ResponseType.Token
)
{
Scope = new[] { Scopes.PlaylistReadPrivate, Scopes.PlaylistReadCollaborative }
};
var uri = loginRequest.ToUri();
+
// This call requires Spotify.Web.Auth
BrowserUtil.Open(uri);

After the user logged in and consented your app, your UWP app will receive a callback:

protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
var publisher = Mvx.IoCProvider.Resolve<ITokenPublisherService>();
+
// This Uri contains your access token in the Fragment part
Console.WriteLine(eventArgs.Uri);
}
}

For a real example, have a look at the Example.UWP, Example.ASP or Example.ASPBlazor

Using Spotify.Web.Auth

For cross-platform CLI and desktop apps (non UWP apps), custom protocol handlers are sometimes not an option. The fallback here is a small cross-platform embedded web server running on http://localhost:5000 serving javascript. The javscript will parse the fragment part of the URI and sends a request to the web server in the background. The web server then notifies your appliciation via event.

private static EmbedIOAuthServer _server;
+
public static async Task Main()
{
// Make sure "http://localhost:5000/callback" is in your spotify application as redirect uri!
_server = new EmbedIOAuthServer(new Uri("http://localhost:5000/callback"), 5000);
await _server.Start();
+
_server.ImplictGrantReceived += OnImplictGrantReceived;
+
var request = new LoginRequest(_server.BaseUri, "ClientId", LoginRequest.ResponseType.Code)
{
Scope = new List<string> { Scopes.UserReadEmail }
};
BrowserUtil.Open(uri);
}
+
private static async Task OnImplictGrantReceived(object sender, ImplictGrantResponse response)
{
await _server.Stop();
var spotify = new SpotifyClient(response.AccessToken);
// do calls with spotify
}

For real examples, have a look at Example.CLI.PersistentConfig and Example.CLI.CustomHTML

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/introduction/index.html b/docs/next/introduction/index.html new file mode 100644 index 00000000..1d697c04 --- /dev/null +++ b/docs/next/introduction/index.html @@ -0,0 +1,31 @@ + + + + + + +Introduction | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Introduction

This open source library for the Spotify Web API provides an easy to use interface for .NET based languages, like C# and VisualBasic .NET. By using it you can query general spotify catalog information (tracks, albums and playlists), manage user-related content ("My Library", create and edit playlists) and control the users music players (play, stop, transfer playback, play specific track).

Features

From version 6 onwards, the library was built with the following features included:

  • ✅ Typed responses and requests to over 74 endpoints. Complete and always up to date.
  • ✅ Supports .NET Standard 2.X, which includes all major platforms, including mobile:
    • .NET Framework
    • UWP
    • .NET Core
    • Xamarin.Forms
  • ✅ Included HTTPClient, but feel free to bring your own!
  • ✅ Logging supported
  • ✅ Retry Handlers supported
  • ✅ Proxy support
  • ✅ Pagination support
  • ✅ All OAuth2 Authentications supported for use in ASP .NET and CLI apps
  • ✅ Modular structure, for easy unit testing
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/logging/index.html b/docs/next/logging/index.html new file mode 100644 index 00000000..6cc861c6 --- /dev/null +++ b/docs/next/logging/index.html @@ -0,0 +1,34 @@ + + + + + + +Logging | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Logging

The library provides a way to inject your own, custom HTTP Logger. By default, no logging is performed.

var config = SpotifyClientConfig
.CreateDefault("YourAccessToken")
.WithHTTPLogger(new YourHTTPLogger());
+
var spotify = new SpotifyClient(config);

The IHTTPLogger interface can be found here.

SimpleConsoleHTTPLogger

The library ships with a simple console-based logger

var config = SpotifyClientConfig
.CreateDefault("YourAccessToken")
.WithHTTPLogger(new SimpleConsoleHTTPLogger());
+
var spotify = new SpotifyClient(config);

This logger produces a simple console output for debugging purposes:

GET tracks/NotAnid []
--> BadRequest application/json { "error" : { "status" : 400, "message" : "
+
GET tracks/6YlOxoHWLjH6uVQvxUIUug []
--> OK application/json { "album" : { "album_type" : "album", "arti
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/pagination/index.html b/docs/next/pagination/index.html new file mode 100644 index 00000000..71fe034c --- /dev/null +++ b/docs/next/pagination/index.html @@ -0,0 +1,34 @@ + + + + + + +Pagination | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Pagination

When working with spotify responses, you will often encounter the Paging<T> type.

The offset-based paging object is a container for a set of objects. It contains a key called items (whose value is an array of the requested objects) along with other keys like previous, next and limit that can be useful in future calls.

It allows to receive only a subset of all available data and dynamically check if more requests are required. The library supports Paging<T> responses in two ways:

PaginateAll

PaginateAll will query all remaining elements based on a first page and return all of them in a IList. This method should not be used for a huge amount of pages (e.g Search Endpoint), since it stores every response in memory.

// we need the first page, every syntax can be used for pagination
var page = await spotify.Playlists.CurrentUsers();
var page = spotify.Playlists.CurrentUsers();
var page = () => spotify.Playlists.CurrentUsers();
+
// allPages will include the first page retrived before
var allPages = await spotify.PaginateAll(page);

Paginate

.NET Standard >= 2.1 required

Paginate is based on IAsyncEnumerable and streams pages instead of returning them all in one list. This allows to break the fetching early and keeps only 1 page in memory at a time. This method should always be preferred to PaginateAll

// we need the first page, every syntax can be used for pagination
var page = await spotify.Playlists.CurrentUsers();
var page = spotify.Playlists.CurrentUsers();
var page = () => spotify.Playlists.CurrentUsers();
+
await foreach(var item in spotify.Paginate(page))
{
Console.WriteLine(item.Name);
// you can use "break" here!
}

Some endpoints have nested and/or multiple paginations objects. When requesting the next page, it will not return the actual paging object but rather the root level endpoint object. A good example is the Search endpoint, which contains up to 5 Paging objects. Requesting the next page of the nested Artists paging object will return another Search response, instead of just Artists. You will need to supply a mapper function to the Paginate call, which returns the correct paging object:

var search = await spotify.Search.Item(new SearchRequest(
SearchRequest.Types.All, "Jake"
));
+
await foreach(var item in spotify.Paginate(search.Albums, (s) => s.Albums))
{
Console.WriteLine(item.Name);
// you can use "break" here!
}

Paginators

Via the interface IPaginator, it can be configured how pages are fetched. It can be configured on a global level:

var config = SpotifyClientConfig
.CreateDefault()
.WithPaginator(new YourCustomPaginator());

or on method level:

await foreach(var item in spotify.Paginate(page, new YourCustomPaginator()))
{
Console.WriteLine(item.Name);
// you can use "break" here!
}

By default, SimplePaginator is used. It fetches pages without any delay.

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/proxy/index.html b/docs/next/proxy/index.html new file mode 100644 index 00000000..cf22aee0 --- /dev/null +++ b/docs/next/proxy/index.html @@ -0,0 +1,32 @@ + + + + + + +Proxy | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Proxy

The included HTTPClient has full proxy configuration support:

var httpClient = new NetHttpClient(new ProxyConfig("localhost", 8080)
{
User = "",
Password = "",
SkipSSLCheck = false,
});
var config = SpotifyClientConfig
.CreateDefault()
.WithHTTPClient(httpClient);
+
var spotify = new SpotifyClient(config);

As an example, mitmproxy can be used to inspect the requests and responses:

mitmproxy

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/retry_handling/index.html b/docs/next/retry_handling/index.html new file mode 100644 index 00000000..69357aff --- /dev/null +++ b/docs/next/retry_handling/index.html @@ -0,0 +1,35 @@ + + + + + + +Retry Handling | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Retry Handling

In Error Handling we already found out that requests can fail. We provide a way to automatically retry requests via retry handlers. Note, by default no retries are performed.

var config = SpotifyClientConfig
.CreateDefault()
.WithRetryHandler(new YourCustomRetryHandler())

IRetryHandler only needs one function:

public class YourCustomRetryHandler : IRetryHandler
{
public Task<IResponse> HandleRetry(IRequest request, IResponse response, IRetryHandler.RetryFunc retry)
{
// request is the sent request and response the received response, obviously?
+
// don't retry:
return response;
+
// retry once
var newResponse = retry(request);
return newResponse;
+
// use retry as often as you want, make sure to return a response
}
}

SimpleRetryHandler

A SimpleRetryHandler is included, which contains the following retry logic:

  • Retries the (configurable) status codes: 500, 502, 503 and 429
  • RetryAfter - specifies the delay between retried calls
  • RetryTimes - specifies the maxiumum amount of performed retries per call
  • TooManyRequestsConsumesARetry - Whether a failure of type "Too Many Requests" should use up one of the retry attempts.
var config = SpotifyClientConfig
.CreateDefault()
.WithRetryHandler(new SimpleRetryHandler() { RetryAfter = TimeSpan.FromSeconds(1) });
+
var spotify = new SpotifyClient(config);
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/showcase/index.html b/docs/next/showcase/index.html new file mode 100644 index 00000000..33d675ef --- /dev/null +++ b/docs/next/showcase/index.html @@ -0,0 +1,31 @@ + + + + + + +Showcase | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Showcase

info

Are you using SpotifyAPI-NET and would like to include your project in this list?

Send a PR via the "Edit this page" link at the end of the page!

lidarr by @lidarr

Looks and smells like Sonarr but made for music.

botframework-solutions by @microsoft

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

Spytify by @jwallet

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

audio-band by @dsafa

Display and control songs from the Windows taskbar

rocksmith-custom-song-toolkit by @catara

MASS Manipulation of Rocksmith DLC Library

Spofy by @eltoncezar

A Spotify mini player and notifier for Windows

Toastify by @aleab

Toastify adds global hotkeys and toast notifications to Spotify

Forked from nachmore/toastify

Spotify Oculus by @CaptainMorgs

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

Songify by @Inzaniity

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

Elite G19s Companion app by @MagicMau

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

ARDUINO-Spotify-Remote-Control by @NADER11NDEU

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/token_swap/index.html b/docs/next/token_swap/index.html new file mode 100644 index 00000000..abf8fec5 --- /dev/null +++ b/docs/next/token_swap/index.html @@ -0,0 +1,33 @@ + + + + + + +Token Swap | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Token Swap

Token Swap provides an authenticatiow flow where client-side apps (like cli/desktop/mobile apps) are still able to use long-living tokens and the oppurtunity to refresh them without exposing your application's secret. This however requires a server-side part to work.

It is based on the Authorization Code flow and is also documented by spotify: Token Swap and Refresh .

Flow

The client uses the first part of the Authorization Code flow and redirects the user to spotify's login page. In this part, only the client id is required. Once the user logged in and confirmed the usage of your app, he will be redirect to a http://localhost server which grabs the code from the query parameters.

var request = new LoginRequest("http://localhost", "ClientId", LoginRequest.ResponseType.Code)
{
Scope = new List<string> { Scopes.UserReadEmail }
};
BrowserUtil.Open(uri);

Now, swapping out this code for an access_token would require the app's client secret. We don't have this on the client-side. Instead, we send a request to our server, which takes care of the code swap:

public Task GetCallback(string code)
{
var response = await new OAuthClient().RequestToken(
new TokenSwapTokenRequest("https://your-swap-server.com/swap", code)
);
+
var spotify = new SpotifyClient(response.AccessToken);
// Also important for later: response.RefreshToken
}

The server swapped out the code for an access_token and refresh_token. Once we realize the access_token expired, we can also ask the server to refresh it:

// if response.IsExpired is true
var newResponse = await new OAuthClient().RequestToken(
new TokenSwapTokenRequest("https://your-swap-server.com/refresh", response.RefreshToken)
);
+
var spotify = new SpotifyClient(newResponse.AccessToken);

Server Implementation

The server needs to support two endpoints, /swap and /refresh (endpoints can be named differently of course)

Swap

The client sends a body via application/x-www-form-urlencoded where the received code is included. In cURL:

curl -X POST "https://example.com/v1/swap"\
-H "Content-Type: application/x-www-form-urlencoded"\
--data "code=AQDy8...xMhKNA"

The server needs to respond with content-type application/json and the at least the following body:

{
"access_token" : "NgAagA...Um_SHo",
"expires_in" : "3600",
"refresh_token" : "NgCXRK...MzYjw"
}

Refresh

The client sends a body via application/x-www-form-urlencoded where the received refresh_token is included. In cURL:

curl -X POST "https://example.com/v1/refresh"\
-H "Content-Type: application/x-www-form-urlencoded"\
--data "refresh_token=NgCXRK...MzYjw"

The server needs to respond with content-type application/json and the at least the following body:

{
"access_token" : "NgAagA...Um_SHo",
"expires_in" : "3600"
}

Example

An example server has been implemented in NodeJS with a .NET CLI client, located at Example.TokenSwap

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/next/unit_testing/index.html b/docs/next/unit_testing/index.html new file mode 100644 index 00000000..f233c690 --- /dev/null +++ b/docs/next/unit_testing/index.html @@ -0,0 +1,33 @@ + + + + + + +Unit Testing | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: next

Unit Testing

The modular structure of the library makes it easy to mock the API when unit testing. Consider the following method:

public static async Task<bool> IsAdmin(IUserProfileClient userProfileClient)
{
// get loggedin user
var user = await userProfileClient.Current();
+
// only my user id is an admin
return user.Id == "1122095781";
}

Using Moq, this can be tested without doing any network requests:

[Test]
public async Task IsAdmin_SuccessTest()
{
var userProfileClient = new Mock<IUserProfileClient>();
userProfileClient.Setup(u => u.Current()).Returns(
Task.FromResult(new PrivateUser
{
Id = "1122095781"
})
);
+
Assert.AreEqual(true, await IsAdmin(userProfileClient.Object));
}
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/albums/index.html b/docs/web/albums/index.html new file mode 100644 index 00000000..a2c8ad06 --- /dev/null +++ b/docs/web/albums/index.html @@ -0,0 +1,31 @@ + + + + + + +Albums | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Albums

GetAlbumTracks

Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned.

Parameters

NameDescriptionExample
idThe Spotify ID for the album."5O7V8l4SeXTymVp3IesT9C"
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first track to return. Default: 0 (the first object).0
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Returns a SimpleTrack wrapped inside a Paging-object

Usage

Paging<SimpleTrack> tracks = _spotify.GetAlbumTracks("5O7V8l4SeXTymVp3IesT9C");
tracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)
Console.WriteLine(tracks.Total.ToString()) //Display total album track count

GetAlbum

Get Spotify catalog information for a single album.

Parameters

NameDescriptionExample
idThe Spotify ID for the album.5O7V8l4SeXTymVp3IesT9C
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Returns a FullAlbum

Usage

FullAlbum album = _spotify.GetAlbum("5O7V8l4SeXTymVp3IesT9C");
Console.WriteLine(album.Name + "| Popularity: " + album.Popularity); //Display name and Popularity

GetSeveralAlbums

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

Parameters

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

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

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/artists/index.html b/docs/web/artists/index.html new file mode 100644 index 00000000..5ad845b4 --- /dev/null +++ b/docs/web/artists/index.html @@ -0,0 +1,31 @@ + + + + + + +Artists | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Artists

GetArtist

Get Spotify catalog information for a single artist identified by their unique Spotify ID.

Parameters

NameDescriptionExample
idThe Spotify ID for the artist."1KpCi9BOfviCVhmpI4G2sY"

Returns a FullArtist

Usage

FullArtist artist = _spotify.GetArtist("1KpCi9BOfviCVhmpI4G2sY");
Console.WriteLine()

GetRelatedArtists

Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.

Parameters

NameDescriptionExample
idThe Spotify ID for the artist."1KpCi9BOfviCVhmpI4G2sY"

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

Usage

SeveralArtists artists = _spotify.GetRelatedArtists("1KpCi9BOfviCVhmpI4G2sY");
Console.WriteLine(artists.Artists[0].Name);

GetArtistsTopTracks

Get Spotify catalog information about an artist's top tracks by country.

Parameters

NameDescriptionExample
idThe Spotify ID for the artist."1KpCi9BOfviCVhmpI4G2sY"
countryThe country: an ISO 3166-1 alpha-2 country code."DE"

Returns a SeveralTracks object which contains the property List<FullTrack> Tracks (FullTrack)

Usage

SeveralTracks tracks = _spotify.GetArtistsTopTracks("1KpCi9BOfviCVhmpI4G2sY", "DE");
Console.WriteLine(tracks.Tracks.Count); //How many tracks did we get?

GetArtistsAlbums

Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.

Parameters

NameDescriptionExample
idThe Spotify ID for the artist."1KpCi9BOfviCVhmpI4G2sY"
[type]A list of keywords that will be used to filter the response. If not supplied, all album types will be returnedAlbumType.All
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first album to return. Default: 00
[market]An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market"DE"

Returns a SimpleAlbum wrapped inside a Paging-object

Usage

Paging<SimpleAlbum> albums = _spotify.GetArtistsAlbums("1KpCi9BOfviCVhmpI4G2sY", AlbumType.All);
albums.Items.ForEach(album => Console.WriteLine(album.Name));

GetSeveralArtists

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

Parameters

NameDescriptionExample
idsA list of the Spotify IDs for the artists. Maximum: 50 IDs.new List<String>() { "1KpCi9BOfviCVhmpI4G2sY" }

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

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/browse/index.html b/docs/web/browse/index.html new file mode 100644 index 00000000..92338dc9 --- /dev/null +++ b/docs/web/browse/index.html @@ -0,0 +1,31 @@ + + + + + + +Browse | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Browse

GetFeaturedPlaylists

Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s “Browse” tab).

Parameters

NameDescriptionExample
[locale]The desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore."de_DE" //Germany
[country]A country: an ISO 3166-1 alpha-2 country code."DE"
[timestamp]A timestamp in ISO 8601 formatDateTime.Now
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first item to return. Default: 00

Returns a FeaturedPlaylists object, which has 2 properties. String Message and Paging<SimplePlaylist> Playlists

Usage

FeaturedPlaylists playlists = _spotify.GetFeaturedPlaylists();
Console.WriteLine(playlists.Message);
playlists.Playlists.Items.ForEach(playlist => Console.WriteLine(playlist.Name));

GetNewAlbumReleases

Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).

Parameters

NameDescriptionExample
[country]A country: an ISO 3166-1 alpha-2 country code."DE"
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first item to return. Default: 00

Returns a NewAlbumReleases object, which has the property Paging<SimpleAlbum> Albums.

Usage

NewAlbumReleases newAlbums = _spotify.GetNewAlbumReleases();
newAlbums.Albums.Items.ForEach(album => Console.WriteLine(album.Name));

GetCategories

Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

Parameters

NameDescriptionExample
[country]A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country"DE"
[locale]The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore"de_DE"
[limit]The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first item to return. Default: 0 (the first object).0

Returns a CategoryList object, which has the property Paging<Category> Categories.

Usage

CategoryList categoryList = _spotify.GetCategories();
categoryList.Categories.Items.ForEach(category => Console.WriteLine(category.Name));

GetCategory

Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

Parameters

NameDescriptionExample
categoryIdThe Spotify category ID for the category."party"
[country]A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country."DE"
[locale]The desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore"de_DE"

Returns a Category

Usage

Category cat = _spotify.GetCategory("party");
Console.WriteLine(cat.Name);

GetCategoryPlaylists

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

Parameters

NameDescriptionExample
categoryIdThe Spotify category ID for the category."party"
[country]A country: an ISO 3166-1 alpha-2 country code."DE"
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first item to return. Default: 00

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

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/follow/index.html b/docs/web/follow/index.html new file mode 100644 index 00000000..9276e4e1 --- /dev/null +++ b/docs/web/follow/index.html @@ -0,0 +1,31 @@ + + + + + + +Follow | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Follow

Follow

Add the current user as a follower of one or more artists or other Spotify users.

Parameters

NameDescriptionExample
followTypeThe ID type: either artist or user.FollowType.Artist
ids or idA list of the artist or the user Spotify IDs or just a Spotify IDnew List<String> { "1KpCi9BOfviCVhmpI4G2sY" } or "1KpCi9BOfviCVhmpI4G2sY"

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.Follow(FollowType.Artist, "1KpCi9BOfviCVhmpI4G2sY");
//or if it's a User
ErrorResponse response = _spotify.Follow(FollowType.User, "1122095781");

Unfollow

Remove the current user as a follower of one or more artists or other Spotify users.

Parameters

NameDescriptionExample
followTypeThe ID type: either artist or user.FollowType.Artist
ids or idA list of the artist or the user Spotify IDs or just a Spotify IDnew List<String> { "1KpCi9BOfviCVhmpI4G2sY" } or "1KpCi9BOfviCVhmpI4G2sY"

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.Unfollow(FollowType.Artist, "1KpCi9BOfviCVhmpI4G2sY");
//or if it's a User
ErrorResponse response = _spotify.Unfollow(FollowType.User, "1122095781");

IsFollowing

Check to see if the current user is following one or more artists or other Spotify users.

Parameters

NameDescriptionExample
followTypeThe ID type: either artist or user.FollowType.Artist
ids or idA list of the artist or the user Spotify IDs or just a Spotify IDnew List<String> { "1KpCi9BOfviCVhmpI4G2sY" } or "1KpCi9BOfviCVhmpI4G2sY"

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

Usage

//Are you one of my Followers? :P
ListResponse<Boolean> response = _spotify.IsFollowing(FollowType.User, "1122095781");
Console.WriteLine(response.List[0] ? "Yis!" : "No :(");

FollowPlaylist

Add the current user as a follower of a playlist.

Parameters

NameDescriptionExample
ownerIdThe Spotify user ID of the person who owns the playlist."maxloermans"
playlistIdThe Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID."3SIp2VAsKI03mReF0dFBmI"
[showPublic]If true the playlist will be included in user's public playlists, if false it will remain private.true

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.FollowPlaylist("maxloermans", "3SIp2VAsKI03mReF0dFBmI");
if(!response.HasError())
Console.WriteLine("success");

UnfollowPlaylist

Remove the current user as a follower of a playlist.

Parameters

NameDescriptionExample
ownerIdThe Spotify user ID of the person who owns the playlist."maxloermans"
playlistIdThe Spotify ID of the playlist that is to be no longer followed."3SIp2VAsKI03mReF0dFBmI"

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.UnfollowPlaylist("maxloermans", "3SIp2VAsKI03mReF0dFBmI");
if(!response.HasError())
Console.WriteLine("success");

IsFollowingPlaylist

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

Parameters

NameDescriptionExample
ownerIdThe Spotify user ID of the person who owns the playlist."maxloermans"
playlistIdThe Spotify ID of the playlist."3SIp2VAsKI03mReF0dFBmI"
ids or idA list of the artist or the user Spotify IDs or just a Spotify IDnew List<String> { "1KpCi9BOfviCVhmpI4G2sY" } or "1KpCi9BOfviCVhmpI4G2sY"

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

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/getting_started/index.html b/docs/web/getting_started/index.html new file mode 100644 index 00000000..cca52dcc --- /dev/null +++ b/docs/web/getting_started/index.html @@ -0,0 +1,34 @@ + + + + + + +Getting Started | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Getting Started

This API provides full access to the new SpotifyWebAPI introduced here. +With it, you can search for Tracks/Albums/Artists and also get User-based information. +It's also possible to create new playlists and add tracks to it.

First steps

Imports

So after you added the API to your project, you may want to add following imports to your files:

using SpotifyAPI.Web; //Base Namespace
using SpotifyAPI.Web.Enums; //Enums
using SpotifyAPI.Web.Models; //Models for the JSON-responses

Basic-Usage

Now you can actually start doing calls to the SpotifyAPI, just create a new Instance of SpotifyWebAPI:

private static SpotifyWebAPI _spotify;
+
public static void Main(String[] args)
{
_spotify = new SpotifyWebAPI()
{
AccessToken = "XXXXXXXXXXXX",
TokenType = "Bearer"
}
FullTrack track = _spotify.GetTrack("3Hvu1pq89D4R0lyPBoujSv");
Console.WriteLine(track.Name); //Yeay! We just printed a tracks name.
}

You may note that we used AccessToken and TokenType. Spotify does not allow un-authorized access to their API. You will need to implement one of the auth flows. Luckily, SpotifyAPI.Web.Auth exists for this reason. A simple way to receive a AccessToken is via CredentialAuth:

CredentialsAuth auth = new CredentialsAuth("YourClientID", "YourClientSecret");
Token token = await auth.GetToken();
_spotify = new SpotifyWebAPI()
{
AccessToken = token.AccessToken,
TokenType = token.TokenType
}

For more info, visit the Getting Started of SpotifyAPI.Web.Auth

Error-Handling

Every API-Call returns a reponse-model which consists of base-error model. To check if a specific API-Call was successful, use the following approach:

PrivateProfile profile = _spotify.GetPrivateProfile();
if (profile.HasError())
{
Console.WriteLine("Error Status: " + profile.Error.Status);
Console.WriteLine("Error Msg: " + profile.Error.Message);
}

In case some or all of the returned values are null, consult error status and message, they can lead to an explanation!

Sync vs Asynchronous

Every API-Call has an asynchronous and synchronous method.

public async void Test()
{
var asyncProfile = await _spotify.GetPrivateProfileAsync();
var syncProfile = _spotify.GetPrivateProfile();
}

Note that the synchronous call will block the current Thread!

API-Reference

Albums

Artists

Browse

Follow

Library

Personalization

Player

Playlists

Profiles

Search

Tracks

Util

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/library/index.html b/docs/web/library/index.html new file mode 100644 index 00000000..efd1b095 --- /dev/null +++ b/docs/web/library/index.html @@ -0,0 +1,31 @@ + + + + + + +Library | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Library

SaveTracks

Save one or more tracks to the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idsA list of the Spotify IDsnew List<String> { "3Hvu1pq89D4R0lyPBoujSv" }

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.SaveTracks(new List<string> { "3Hvu1pq89D4R0lyPBoujSv" });
if(!response.HasError())
Console.WriteLine("success");

SaveTrack

Save one track to the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idA Spotify ID"3Hvu1pq89D4R0lyPBoujSv"

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.SaveTrack("3Hvu1pq89D4R0lyPBoujSv");
if(!response.HasError())
Console.WriteLine("success");

GetSavedTracks

Get a list of the songs saved in the current Spotify user’s “Your Music” library.

Parameters

NameDescriptionExample
[limit]The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first object to return. Default: 0 (i.e., the first object)0
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.DE

Returns a Paging<SavedTrack>**, **SavedTrack contains 2 properties, DateTime AddedAt and FullTrack Track

Usage

Paging<SavedTrack> savedTracks = _spotify.GetSavedTracks();
savedTracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));

RemoveSavedTracks

Remove one or more tracks from the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idsA list of the Spotify IDs.new List<String> { "3Hvu1pq89D4R0lyPBoujSv" }

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.RemoveSavedTracks(new List<string> { "3Hvu1pq89D4R0lyPBoujSv" });
if(!response.HasError())
Console.WriteLine("success");

CheckSavedTracks

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

Parameters

NameDescriptionExample
idsA list of the Spotify IDs.new List<String> { "3Hvu1pq89D4R0lyPBoujSv" }

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

Usage

ListResponse<bool> tracksSaved = _spotify.CheckSavedTracks(new List<String> { "3Hvu1pq89D4R0lyPBoujSv" });
if(tracksSaved.List[0])
Console.WriteLine("The track is in your library!");

SaveAlbums

Save one or more albums to the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idsA list of the Spotify IDsnew List<String> { "1cq06d0kTUnFmJHixz1RaF" }

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.SaveAlbums(new List<string> { "1cq06d0kTUnFmJHixz1RaF" });
if(!response.HasError())
Console.WriteLine("success");

SaveAlbum

Save one album to the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idA Spotify ID"1cq06d0kTUnFmJHixz1RaF"

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.SaveAlbum("1cq06d0kTUnFmJHixz1RaF");
if(!response.HasError())
Console.WriteLine("success");

GetSavedAlbums

Get a list of the albums saved in the current Spotify user’s “Your Music” library.

Parameters

NameDescriptionExample
[limit]The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first object to return. Default: 0 (i.e., the first object)0
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.DE

Returns a Paging<SavedAlbum>, SavedAlbum contains 2 properties, DateTime AddedAt and FullAlbum Album

Usage

Paging<SavedAlbum> savedAlbums = _spotify.GetSavedAlbums();
savedAlbums.Items.ForEach(album => Console.WriteLine(album.Album.Name));

RemoveSavedAlbums

Remove one or more albums from the current user’s “Your Music” library.

Parameters

NameDescriptionExample
idsA list of the Spotify IDs.new List<String> { "1cq06d0kTUnFmJHixz1RaF" }

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.RemoveSavedAlbums(new List<string> { "1cq06d0kTUnFmJHixz1RaF" });
if(!response.HasError())
Console.WriteLine("success");

CheckSavedAlbums

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

Parameters

NameDescriptionExample
idsA list of the Spotify IDs.new List<String> { "1cq06d0kTUnFmJHixz1RaF" }

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

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/personalization/index.html b/docs/web/personalization/index.html new file mode 100644 index 00000000..f6312e95 --- /dev/null +++ b/docs/web/personalization/index.html @@ -0,0 +1,31 @@ + + + + + + +Personalization | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Personalization

GetUsersTopTracks

Get the current user’s top tracks based on calculated affinity.

Parameters

NameDescriptionExample
[timeRange]Over what time frame the affinities are compute.TimeRangeType.MediumTerm
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.0

Returns a FullTrack wrapped inside a Paging-object

Usage

Paging<FullTrack> tracks = _spotify.GetUsersTopTracks();
tracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)
Console.WriteLine(tracks.Total.ToString()) //Display total album track count

GetUsersTopArtists

Get the current user’s top artists based on calculated affinity.

Parameters

NameDescriptionExample
[timeRange]Over what time frame the affinities are compute.TimeRangeType.MediumTerm
[limit]The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.0

Returns a FullArtist wrapped inside a Paging-object

Usage

Paging<FullArtist> artists = _spotify.GetUsersTopArtists();
artists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)

GetUsersRecentlyPlayedTracks

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

Parameters

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

Returns a PlayHistory wrapped inside a CursorPaging-object

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/player/index.html b/docs/web/player/index.html new file mode 100644 index 00000000..bcd7c64d --- /dev/null +++ b/docs/web/player/index.html @@ -0,0 +1,33 @@ + + + + + + +Player | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Player

GetDevices

Get information about a user’s available devices.

Parameters

NameDescriptionExample

Usage

AvailabeDevices devices = _spotify.GetDevices();
devices.Devices.ForEach(device => Console.WriteLine(device.Name));

GetPlayback

Get information about the user’s current playback state, including track, track progress, and active device.

Parameters

NameDescriptionExample
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Usage

PlaybackContext context = _spotify.GetPlayback();
if(context.Item != null)
Console.WriteLine(context.Item.Name)); //Print the current song

GetPlayingTrack

Get the object currently being played on the user’s Spotify account.

Parameters

NameDescriptionExample
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

This is a simpler (less data) version of GetPlayback

Usage

PlaybackContext context = _spotify.GetPlayingTrack();
if(context.Item != null)
Console.WriteLine(context.Item.Name)); //Print the current song

TransferPlayback

Transfer playback to a new device and determine if it should start playing.

Parameters

NameDescriptionExample
deviceIds or deviceIdA JSON array containing the ID of the device on which playback should be started/transferred"XXXX-XXXX-XXXX-XXXX"
playtrue: ensure playback happens on new device, false: keep current playback statetrue

Usage

ErrorResponse error = _spotify.TransferPlayback("XXXX-XXXX-XXXX-XXXX");

ResumePlayback

Start a new context or resume current playback on the user’s active device.

Parameters

NameDescriptionExample
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"
contextUriSpotify URI of the context to play"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"
urisAn array of the Spotify track URIs to play.new List<string> { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }
offsetIndicates 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.0

Usage

ErrorResponse error = _spotify.ResumePlayback(uris: new List<string> { "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" });

PausePlayback

Pause playback on the user’s account.

Parameters

NameDescriptionExample
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.PausePlayback();

SkipPlaybackToNext

Skips to next track in the user’s queue.

Parameters

NameDescriptionExample
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SkipPlaybackToNext();

SkipPlaybackToPrevious

Skips to previous track in the user’s queue. +Note that this will ALWAYS skip to the previous track, regardless of the current track’s progress. +Returning to the start of the current track should be performed using the https://api.spotify.com/v1/me/player/seek endpoint.

Parameters

NameDescriptionExample
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SkipPlaybackToPrevious();

SeekPlayback

Seeks to the given position in the user’s currently playing track.

Parameters

NameDescriptionExample
positionMsThe 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.50
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SeekPlayback(50);

SetRepeatMode

Set the repeat mode for the user’s playback. Options are repeat-track, repeat-context, and off.

Parameters

NameDescriptionExample
statetrack, context or off.RepeatState.Track
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SetRepeatMode(RepeatState.Track);

SetVolume

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

Parameters

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

Usage

ErrorResponse error = _spotify.SetVolume(50);

SetShuffle

Toggle shuffle on or off for user’s playback.

Parameters

NameDescriptionExample
shuffleTrue or Falsefalse
[deviceId]The id of the device this command is targeting. If not supplied, the user's currently active device is the target."XXXX-XXXX-XXXX-XXXX"

Usage

ErrorResponse error = _spotify.SetShuffle(false);

AddToQueue

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

Parameters

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

Usage

ErrorResponse error = _spotify.AddToQueue("spotify:track:7zrCVKp6x0AtolOsn2iMif");
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/playlists/index.html b/docs/web/playlists/index.html new file mode 100644 index 00000000..151edffd --- /dev/null +++ b/docs/web/playlists/index.html @@ -0,0 +1,32 @@ + + + + + + +Playlists | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Playlists

GetUserPlaylists

Get a list of the playlists owned or followed by a Spotify user.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
[limit]The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.20
[offset]The index of the first playlist to return. Default: 0 (the first object)0

Returns a SimplePlaylist wrapped inside a Paging Object

Usage

Paging<SimplePlaylist> userPlaylists = _spotify.GetUserPlaylists("1122095781");
userPlaylists.Items.ForEach(playlist => playlist.Owner.DisplayName) //Who is the owner of the playlist?

GetPlaylist

Get a playlist owned by a Spotify user.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
[fields]Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."description,uri"
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Returns a FullTrack

Usage

FullPlaylist playlist = _spotify.GetPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2");
playlist.Tracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));

GetPlaylistTracks

Get full details of the tracks of a playlist owned by a Spotify user.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
[fields]Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."description,uri"
[limit]The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.100
[offset]The index of the first object to return. Default: 0 (i.e., the first object)0
[market]An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.DE

Returns a PlaylistTrack wrapped inside a Paging Object

Usage

Paging<PlaylistTrack> playlist = _spotify.GetPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2");
playlist.Items.ForEach(track => Console.WriteLine(track.Track.Name));

CreatePlaylist

Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistNameThe name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique."This is my new Playlist"
[isPublic]default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.true

Returns a FullPlaylist

Usage

FullPlaylist playlist = _spotify.CreatePlaylist("1122095781", "This is my new Playlist");
if(!playlist.HasError())
Console.WriteLine("Playlist-URI: " + playlist.Uri);

UpdatePlaylist

Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
[newName]The new name for the playlist, for example "My New Playlist Title"."New Playlistname"
[newPublic]If true the playlist will be public, if false it will be private.EXAMPLE

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.UpdatePlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", "New Name", true);
if(!response.HasError())
Console.WriteLine("success");

ReplacePlaylistTracks

Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
urisA list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.new List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" }

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.ReplacePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" });
if(!response.HasError())
Console.WriteLine("success");

RemovePlaylistTracks

Remove one or more tracks from a user’s playlist.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
urisarray of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.(example below)

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

//Remove multiple tracks
ErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List<DeleteTrackUri>()
{
new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"),
new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5")
});
//Remove multiple tracks at their specified positions
ErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List<DeleteTrackUri>()
{
new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 2),
new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5", 0, 50)
});

RemovePlaylistTrack

Remove one or more tracks from a user’s playlist.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
uriSpotify URInew DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

//Remove all tracks with the specified URI
ErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"));
//Remove all tracks with the specified URI and the specified positions
ErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 0, 10, 20));

AddPlaylistTracks

Add one or more tracks to a user’s playlist.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
urisA list of Spotify track URIs to addnew List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" }
[position]The position to insert the tracks, a zero-based index10

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.AddPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" });
if(!response.HasError())
Console.WriteLine("Success");

AddPlaylistTrack

Add one or more tracks to a user’s playlist.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
uriA Spotify Track URI"1ri6UZpjPLmTCswIXZ6Uq1"
positionThe position to insert the tracks, a zero-based index10

Returns a ErrorResponse which just contains a possible error. (response.HasError() and response.Error)

Usage

ErrorResponse response = _spotify.AddPlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", "1ri6UZpjPLmTCswIXZ6Uq1");
if(!response.HasError())
Console.WriteLine("Success");

ReorderPlaylist

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

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID."1122095781"
playlistIdThe Spotify ID for the playlist."1TtEejT1y4D1WmcOnLfha2"
rangeStartThe position of the first track to be reordered.2
insertBeforeThe position where the tracks should be inserted.0
[rangeLength]The amount of tracks to be reordered. Defaults to 1 if not set.2
[snapshotId]The playlist's snapshot ID against which you want to make the changes.``

Returns a Snapshot-Object which contains the property String SnapshotId

Usage

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

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/profiles/index.html b/docs/web/profiles/index.html new file mode 100644 index 00000000..f12f7fc3 --- /dev/null +++ b/docs/web/profiles/index.html @@ -0,0 +1,32 @@ + + + + + + +Profiles | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Profiles

GetPrivateProfile

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

Parameters

NameDescriptionExample

Returns a PrivateProfile

Usage

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

GetPublicProfile

Get public profile information about a Spotify user.

Parameters

NameDescriptionExample
userIdThe user's Spotify user ID.EXAMPLE

Returns a PublicProfile

Usage

+

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/proxy/index.html b/docs/web/proxy/index.html new file mode 100644 index 00000000..b2a6e1b0 --- /dev/null +++ b/docs/web/proxy/index.html @@ -0,0 +1,32 @@ + + + + + + +Proxy Settings | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Proxy Settings

You can forward your proxy settings to the web api by using a field in the SpotifyLocalAPIConfig.

ProxyConfig proxyConfig = new ProxyConfig()
{
Host = "127.0.0.1",
Port = 8080
// Additional values like Username and Password are available
};
+
SpotifyWebAPI api = new SpotifyWebAPI(proxyConfig);
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/search/index.html b/docs/web/search/index.html new file mode 100644 index 00000000..c0841c76 --- /dev/null +++ b/docs/web/search/index.html @@ -0,0 +1,33 @@ + + + + + + +Search | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Search

SearchItems

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

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

Parameters

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

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

Usage

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

SearchItemsEscaped

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

Works like SearchItems, but URL escapes all characters

Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/tracks/index.html b/docs/web/tracks/index.html new file mode 100644 index 00000000..567eec8e --- /dev/null +++ b/docs/web/tracks/index.html @@ -0,0 +1,31 @@ + + + + + + +Tracks | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Tracks

GetSeveralTracks

Get Spotify catalog information for multiple tracks based on their Spotify IDs.

Parameters

NameDescriptionExample
idsA list of the Spotify IDs for the tracks. Maximum: 50 IDs.new List<String> {"6Y1CLPwYe7zvI8PJiWVz6T"}
marketAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Returns a SeveralTracks object which has one property, List<FullTrack> Tracks

Usage

SeveralTracks severalTracks = _spotify.GetSeveralTracks(new List<String> {"6Y1CLPwYe7zvI8PJiWVz6T"});
severalTracks.Tracks.ForEach(track => Console.WriteLine(track.Name));

GetTrack

Get Spotify catalog information for a single track identified by its unique Spotify ID.

Parameters

NameDescriptionExample
idThe Spotify ID for the track."6Y1CLPwYe7zvI8PJiWVz6T"
marketAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."DE"

Returns a FullTrack

Usage

FullTrack track = _spotify.GetTrack("6Y1CLPwYe7zvI8PJiWVz6T");
Console.WriteLine(track.Name);

GetAudioAnalysis

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

Parameters

NameDescriptionExample
idThe Spotify ID for the track."6Y1CLPwYe7zvI8PJiWVz6T"

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

Usage

AudioAnalysis analysis = _spotify.GetAudioAnalysis("6Y1CLPwYe7zvI8PJiWVz6T");
Console.WriteLine(analysis.Meta.DetailedStatus);
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/web/utilities/index.html b/docs/web/utilities/index.html new file mode 100644 index 00000000..20f45c7a --- /dev/null +++ b/docs/web/utilities/index.html @@ -0,0 +1,32 @@ + + + + + + +Utilities | SpotifyAPI-NET + + + + + + + + + + + +
+
Version: 5.1.1

Utilities

Paging-Methods

The SpotifyWebAPI features two paging-helper Methods, GetNextPage(Paging<T> page) and GetPreviousPage(Paging<T> page). +Both are an easy way to receive the next/previous page of a Paging-Object.

Sample:

var playlistTracks = _spotify.GetPlaylistTracks("1122095781", "4EcNf2l8rXInbJOf3tQdgU", "", 50);
while (true)
{
Console.WriteLine(playlistTracks.Items.Count);
if (!playlistTracks.HasNextPage())
break;
playlistTracks = _spotify.GetNextPage(playlistTracks);
}
Last updated on by Jonas Dellinger
Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + + + \ No newline at end of file diff --git a/e02badcb.c8c2b9ad.js b/e02badcb.c8c2b9ad.js new file mode 100644 index 00000000..bc322315 --- /dev/null +++ b/e02badcb.c8c2b9ad.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{144:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return u}));var r=n(2),o=n(6),a=(n(0),n(151)),c={id:"example_token_swap",title:"Token Swap"},i={id:"example_token_swap",title:"Token Swap",source:"@site/docs/example_token_swap.md",permalink:"/docs/next/example_token_swap",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/example_token_swap.md",version:"next",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1591274536,sidebar:"docs",previous:{title:"CLI - Persistent Config",permalink:"/docs/next/example_cli_persistent_config"},next:{title:"UWP",permalink:"/docs/next/example_uwp"}},p=[],l={rightToc:p};function u(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},l,n,{components:t,mdxType:"MDXLayout"}))}u.isMDXComponent=!0},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),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 c(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 i(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 l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),m=r,d=s["".concat(c,".").concat(m)]||s[m]||f[m]||a;return n?o.a.createElement(d,i({ref:t},l,{components:n})):o.a.createElement(d,i({ref:t},l))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l userPlaylists = _spotify.GetUserPlaylists("1122095781");\nuserPlaylists.Items.ForEach(playlist => playlist.Owner.DisplayName) //Who is the owner of the playlist?\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"getplaylist"},"GetPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get a playlist owned by a Spotify user.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[fields]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"description,uri"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(l.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(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),'"DE"')))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#track-object-full"}),"FullTrack")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'FullPlaylist playlist = _spotify.GetPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2");\nplaylist.Tracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"getplaylisttracks"},"GetPlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get full details of the tracks of a playlist owned by a Spotify user.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[fields]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"description,uri"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"100"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first object to return. Default: 0 (i.e., the first object)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"0"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(l.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(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"DE"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified"}),"PlaylistTrack")," wrapped inside a ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#paging-object"}),"Paging Object")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'Paging playlist = _spotify.GetPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2");\nplaylist.Items.ForEach(track => Console.WriteLine(track.Track.Name));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"createplaylist"},"CreatePlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistName"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),'The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.'),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"This is my new Playlist"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[isPublic]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"true"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-full"}),"FullPlaylist")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'FullPlaylist playlist = _spotify.CreatePlaylist("1122095781", "This is my new Playlist");\nif(!playlist.HasError())\n Console.WriteLine("Playlist-URI: " + playlist.Uri);\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"updateplaylist"},"UpdatePlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Change a playlist\u2019s name and public/private state. (The user must, of course, own the playlist.)")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[newName]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),'The new name for the playlist, for example "My New Playlist Title".'),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"New Playlistname"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[newPublic]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"If true the playlist will be public, if false it will be private."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"EXAMPLE")))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.UpdatePlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", "New Name", true);\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"replaceplaylisttracks"},"ReplacePlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uris"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new List { "1ri6UZpjPLmTCswIXZ6Uq1" }'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.ReplacePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List { "1ri6UZpjPLmTCswIXZ6Uq1" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"removeplaylisttracks"},"RemovePlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove one or more tracks from a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uris"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"(example below)"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'//Remove multiple tracks\nErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List()\n{\n new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"),\n new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5")\n});\n//Remove multiple tracks at their specified positions\nErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List()\n{\n new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 2),\n new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5", 0, 50)\n});\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"removeplaylisttrack"},"RemovePlaylistTrack"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove one or more tracks from a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uri"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Spotify URI"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'//Remove all tracks with the specified URI\nErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"));\n//Remove all tracks with the specified URI and the specified positions\nErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 0, 10, 20));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"addplaylisttracks"},"AddPlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Add one or more tracks to a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uris"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of Spotify track URIs to add"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'new List { "1ri6UZpjPLmTCswIXZ6Uq1" }'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[position]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position to insert the tracks, a zero-based index"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"10"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.AddPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List { "1ri6UZpjPLmTCswIXZ6Uq1" });\nif(!response.HasError())\n Console.WriteLine("Success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"addplaylisttrack"},"AddPlaylistTrack"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Add one or more tracks to a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"uri"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A Spotify Track URI"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1ri6UZpjPLmTCswIXZ6Uq1"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"position"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position to insert the tracks, a zero-based index"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"10"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'ErrorResponse response = _spotify.AddPlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", "1ri6UZpjPLmTCswIXZ6Uq1");\nif(!response.HasError())\n Console.WriteLine("Success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"reorderplaylist"},"ReorderPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Reorder a track or a group of tracks in a playlist.\nMore Info: ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/reorder-playlists-tracks/"}),"Reorder-Playlist"))),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"playlistId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the playlist."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"rangeStart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position of the first track to be reordered."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"2"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"insertBefore"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The position where the tracks should be inserted."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"0"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[rangeLength]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The amount of tracks to be reordered. Defaults to 1 if not set."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"2"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[snapshotId]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The playlist's snapshot ID against which you want to make the changes."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"``")))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"Snapshot"),"-Object which contains the property ",Object(l.b)("inlineCode",{parentName:"p"},"String SnapshotId")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'Snapshot snapshot = _spotify.ReorderPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", 2, 0, 2);\nConsole.WriteLine("New SnapshotId: " + snapshot.SnapshotId);\n')),Object(l.b)("hr",null))}s.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return j})),a.d(t,"b",(function(){return m}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(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||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},j=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},O=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,b=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),j=s(a),O=n,m=j["".concat(b,".").concat(O)]||j[O]||o[O]||l;return a?r.a.createElement(m,c({ref:t},p,{components:a})):r.a.createElement(m,c({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,b=new Array(l);b[0]=O;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,b[1]=c;for(var p=2;p tracks = _spotify.GetAlbumTracks("5O7V8l4SeXTymVp3IesT9C");\ntracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)\nConsole.WriteLine(tracks.Total.ToString()) //Display total album track count\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getalbum"},"GetAlbum"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get Spotify catalog information for a single album.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"id"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The Spotify ID for the album."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"5O7V8l4SeXTymVp3IesT9C"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(b.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(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#album-object-full"}),"FullAlbum")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'FullAlbum album = _spotify.GetAlbum("5O7V8l4SeXTymVp3IesT9C");\nConsole.WriteLine(album.Name + "| Popularity: " + album.Popularity); //Display name and Popularity\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"getseveralalbums"},"GetSeveralAlbums"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Get Spotify catalog information for multiple albums identified by their Spotify IDs.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ids"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"A list of the Spotify IDs for the albums. Maximum: 20 IDs."),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'new List() { "5O7V8l4SeXTymVp3IesT9C" }'))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[market]"),Object(b.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(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},'"DE"'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"SeveralAlbums"),' which Property "Albums" contains a list of ',Object(b.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#album-object-full"}),"FullAlbum")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'SeveralAlbums albums = _spotify.GetSeveralAlbums(new List() { "5O7V8l4SeXTymVp3IesT9C" });\nConsole.WriteLine(albums.Albums[0].Name);\n')),Object(b.b)("hr",null))}p.isMDXComponent=!0},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return m})),a.d(t,"b",(function(){return s}));var n=a(0),r=a.n(n);function b(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||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),p=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},m=function(e){var t=p(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},O=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,l=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),m=p(a),O=n,s=m["".concat(l,".").concat(O)]||m[O]||u[O]||b;return a?r.a.createElement(s,c({ref:t},o,{components:a})):r.a.createElement(s,c({ref:t},o))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,l=new Array(b);l[0]=O;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var o=2;o=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):c({},t,{},e)),r},u=function(e){var t=s(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),b=n,m=u["".concat(i,".").concat(b)]||u[b]||d[b]||a;return r?o.a.createElement(m,c({ref:t},p,{components:r})):o.a.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b=a.a.createContext({}),p=function(e){var t=a.a.useContext(b),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},O=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,o=e.parentName,b=i(e,["components","mdxType","originalType","parentName"]),u=p(r),O=n,f=u["".concat(o,".").concat(O)]||u[O]||s[O]||l;return r?a.a.createElement(f,c({ref:t},b,{components:r})):a.a.createElement(f,c({ref:t},b))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,o=new Array(l);o[0]=O;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,o[1]=c;for(var b=2;b + +# \ No newline at end of file diff --git a/img/mitmproxy.png b/img/mitmproxy.png new file mode 100644 index 00000000..7a1d72be Binary files /dev/null and b/img/mitmproxy.png differ diff --git a/img/undraw_Devices_e67q.svg b/img/undraw_Devices_e67q.svg new file mode 100644 index 00000000..6068bd7a --- /dev/null +++ b/img/undraw_Devices_e67q.svg @@ -0,0 +1 @@ +Devices \ No newline at end of file diff --git a/img/undraw_QA_engineers_dg5p.svg b/img/undraw_QA_engineers_dg5p.svg new file mode 100644 index 00000000..e23076e3 --- /dev/null +++ b/img/undraw_QA_engineers_dg5p.svg @@ -0,0 +1 @@ +QA engineers \ No newline at end of file diff --git a/img/undraw_preferences_uuo2.svg b/img/undraw_preferences_uuo2.svg new file mode 100644 index 00000000..b10d2fb5 --- /dev/null +++ b/img/undraw_preferences_uuo2.svg @@ -0,0 +1 @@ +preferences \ No newline at end of file diff --git a/img/undraw_project_completed_w0oq.svg b/img/undraw_project_completed_w0oq.svg new file mode 100644 index 00000000..930e91ed --- /dev/null +++ b/img/undraw_project_completed_w0oq.svg @@ -0,0 +1 @@ +project_completed \ No newline at end of file diff --git a/index.html b/index.html index dba27b51..81b27865 100644 --- a/index.html +++ b/index.html @@ -1,109 +1,29 @@ - - - - - - SpotifyAPI-NET Docs | SpotifyAPI-NET - - - - - - - - -

SpotifyAPI-NET Docs

About

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

Spotify's Web API (link)

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

SpotifyAPI.Web

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

SpotifyAPI.Web.Auth

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


Installing

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

Getting Started

Projects

lidarr by @lidarr

Looks and smells like Sonarr but made for music.

botframework-solutions by @microsoft

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

Spytify by @jwallet

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

audio-band by @dsafa

Display and control songs from the Windows taskbar

rocksmith-custom-song-toolkit by @catara

MASS Manipulation of Rocksmith DLC Library

Spofy by @eltoncezar

A Spotify mini player and notifier for Windows

Toastify by @aleab

Toastify adds global hotkeys and toast notifications to Spotify

Forked from nachmore/toastify

Spotify Oculus by @CaptainMorgs

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

Songify by @Inzaniity

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

Elite G19s Companion app by @MagicMau

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

ARDUINO-Spotify-Remote-Control by @NADER11NDEU

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

- - - + + + + + + +SpotifyAPI-NET | SpotifyAPI-NET + + + + + + + + + +
+

SpotifyAPI-NETStar
Nuget Nuget

🔊 A Client for the Spotify Web API, written in C#/.NET

var spotify = new SpotifyClient("YourAccessToken");
+
var me = await spotify.UserProfile.Current();
Console.WriteLine($"Hello there {me.DisplayName}");
+
await foreach(
var playlist in spotify.Paginate(spotify.Playlists.CurrentUsers())
)
{
Console.WriteLine(playlist.Name);
}

Try it out now

dotnet add package SpotifyAPI.Web --version 6.0.0-beta.1
# Optional Auth module, which includes an embedded HTTP Server for OAuth2
dotnet add package SpotifyAPI.Web.Auth --version 6.0.0-beta.1
[object Object]

Sane Defaults - Easy To Configure

SpotifyAPI-NET allows you to quickly integrate with Spotify's Web API by supplying sane configuration defaults from the start. Later on, behaviour can be customized using extensive configuration possibilities.

[object Object]

All API Calls Integrated

The Spotify Web API consists of over 74 API calls. SpotifyAPI-NET provides fully typed requests/responses for all of them.

[object Object]

.NET Standard 2.X

With the support of .NET Standard 2.X, SpotifyAPI-NET runs on many platforms, including .NET Core, UWP and Xamarin.Forms (Windows, Android, iOS and Mac)

[object Object]

Testable

SpotifyAPI-NET is built on a modular structure, which allows easy testing through mocks and stubs. Learn more by visiting the Testing Guide

Copyright © 2020 Jonas Dellinger. Built with Docusaurus.
+ + + + + + + + + \ No newline at end of file diff --git a/main.5163b4fc.js b/main.5163b4fc.js new file mode 100644 index 00000000..8e3d61aa --- /dev/null +++ b/main.5163b4fc.js @@ -0,0 +1,2 @@ +/*! For license information please see main.5163b4fc.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],[function(e,t,n){"use strict";e.exports=n(53)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return w})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return O}));var r=n(3),o=n(0),a=n.n(o),i=(n(9),n(5)),l=n(31),u=n(4),s=n(2),c=n(32),f=n.n(c),d=(n(47),n(6)),p=n(50),m=n.n(p),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),g=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),b=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return a.a.createElement(g.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.a.createElement(h.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.a.Component);a.a.Component;a.a.Component;var y={},v=0;function w(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,l=void 0!==i&&i,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=y[n]||(y[n]={});if(r[e])return r[e];var o=[],a={regexp:f()(e,o,t),keys:o};return v<1e4&&(r[e]=a,v++),a}(n,{end:a,strict:l,sensitive:s}),o=r.regexp,i=r.keys,u=o.exec(e);if(!u)return null;var c=u[0],d=u.slice(1),p=e===c;return a&&!p?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:p,params:i.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var E=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?w(n.pathname,e.props):t.match,o=Object(s.a)({},t,{location:n,match:r}),i=e.props,l=i.children,c=i.component,f=i.render;return Array.isArray(l)&&0===l.length&&(l=null),a.a.createElement(g.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:c?a.a.createElement(c,o):f?f(o):null:"function"==typeof l?l(o):null)}))},t}(a.a.Component);function x(e){return"/"===e.charAt(0)?e:"/"+e}function k(e,t){if(!e)return t;var n=x(e);return 0!==t.pathname.indexOf(n)?t:Object(s.a)({},t,{pathname:t.pathname.substr(n.length)})}function S(e){return"string"==typeof e?e:Object(i.e)(e)}function T(e){return function(){Object(u.a)(!1)}}function _(){}a.a.Component;var C=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,o=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?w(o.pathname,Object(s.a)({},e.props,{path:i})):t.match}})),r?a.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.a.Component);function O(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=Object(d.a)(t,["wrappedComponentRef"]);return a.a.createElement(g.Consumer,null,(function(t){return t||Object(u.a)(!1),a.a.createElement(e,Object(s.a)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,m()(n,e)}var P=a.a.useContext;function N(){return P(g).location}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;d--){var p=i[d];"."===p?a(i,d):".."===p?(a(i,d),f++):f&&(a(i,d),f--)}if(!s)for(;f--;f)i.unshift("..");!s||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(4);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function h(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(r.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=h(e,t,d(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(23),o=n(40);e.exports=n(13)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=n(79)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(1),o=n(2),a=n(0),i=n.n(a);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?Object(r.e)(t,e):n.length?n[n.length-1].match:r.b.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&l(e.routes,t,n)),o})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?i.a.createElement(r.c,n,e.map((function(e,n){return i.a.createElement(r.a,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(o.a)({},n,{},t,{route:e})):i.a.createElement(e.component,Object(o.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){var r=n(20)("wks"),o=n(22),a=n(7).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t,n){for(var r=n(57),o=n(42),a=n(28),i=n(7),l=n(8),u=n(26),s=n(11),c=s("iterator"),f=s("toStringTag"),d=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=o(p),h=0;h
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var u=n.render(!t),s=u.querySelector(r.barSelector),c=r.speed,f=r.easing;return u.offsetWidth,i((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(s,function(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}(e,c,f)),1===e?(l(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){l(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),u=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&d(o),c!=document.body&&s(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,o,a=arguments;if(2==a.length)for(n in t)void 0!==(o=t[n])&&t.hasOwnProperty(n)&&r(e,n,o);else r(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return w}));var r=n(1);n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f}));var o=n(3),a=n(0),i=n.n(a),l=n(5),u=(n(9),n(2)),s=n(6),c=n(4),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;oe.length)return;if(!(E instanceof u)){if(h&&v!=t.length-1){if(d.lastIndex=w,!(C=d.exec(e)))break;for(var x=C.index+(m?C[1].length:0),k=C.index+C[0].length,S=v,T=w,_=t.length;S<_&&(T=(T+=t[S].length)&&(++v,w=T);if(t[v]instanceof u)continue;O=S-v,E=e.slice(w,T),C.index-=w}else{d.lastIndex=0;var C=d.exec(E),O=1}if(C){m&&(g=C[1]?C[1].length:0),k=(x=C.index+g)+(C=C[0].slice(g)).length;var P=E.slice(0,x),N=E.slice(k),A=[v,O];P&&(++v,w+=P.length,A.push(P));var R=new u(s,p?o.tokenize(C,p):C,b,C,h);if(A.push(R),N&&A.push(N),Array.prototype.splice.apply(t,A),1!=O&&o.matchGrammar(e,t,n,v,w,!0,s),i)break}else if(i)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],a=t.rest;if(a){for(var i in a)t[i]=a[i];delete t.rest}return o.matchGrammar(e,r,t,0,0,!1),r}},(a=o.Token=function(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===o.util.type(e))return e.map((function(n){return a.stringify(n,t,e)})).join("");var r={type:e.type,content:a.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var i="Array"===o.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,i)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+""},o);i.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},i.languages.insertBefore("markup","cdata",o)}}),i.languages.xml=i.languages.extend("markup",{}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,a=0;a]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.c=i.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),i.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete i.languages.c.boolean,i.languages.cpp=i.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),i.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(i),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(i),i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var o=[],a=0;a0&&o[o.length-1].tagName===n(i.content[0].content[1])&&o.pop():"/>"===i.content[i.content.length-1].content||o.push({tagName:n(i.content[0].content[1]),openedBraces:0}):o.length>0&&"punctuation"===i.type&&"{"===i.content?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?o[o.length-1].openedBraces--:l=!0),(l||"string"==typeof i)&&o.length>0&&0===o[o.length-1].openedBraces){var u=n(i);a0&&("string"==typeof t[a-1]||"plain-text"===t[a-1].type)&&(u=n(t[a-1])+u,t.splice(a-1,1),a--),t[a]=new e.Token("plain-text",u,null,u)}i.content&&"string"!=typeof i.content&&r(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(i),function(e){e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],n=0;n",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(i),i.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},i.languages.go=i.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete i.languages.go["class-name"],i.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var u=0;u=a.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=a[o],f=n.tokenStack[c],d="string"==typeof s?s:s.content,p=t(r,c),m=d.indexOf(p);if(m>-1){++o;var h=d.substring(0,m),g=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),b=d.substring(m+p.length),y=[];h&&y.push.apply(y,i([h])),y.push(g),b&&y.push.apply(y,i([b])),"string"==typeof s?l.splice.apply(l,[u,1].concat(y)):s.content=y}}else s.content&&i(s.content)}return l}(n.tokens)}}}})}(i),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}))}(i),i.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},i.languages.less=i.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};])*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),i.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),i.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))/.source;function n(e,n){return e=e.replace(//g,(function(){return t})),n&&(e=e+"|"+e.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/__(?:(?!_)|_(?:(?!_))+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/_(?:(?!_)|__(?:(?!_))+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete i.languages.objectivec["class-name"],i.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|_.,:;]/},i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},i.languages.python["string-interpolation"].inside.interpolation.inside.rest=i.languages.python,i.languages.py=i.languages.python,i.languages.reason=i.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),i.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete i.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(i),i.languages.scss=i.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),i.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),i.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),i.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),i.languages.scss.atrule.inside.rest=i.languages.scss,i.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(i),i.languages.typescript=i.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),i.languages.ts=i.languages.typescript;var l=i.util.clone(i.languages.typescript);i.languages.tsx=i.languages.extend("jsx",l),i.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)";function o(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\s*#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\]},#\s]+?(?=\s*:\s)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/true|false/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(/("|')(?:(?!\2)[^\\\r\n]|\\.)*\2/.source),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(i),t.a=i},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,l,u=i(e),s=1;s0?r:n)(e)}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(23).f,o=n(14),a=n(11)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(10);t.a=r.b},function(e,t,n){"use strict";e.exports=n(82)},,function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(54)},function(e,t,n){"use strict";var r=n(47),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=c(n);f&&(i=i.concat(f(n)));for(var l=u(t),h=u(n),g=0;gN.length&&N.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case i:u=!0}}if(u)return r(o,t,""===n?"."+L(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s