Spotify.NET/SpotifyWebApi/playlists/index.html

657 lines
18 KiB
HTML
Raw Normal View History

2015-07-23 20:44:05 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="JohnnyCrazy">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>- Playlists - SpotifyAPI-NET</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome-4.0.3.css" rel="stylesheet">
<link href="../../css/prettify-1.0.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/agate.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Main title -->
<a class="navbar-brand" href="../..">SpotifyAPI-NET</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../..">Home</a>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">SpotifyWebApi <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../gettingstarted/">Getting started</a>
</li>
<li >
<a href="../examples/">Examples</a>
</li>
<li >
<a href="../auth/">Authentication</a>
</li>
<li >
<a href="../search/">- Search</a>
</li>
<li >
<a href="../albums/">- Albums</a>
</li>
<li >
<a href="../artists/">- Artists</a>
</li>
<li >
<a href="../browse/">- Browse</a>
</li>
<li >
<a href="../follow/">- Follow</a>
</li>
<li >
<a href="../library/">- Library</a>
</li>
<li class="active">
<a href="./">- Playlists</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">SpotifyLocalApi <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../SpotifyLocalApi/">SpotifyLocalApi</a>
</li>
</ul>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
<li >
<a rel="next" href="../library/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li >
<a rel="prev" href="../../SpotifyLocalApi/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li>
<a href="https://github.com/JohnnyCrazy/SpotifyAPI-NET">
<i class="fa fa-github"></i>
GitHub
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary" style="height=90%;">
<ul class="nav bs-sidenav">
<li class="main active"><a href="#getuserplaylists">GetUserPlaylists</a></li>
<li class="main "><a href="#getplaylist">GetPlaylist</a></li>
<li class="main "><a href="#getplaylisttracks">GetPlaylistTracks</a></li>
<li class="main "><a href="#createplaylist">CreatePlaylist</a></li>
<li class="main "><a href="#updateplaylist">UpdatePlaylist</a></li>
<li class="main "><a href="#replaceplaylisttracks">ReplacePlaylistTracks</a></li>
<li class="main "><a href="#removeplaylisttracks">RemovePlaylistTracks</a></li>
<li class="main "><a href="#removeplaylisttrack">RemovePlaylistTrack</a></li>
<li class="main "><a href="#addplaylisttracks">AddPlaylistTracks</a></li>
<li class="main "><a href="#addplaylisttrack">AddPlaylistTrack</a></li>
<li class="main "><a href="#reorderplaylist">ReorderPlaylist</a></li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<h2 id="getuserplaylists">GetUserPlaylists</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Get a list of the playlists owned or followed by a Spotify user.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>limit</td>
<td>The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>offset</td>
<td>The index of the first playlist to return. Default: 0 (the first object)</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="getplaylist">GetPlaylist</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Get a playlist owned by a Spotify user.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>fields</td>
<td>Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>market</td>
<td>An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="getplaylisttracks">GetPlaylistTracks</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Get full details of the tracks of a playlist owned by a Spotify user.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>fields</td>
<td>Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>limit</td>
<td>The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>offset</td>
<td>The index of the first object to return. Default: 0 (i.e., the first object)</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>market</td>
<td>An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="createplaylist">CreatePlaylist</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistName</td>
<td>The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>isPublic</td>
<td>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.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="updateplaylist">UpdatePlaylist</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Change a playlists name and public/private state. (The user must, of course, own the playlist.)</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>newName</td>
<td>The new name for the playlist, for example "My New Playlist Title".</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>newPublic</td>
<td>If true the playlist will be public, if false it will be private.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="replaceplaylisttracks">ReplacePlaylistTracks</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>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.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>uris</td>
<td>A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="removeplaylisttracks">RemovePlaylistTracks</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Remove one or more tracks from a users playlist.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>uris</td>
<td>array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="removeplaylisttrack">RemovePlaylistTrack</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Remove one or more tracks from a users playlist.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>uri</td>
<td>Spotify URI</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="addplaylisttracks">AddPlaylistTracks</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Add one or more tracks to a users playlist.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>uris</td>
<td>A list of Spotify track URIs to add</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>position</td>
<td>The position to insert the tracks, a zero-based index</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="addplaylisttrack">AddPlaylistTrack</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Add one or more tracks to a users playlist.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>uri</td>
<td>A Spotify Track URI</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>position</td>
<td>The position to insert the tracks, a zero-based index</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr />
<h2 id="reorderplaylist">ReorderPlaylist</h2>
<p><span class="label label-warning">AUTH REQUIRED</span></p>
<blockquote>
<p>Reorder a track or a group of tracks in a playlist.</p>
</blockquote>
<p><strong>Paramters</strong> </p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>The user's Spotify user ID.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>playlistId</td>
<td>The Spotify ID for the playlist.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>rangeStart</td>
<td>The position of the first track to be reordered.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>insertBefore</td>
<td>The position where the tracks should be inserted.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>rangeLength</td>
<td>The amount of tracks to be reordered. Defaults to 1 if not set.</td>
<td>EXAMPLE</td>
</tr>
<tr>
<td>snapshotId</td>
<td>The playlist's snapshot ID against which you want to make the changes.</td>
<td>EXAMPLE</td>
</tr>
</tbody>
</table>
<p>Returns a <a href="https://developer.spotify.com/web-api/object-model/#user-object-public">Public User Model</a></p>
<p><strong>Usage</strong> </p>
<pre><code class="cs"></code></pre>
<hr /></div>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="../../js/bootstrap-3.0.3.min.js"></script>
<script src="../../js/base.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script src="../../highlight.js"></script>
</body>
</html>