/*! For license information please see c4f5d8e4.0aba352c.js.LICENSE.txt */ (self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[4195],{7386:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var o=r(5710),a=r(7294),n=r(6010),l="tabItem_OmH5";function i(e){var t=e.children,r=e.hidden,o=e.className;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(l,o),hidden:r},t)}var c=r(7462),s=r(2389),d=r(7392),u=r(7094),h=r(2466),f="tabList_uSqn",p="tabItem_LplD";function g(e){var t,r,o,l=e.lazy,i=e.block,s=e.defaultValue,g=e.values,m=e.groupId,b=e.className,v=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&void 0!==e.props.value)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),w=null!=g?g:v.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),y=(0,d.l)(w,(function(e,t){return e.value===t.value}));if(y.length>0)throw new Error('Docusaurus error: Duplicate values "'+y.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===s?s:null!=(t=null!=s?s:null==(r=v.find((function(e){return e.props.default})))?void 0:r.props.value)?t:null==(o=v[0])?void 0:o.props.value;if(null!==k&&!w.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+w.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var E=(0,u.U)(),x=E.tabGroupChoices,A=E.setTabGroupChoices,C=(0,a.useState)(k),z=C[0],_=C[1],N=[],S=(0,h.o5)().blockElementScrollPositionUntilNextRender;if(null!=m){var T=x[m];null!=T&&T!==z&&w.some((function(e){return e.value===T}))&&_(T)}var I=function(e){var t=e.currentTarget,r=N.indexOf(t),o=w[r].value;o!==z&&(S(t),_(o),null!=m&&A(m,o))},F=function(e){var t,r=null;switch(e.key){case"ArrowRight":var o=N.indexOf(e.currentTarget)+1;r=N[o]||N[0];break;case"ArrowLeft":var a=N.indexOf(e.currentTarget)-1;r=N[a]||N[N.length-1]}null==(t=r)||t.focus()};return a.createElement("div",{className:(0,n.Z)("tabs-container",f)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,n.Z)("tabs",{"tabs--block":i},b)},w.map((function(e){var t=e.value,r=e.label,o=e.attributes;return a.createElement("li",(0,c.Z)({role:"tab",tabIndex:z===t?0:-1,"aria-selected":z===t,key:t,ref:function(e){return N.push(e)},onKeyDown:F,onFocus:I,onClick:I},o,{className:(0,n.Z)("tabs__item",p,null==o?void 0:o.className,{"tabs__item--active":z===t})}),null!=r?r:t)}))),l?(0,a.cloneElement)(v.filter((function(e){return e.props.value===z}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},v.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==z})}))))}function m(e){var t=(0,s.Z)();return a.createElement(g,(0,c.Z)({key:String(t)},e))}var b=function(){return a.createElement("div",{style:{padding:"10px"}},a.createElement(m,{defaultValue:"cli",values:[{label:".NET CLI",value:"cli"},{label:"Package Manager",value:"nuget"},{label:"Package Reference",value:"reference"}]},a.createElement(i,{value:"cli"},a.createElement(o.Z,{language:"shell",className:"shell"},"dotnet add package SpotifyAPI.Web\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\ndotnet add package SpotifyAPI.Web.Auth\n")),a.createElement(i,{value:"nuget"},a.createElement(o.Z,{language:"shell",className:"shell"},"Install-Package SpotifyAPI.Web\n# Optional Auth module, which includes an embedded HTTP Server for OAuth2\nInstall-Package SpotifyAPI.Web.Auth\n")),a.createElement(i,{value:"reference"},a.createElement(o.Z,{language:"xml",className:"xml"},'\n\x3c!-- Optional Auth module, which includes an embedded HTTP Server for OAuth2 --\x3e\n\n'))))}},3521:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return v}});var o=r(7462),a=r(9960),n=r(4996),l=r(2263),i=r(5710),c=r(2899),s=r(4184),d=r.n(s),u=r(7294);class h extends u.PureComponent{constructor(e){super(e),this.$=u.createRef(),this._=u.createRef()}render(){return u.createElement("span",{ref:this.$},u.createElement("a",{...this.props,ref:this._},this.props.children))}componentDidMount(){this.paint()}getSnapshotBeforeUpdate(){return this.reset(),null}componentDidUpdate(){this.paint()}componentWillUnmount(){this.reset()}paint(){const e=this.$.current.appendChild(document.createElement("span"));Promise.resolve().then(r.bind(r,9984)).then((({render:t})=>{null!=this._.current&&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 f=h,p=r(7386),g={heroBanner:"heroBanner_UJJx",exampleCode:"exampleCode_wBz9",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i"},m=[{title:u.createElement(u.Fragment,null,"Sane Defaults - Easy To Configure"),imageUrl:"img/undraw_preferences_uuo2.svg",description:function(){return u.createElement(u.Fragment,null,u.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:u.createElement(u.Fragment,null,"All API Calls Integrated"),imageUrl:"img/undraw_project_completed_w0oq.svg",description:function(){return u.createElement(u.Fragment,null,"The Spotify Web API consists of over 74 API calls. ",u.createElement("code",null,"SpotifyAPI-NET")," provides fully typed requests/responses for all of them.")}},{title:u.createElement(u.Fragment,null,".NET Standard 2.X"),imageUrl:"img/undraw_Devices_e67q.svg",description:function(){return u.createElement(u.Fragment,null,"With the support of .NET Standard 2.X, ",u.createElement("code",null,"SpotifyAPI-NET")," runs on many platforms, including .NET Core, UWP and Xamarin.Forms (Windows, Android, iOS and Mac)")}},{title:u.createElement(u.Fragment,null,"Testable"),imageUrl:"img/undraw_QA_engineers_dg5p.svg",description:function(){return u.createElement(u.Fragment,null,u.createElement("code",null,"SpotifyAPI-NET")," is built on a modular structure, which allows easy testing through mocks and stubs. Learn more by visiting the ",u.createElement(a.Z,{to:(0,n.Z)("docs/unit_testing")},"Testing Guide"))}}];function b(e){var t=e.imageUrl,r=e.title,o=e.description,a=(0,n.Z)(t);return u.createElement("div",{className:d()("col col--4",g.feature)},a&&u.createElement("div",{className:"text--center"},u.createElement("img",{className:g.featureImage,src:a,alt:r})),u.createElement("h3",null,r),u.createElement("p",null,o()))}var v=function(){var e=(0,l.Z)().siteConfig,t=void 0===e?{}:e;return u.createElement(c.Z,{title:""+t.title,description:"Documentation for the C# .NET SpotifyAPI-NET Library"},u.createElement("header",{className:d()("hero hero--primary",g.heroBanner)},u.createElement("div",{className:"container"},u.createElement("div",{className:"row"},u.createElement("div",{className:"col col--5"},u.createElement("img",{src:"img/logo.svg",width:"120",height:"120"}),u.createElement("h1",{className:"hero__title"},t.title,u.createElement("span",{style:{marginLeft:"50px"}}),u.createElement(f,{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"),u.createElement("br",null),u.createElement("a",{href:"https://www.nuget.org/packages/SpotifyAPI.Web/",rel:"noopener noreferrer"},u.createElement("img",{alt:"Nuget",src:"https://img.shields.io/nuget/vpre/SpotifyAPI.Web?label=SpotifyAPI.Web&style=flat-square"})," "),u.createElement("a",{href:"https://www.nuget.org/packages/SpotifyAPI.Web.Auth/",rel:"noopener noreferrer"},u.createElement("img",{alt:"Nuget",src:"https://img.shields.io/nuget/vpre/SpotifyAPI.Web.Auth?label=SpotifyAPI.Web.Auth&style=flat-square"}))),u.createElement("p",{className:"hero__subtitle"},t.tagline),u.createElement("div",{className:g.buttons},u.createElement(a.Z,{className:d()("button button--outline button--secondary button--lg",g.getStarted),to:(0,n.Z)("docs/introduction")},"Get Started"))),u.createElement("div",{className:d()("col col--7",g.exampleCode)},u.createElement(i.Z,{language:"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(await spotify.Playlists.CurrentUsers())\n)\n{\n Console.WriteLine(playlist.Name);\n}'))))),u.createElement("main",null,u.createElement("div",{className:"container"},u.createElement("h2",{style:{textAlign:"center",marginTop:"30px"}},"Try it out now"),u.createElement(p.Z,null)),m&&m.length&&u.createElement("section",{className:g.features},u.createElement("div",{className:"container"},u.createElement("div",{className:"row"},m.map((function(e,t){return u.createElement(b,(0,o.Z)({key:t},e))})))))))}},4184:function(e,t){var r;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e=[],t=0;t'}}},download:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},heart:{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},"mark-github":{heights:{16:{width:16,path:''}}},package:{heights:{16:{width:16,path:''}}},play:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}}},k=function(e,t){e=u(e).replace(/^octicon-/,""),d(y,e)||(e="mark-github");var r=t>=24&&24 in y[e].heights?24:16,o=y[e].heights[r];return'"},E={},x=function(e,t){var r=E[e]||(E[e]=[]);if(!(r.push(t)>1)){var o=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete E[e];t=r.shift();)t.apply(null,arguments)}));if(f){var a=new l;g(a,"abort",o),g(a,"error",o),g(a,"load",(function(){var e;try{e=JSON.parse(this.responseText)}catch(t){return void o(t)}o(200!==this.status,e)})),a.open("GET",e),a.send()}else{var n=this||window;n._=function(e){n._=null,o(200!==e.meta.status,e.data)};var i=c(n.document)("script",{async:!0,src:e+(-1!==e.indexOf("?")?"&":"?")+"callback=_"}),s=function(){n._&&n._({meta:{}})};g(i,"load",s),g(i,"error",s),function(e,t,r){if(null!=e.readyState){var o="readystatechange",a=function(){if(t.test(e.readyState))return m(e,o,a),r.apply(this,arguments)};g(e,o,a)}}(i,/de|m/,s),n.document.getElementsByTagName("head")[0].appendChild(i)}}},A=function(e,t,r){var o=c(e.ownerDocument),a=e.appendChild(o("style",{type:"text/css"})),n="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;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;display:inline-flex;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:16px;padding:5px 10px;font-size:12px;line-height:16px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor;overflow:visible}"+w(t["data-color-scheme"]);a.styleSheet?a.styleSheet.cssText=n:a.appendChild(e.ownerDocument.createTextNode(n));var l="large"===u(t["data-size"]),i=o("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:k(t["data-icon"],l?16:14)+" "},[o("span",{},[t["data-text"]||""])]),s=e.appendChild(o("div",{className:"widget"+(l?" widget-lg":"")},[i])),d=i.hostname.replace(/\.$/,"");if(("."+d).substring(d.length-h.length)!=="."+h)return i.removeAttribute("href"),void r(s);var f=(" /"+i.pathname).split(/\/+/);if(((d===h||d==="gist."+h)&&"archive"===f[3]||d===h&&"releases"===f[3]&&("download"===f[4]||"latest"===f[4]&&"download"===f[5])||d==="codeload."+h)&&(i.target="_top"),"true"===u(t["data-show-count"])&&d===h&&"marketplace"!==f[1]&&"sponsors"!==f[1]&&"orgs"!==f[1]&&"users"!==f[1]&&"-"!==f[1]){var p,g;if(!f[2]&&f[1])g="followers",p="?tab=followers";else if(!f[3]&&f[2])g="stargazers_count",p="/stargazers";else if(f[4]||"subscription"!==f[3])if(f[4]||"fork"!==f[3]){if("issues"!==f[3])return void r(s);g="open_issues_count",p="/issues"}else g="forks_count",p="/network/members";else g="subscribers_count",p="/watchers";var m=f[2]?"/repos/"+f[1]+"/"+f[2]:"/users/"+f[1];x.call(this,"https://api.github.com"+m,(function(e,t){if(!e){var a=t[g];s.appendChild(o("a",{className:"social-count",href:t.html_url+p,rel:"noopener",target:"_blank","aria-label":a+" "+g.replace(/_count$/,"").replace("_"," ").slice(0,a<2?-1:void 0)+" on GitHub"},[(""+a).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}r(s)}))}else r(s)},C=window.devicePixelRatio||1,z=function(e){return(C>1?a.ceil(a.round(e*C)/C*2)/2:a.ceil(e))||0},_=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},N=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")};return i(["icon","color-scheme","text","size","show-count"],(function(r){var o="data-"+r;t[o]=e.getAttribute(o)})),null==t["data-text"]&&(t["data-text"]=e.textContent||e.innerText),t}(e)),p){var r=s("span");A(r.attachShadow({mode:"closed"}),e,(function(){t(r)}))}else{var n=s("iframe",{src:"javascript:0",title:e.title||void 0,allowtransparency:!0,scrolling:"no",frameBorder:0});_(n,[0,0]),n.style.border="none";var l=function(){var r,i=n.contentWindow;try{r=i.document.body}catch(c){return void o.body.appendChild(n.parentNode.removeChild(n))}m(n,"load",l),A.call(i,r,e,(function(r){var o=function(e){var t=e.offsetWidth,r=e.offsetHeight;if(e.getBoundingClientRect){var o=e.getBoundingClientRect();t=a.max(t,z(o.width)),r=a.max(r,z(o.height))}return[t,r]}(r);n.parentNode.removeChild(n),function(e,t,r){var o=function(){return m(e,t,o),r.apply(this,arguments)};g(e,t,o)}(n,"load",(function(){_(n,o)})),n.src="https://unpkg.com/github-buttons@2.21.1/dist/buttons.html#"+(n.name=function(e,t,r,o){null==t&&(t="&"),null==r&&(r="="),null==o&&(o=window.encodeURIComponent);var a=[];for(var n in e){var l=e[n];null!=l&&a.push(o(n)+r+o(l))}return a.join(t)}(e)),t(n)}))};g(n,"load",l),o.body.appendChild(n)}}}}]);