mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 14:46:26 +00:00
19 lines
16 KiB
HTML
19 lines
16 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-beta.4">
|
|
<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://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.834af7f3.css">
|
|
<link rel="preload" href="/SpotifyAPI-NET/assets/js/runtime~main.0142c253.js" as="script">
|
|
<link rel="preload" href="/SpotifyAPI-NET/assets/js/main.df3c80a8.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="#" 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 clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><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"><b class="navbar__title">SpotifyAPI-NET</b></a><div class="navbar__item dropdown dropdown--hoverable"><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"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_3J9K"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a><div class="react-toggle toggle_3Zt9 react-toggle--disabled"><div class="react-toggle-track" role="button" tabindex="-1"><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 class="react-toggle-thumb"></div></div><input type="checkbox" class="react-toggle-screenreader-only" aria-label="Switch between dark and light mode"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></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&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&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"><pre tabindex="0" class="prism-code language-csharp codeBlock_23N8 thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#bfc7d5"><span class="token plain">var spotify = new SpotifyClient("YourAccessToken");</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
|
</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">var me = await spotify.UserProfile.Current();</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">Console.WriteLine($"Hello there {me.DisplayName}");</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
|
|
</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">await foreach(</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> var playlist in spotify.Paginate(await spotify.Playlists.CurrentUsers())</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">)</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">{</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> Console.WriteLine(playlist.Name);</span></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">}</span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">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"><pre tabindex="0" class="prism-code language-shell codeBlock_23N8 thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_39YC"><span 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></span><span 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></span><span 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></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div></div><div role="tabpanel" hidden=""><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly shell"><pre tabindex="0" class="prism-code language-shell codeBlock_23N8 thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#bfc7d5"><span class="token plain">Install-Package SpotifyAPI.Web</span></span><span 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></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">Install-Package SpotifyAPI.Web.Auth</span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div></div><div role="tabpanel" hidden=""><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly xml"><pre tabindex="0" class="prism-code language-xml codeBlock_23N8 thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#bfc7d5"><span class="token tag punctuation" style="color:rgb(199, 146, 234)"><</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)">"</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)">"</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)">"</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)">"</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag punctuation" style="color:rgb(199, 146, 234)">/></span><span class="token plain"></span></span><span 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></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token tag punctuation" style="color:rgb(199, 146, 234)"><</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)">"</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)">"</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)">"</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)">"</span><span class="token tag" style="color:rgb(255, 85, 114)"> </span><span class="token tag punctuation" style="color:rgb(199, 146, 234)">/></span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">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'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/runtime~main.0142c253.js"></script>
|
|
<script src="/SpotifyAPI-NET/assets/js/main.df3c80a8.js"></script>
|
|
</body>
|
|
</html> |