Spotify.NET/index.html
2021-06-20 18:52:22 +00:00

30 lines
18 KiB
HTML

<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.72">
<link rel="alternate" type="application/rss+xml" href="/SpotifyAPI-NET/news/rss.xml" title="SpotifyAPI-NET Blog RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/SpotifyAPI-NET/news/atom.xml" title="SpotifyAPI-NET Blog Atom Feed"><title data-react-helmet="true">SpotifyAPI-NET | SpotifyAPI-NET</title><meta data-react-helmet="true" property="og:title" content="SpotifyAPI-NET | SpotifyAPI-NET"><meta data-react-helmet="true" name="description" content="Documentation for the C# .NET SpotifyAPI-NET Library"><meta data-react-helmet="true" property="og:description" content="Documentation for the C# .NET SpotifyAPI-NET Library"><meta data-react-helmet="true" property="og:url" content="https://johnnycrazy.github.io/SpotifyAPI-NET/"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/SpotifyAPI-NET/img/favicon.ico"><link data-react-helmet="true" rel="canonical" href="https://johnnycrazy.github.io/SpotifyAPI-NET/"><link data-react-helmet="true" rel="alternate" href="https://johnnycrazy.github.io/SpotifyAPI-NET/" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://johnnycrazy.github.io/SpotifyAPI-NET/" hreflang="x-default"><script data-react-helmet="true">function maybeInsertBanner(){window.__DOCUSAURUS_INSERT_BASEURL_BANNER&&insertBanner()}function insertBanner(){var n=document.getElementById("docusaurus-base-url-issue-banner-container");if(n){n.innerHTML='\n<div id="docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://v2.docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">/SpotifyAPI-NET/</span> </p>\n <p>We suggest trying baseUrl = <span id="docusaurus-base-url-issue-banner-suggestion-container" style="font-weight: bold; color: green;"></span></p>\n</div>\n';var e=document.getElementById("docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,r="/"===s.substr(-1)?s:s+"/";e.innerHTML=r}}window.__DOCUSAURUS_INSERT_BASEURL_BANNER=!0,document.addEventListener("DOMContentLoaded",maybeInsertBanner)</script><link rel="stylesheet" href="/SpotifyAPI-NET/assets/css/styles.fa980c59.css">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/styles.d00f1e8c.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/runtime~main.30911bfc.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/main.fd7c3fe9.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/1.b9625931.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/2.138e3a59.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/55.6d1cbbe9.js" as="script">
<link rel="preload" href="/SpotifyAPI-NET/assets/js/c4f5d8e4.4eeb0d38.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div id="docusaurus-base-url-issue-banner-container"></div><div><a href="#main" class="skipToContent_1oUP">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle" type="button" tabindex="0"><svg aria-label="Menu" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/SpotifyAPI-NET/"><img src="/SpotifyAPI-NET/img/logo.svg" alt="SpotifyAPI-NET" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/SpotifyAPI-NET/img/logo.svg" alt="SpotifyAPI-NET" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><strong class="navbar__title">SpotifyAPI-NET</strong></a><div class="navbar__item dropdown dropdown--hoverable dropdown--left"><a class="navbar__item navbar__link">Docs</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/SpotifyAPI-NET/docs/introduction">6.X (current)</a></li><li><a class="dropdown__link" href="/SpotifyAPI-NET/docs/5.1.1/home">5.1.1</a></li></ul></div></div><div class="navbar__items navbar__items--right"><a href="https://github.com/JohnnyCrazy/SpotifyAPI-NET" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub</a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_GrZ2"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_71bT">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_71bT">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/SpotifyAPI-NET/"><img src="/SpotifyAPI-NET/img/logo.svg" alt="SpotifyAPI-NET" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/SpotifyAPI-NET/img/logo.svg" alt="SpotifyAPI-NET" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><strong class="navbar__title">SpotifyAPI-NET</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item menu__list-item--collapsed"><a role="button" class="menu__link menu__link--sublist">Docs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/SpotifyAPI-NET/docs/introduction">6.X (current)</a></li><li class="menu__list-item"><a class="menu__link" href="/SpotifyAPI-NET/docs/5.1.1/home">5.1.1</a></li></ul></li><li class="menu__list-item"><a href="https://github.com/JohnnyCrazy/SpotifyAPI-NET" target="_blank" rel="noopener noreferrer" class="menu__link">GitHub</a></li></ul></div></div></div></nav><div class="main-wrapper"><header class="hero hero--primary heroBanner_3P7f"><div class="container"><div class="row"><div class="col col--5"><img src="img/logo.svg" width="120" height="120"><h1 class="hero__title">SpotifyAPI-NET<span style="margin-left:50px"></span><span><a 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</a></span><br><a href="https://www.nuget.org/packages/SpotifyAPI.Web/" rel="noopener noreferrer"><img alt="Nuget" src="https://img.shields.io/nuget/vpre/SpotifyAPI.Web?label=SpotifyAPI.Web&amp;style=flat-square"> </a><a href="https://www.nuget.org/packages/SpotifyAPI.Web.Auth/" rel="noopener noreferrer"><img alt="Nuget" src="https://img.shields.io/nuget/vpre/SpotifyAPI.Web.Auth?label=SpotifyAPI.Web.Auth&amp;style=flat-square"></a></h1><p class="hero__subtitle">🔊 A Client for the Spotify Web API, written in C#/.NET</p><div class="buttons_1r9m"><a class="button button--outline button--secondary button--lg" href="/SpotifyAPI-NET/docs/introduction">Get Started</a></div></div><div class="col col--7 exampleCode_PXaa"><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly csharp"><div tabindex="0" class="prism-code language-csharp codeBlock_23N8 thin-scrollbar"><div class="codeBlockLines_39YC" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var spotify = new SpotifyClient(&quot;YourAccessToken&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var me = await spotify.UserProfile.Current();</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">Console.WriteLine($&quot;Hello there {me.DisplayName}&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">await foreach(</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> var playlist in spotify.Paginate(await spotify.Playlists.CurrentUsers())</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">{</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> Console.WriteLine(playlist.Name);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">}</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o">Copy</button></div></div></div></div></div></header><main><div class="container"><h2 style="text-align:center;margin-top:30px">Try it out now</h2><div style="padding:10px"><div class="tabs-container"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_1uMI tabs__item--active">.NET CLI</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_1uMI">Package Manager</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_1uMI">Package Reference</li></ul><div class="margin-vert--md"><div role="tabpanel"><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly shell"><div tabindex="0" class="prism-code language-shell codeBlock_23N8 thin-scrollbar"><div class="codeBlockLines_39YC" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">dotnet </span><span class="token function" style="color:rgb(130, 170, 255)">add</span><span class="token plain"> package SpotifyAPI.Web</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Optional Auth module, which includes an embedded HTTP Server for OAuth2</span><span class="token plain"></span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">dotnet </span><span class="token function" style="color:rgb(130, 170, 255)">add</span><span class="token plain"> package SpotifyAPI.Web.Auth</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o">Copy</button></div></div></div><div role="tabpanel" hidden=""><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly shell"><div tabindex="0" class="prism-code language-shell codeBlock_23N8 thin-scrollbar"><div class="codeBlockLines_39YC" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">Install-Package SpotifyAPI.Web</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Optional Auth module, which includes an embedded HTTP Server for OAuth2</span><span class="token plain"></span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">Install-Package SpotifyAPI.Web.Auth</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o">Copy</button></div></div></div><div role="tabpanel" hidden=""><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly xml"><div tabindex="0" class="prism-code language-xml codeBlock_23N8 thin-scrollbar"><div class="codeBlockLines_39YC" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token tag punctuation" style="color:rgb(199, 146, 234)">&lt;</span><span class="token tag" style="color:rgb(255, 85, 114)">PackageReference</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag attr-name" style="color:rgb(255, 203, 107)">Include</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(199, 146, 234)">=</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag attr-value" style="color:rgb(255, 85, 114)">SpotifyAPI.Web</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag attr-name" style="color:rgb(255, 203, 107)">Version</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(199, 146, 234)">=</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag attr-value" style="color:rgb(255, 85, 114)">6.0.0</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag punctuation" style="color:rgb(199, 146, 234)">/&gt;</span><span class="token plain"></span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">&lt;!-- Optional Auth module, which includes an embedded HTTP Server for OAuth2 --&gt;</span><span class="token plain"></span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token tag punctuation" style="color:rgb(199, 146, 234)">&lt;</span><span class="token tag" style="color:rgb(255, 85, 114)">PackageReference</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag attr-name" style="color:rgb(255, 203, 107)">Include</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(199, 146, 234)">=</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag attr-value" style="color:rgb(255, 85, 114)">SpotifyAPI.Web.Auth</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag attr-name" style="color:rgb(255, 203, 107)">Version</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(199, 146, 234)">=</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag attr-value" style="color:rgb(255, 85, 114)">6.0.0</span><span class="token tag attr-value punctuation" style="color:rgb(199, 146, 234)">&quot;</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag punctuation" style="color:rgb(199, 146, 234)">/&gt;</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o">Copy</button></div></div></div></div></div></div></div><section class="features_3azU"><div class="container"><div class="row"><div class="col col--4"><div class="text--center"><img class="featureImage_ZtzX" src="/SpotifyAPI-NET/img/undraw_preferences_uuo2.svg" alt="[object Object]"></div><h3>Sane Defaults - Easy To Configure</h3><p><code>SpotifyAPI-NET</code> allows you to quickly integrate with Spotify&#x27;s Web API by supplying sane configuration defaults from the start. Later on, behaviour can be customized using extensive configuration possibilities.</p></div><div class="col col--4"><div class="text--center"><img class="featureImage_ZtzX" src="/SpotifyAPI-NET/img/undraw_project_completed_w0oq.svg" alt="[object Object]"></div><h3>All API Calls Integrated</h3><p>The Spotify Web API consists of over 74 API calls. <code>SpotifyAPI-NET</code> provides fully typed requests/responses for all of them.</p></div><div class="col col--4"><div class="text--center"><img class="featureImage_ZtzX" src="/SpotifyAPI-NET/img/undraw_Devices_e67q.svg" alt="[object Object]"></div><h3>.NET Standard 2.X</h3><p>With the support of .NET Standard 2.X, <code>SpotifyAPI-NET</code> runs on many platforms, including .NET Core, UWP and Xamarin.Forms (Windows, Android, iOS and Mac)</p></div><div class="col col--4"><div class="text--center"><img class="featureImage_ZtzX" src="/SpotifyAPI-NET/img/undraw_QA_engineers_dg5p.svg" alt="[object Object]"></div><h3>Testable</h3><p><code>SpotifyAPI-NET</code> is built on a modular structure, which allows easy testing through mocks and stubs. Learn more by visiting the <a href="/SpotifyAPI-NET/docs/unit_testing">Testing Guide</a></p></div></div></div></section></main></div><footer class="footer footer--dark"><div class="container"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2021 Jonas Dellinger. Built with Docusaurus.</div></div></div></footer></div>
<script src="/SpotifyAPI-NET/assets/js/styles.d00f1e8c.js"></script>
<script src="/SpotifyAPI-NET/assets/js/runtime~main.30911bfc.js"></script>
<script src="/SpotifyAPI-NET/assets/js/main.fd7c3fe9.js"></script>
<script src="/SpotifyAPI-NET/assets/js/1.b9625931.js"></script>
<script src="/SpotifyAPI-NET/assets/js/2.138e3a59.js"></script>
<script src="/SpotifyAPI-NET/assets/js/55.6d1cbbe9.js"></script>
<script src="/SpotifyAPI-NET/assets/js/c4f5d8e4.4eeb0d38.js"></script>
</body>
</html>