mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
454 lines
98 KiB
JSON
454 lines
98 KiB
JSON
{
|
|
"docs": [
|
|
{
|
|
"location": "/",
|
|
"text": "SpotifyAPI-NET Documentation\n\n\nAbout\n\n\nThis Library, written in C#/.NET, combines two independent SpotifyAPIs into one.\n\n\nSpotify's Web API\n (\nlink\n)\n\n\n\n\nBased 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.\n\n\n\n\nSpotify's \nunofficial\n Local API\n\n\n\n\nDo you ever wanted to control your local Spotify Client with some sort of API? Now you can! This API gives you full control over your spotify client.\nYou can get infos about the currently playing song, get its Album-Art, skip/pause and much more. It also features multiple Event-Interfaces.\n\n\n\n\nBoth combined can be used for any kind of application.\n\n\n\n\nInstalling\n\n\n\n\nVia NuGet Package:\n\n\n\n\nInstall-Package SpotifyAPI-NET\n//or\nInstall-Package SpotifyAPI-NET -pre\n\n\n\n\n\n\nDownload the latest binaries on the \nGitHub Release Page\n and add it to your Project\n\n\nClone the Repo and build the project on your local machine.\n\n\n\n\n\n\nProjects\n\n\nSpofy\n by \n@eltoncezar\n\n\n A Spotify mini player and notifier for Windows",
|
|
"title": "Home"
|
|
},
|
|
{
|
|
"location": "/#spotifyapi-net-documentation",
|
|
"text": "",
|
|
"title": "SpotifyAPI-NET Documentation"
|
|
},
|
|
{
|
|
"location": "/#about",
|
|
"text": "This Library, written in C#/.NET, combines two independent SpotifyAPIs into one. 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.\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. Spotify's unofficial Local API Do you ever wanted to control your local Spotify Client with some sort of API? Now you can! This API gives you full control over your spotify client.\nYou can get infos about the currently playing song, get its Album-Art, skip/pause and much more. It also features multiple Event-Interfaces. Both combined can be used for any kind of application.",
|
|
"title": "About"
|
|
},
|
|
{
|
|
"location": "/#installing",
|
|
"text": "Via NuGet Package: Install-Package SpotifyAPI-NET\n//or\nInstall-Package SpotifyAPI-NET -pre Download the latest binaries on the GitHub Release Page and add it to your Project Clone the Repo and build the project on your local machine.",
|
|
"title": "Installing"
|
|
},
|
|
{
|
|
"location": "/#projects",
|
|
"text": "",
|
|
"title": "Projects"
|
|
},
|
|
{
|
|
"location": "/#spofy-by-eltoncezar",
|
|
"text": "",
|
|
"title": "Spofy by @eltoncezar"
|
|
},
|
|
{
|
|
"location": "/#a-spotify-mini-player-and-notifier-for-windows",
|
|
"text": "",
|
|
"title": "> A Spotify mini player and notifier for Windows"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/",
|
|
"text": "Getting started\n\n\nThis API provides full access to the new SpotifyWebAPI introduced \nhere\n.\n\nWith it, you can search for Tracks/Albums/Artists and also get User-based information.\n\nIt's also possible to create new playlists and add tracks to it.\n\n\n\n\nFirst steps\n\n\nImports\n\nSo after you added the API to your project, you may want to add following imports to your files:\n\n\nusing SpotifyAPI.Web; //Base Namespace\nusing SpotifyAPI.Web.Auth; //All Authentication-related classes\nusing SpotifyAPI.Web.Enums; //Enums\nusing SpotifyAPI.Web.Models; //Models for the JSON-responses\n\n\n\n\nBasic-Usage\n\nNow you can actually start doing calls to the SpotifyAPI, just create a new Instance of SpotifyWebAPI:\n\n\nprivate static SpotifyWebAPI _spotify;\n\npublic static void Main(String[] args)\n{\n _spotify = new SpotifyWebAPI()\n {\n UseAuth = false, //This will disable Authentication.\n }\n FullTrack track = _spotify.GetTrack(\n3Hvu1pq89D4R0lyPBoujSv\n);\n Console.WriteLine(track.Name); //Yeay! We just printed a tracks name.\n //...\n}\n\n\n\n\n\n\nAuthentication\n\n\nIf you look through the available API-Methods, you will soon notice nearly all of them require Authentication.\nFurther infos on how to implement Authentication can be found \nhere\n\n\n\n\nExamples\n\n\nA list of small examples can be found \nhere\n. Do you think a specific example is missing? Feel free to open a PR/Issue!\n\n\n\n\nError-Handling\n\n\nEvery 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:\n\n\nPrivateProfile profile = _spotify.GetPrivateProfile();\nif (profile.HasError())\n{\n Console.WriteLine(\nError Status: \n + profile.Error.Status);\n Console.WriteLine(\nError Msg: \n + profile.Error.Message);\n}\n\n\n\n\nAsynchronous\n\n\nEvery API-Call now has an asynchronous method. Just append \nAsync\n to the Method-Name.\n\nExample:\n\n\npublic async void Test()\n{\n var profile = await _spotify.GetPrivateProfileAsync();\n Console.WriteLine(profile.DisplayName);\n}\n\n\n\n\n\n\nAPI-Reference\n\n\nAlbums\n\n\n\n\nGetAlbumTracks\n\n\nGetAlbum\n\n\nGetSeveralAlbums\n\n\n\n\nArtists\n\n\n\n\nGetArtist\n\n\nGetRelatedArtists\n\n\nGetArtistsTopTracks\n\n\nGetArtistsAlbums\n\n\nGetSeveralArtists\n\n\n\n\nBrowse\n\n\n\n\nGetFeaturedPlaylists\n\n\nGetNewAlbumReleases\n\n\nGetCategories\n\n\nGetCategory\n\n\nGetCategoryPlaylists\n\n\n\n\nFollow\n\n\n\n\nFollow\n\n\nUnfollow\n\n\nIsFollowing\n\n\nFollowPlaylist\n\n\nUnfollowPlaylist\n\n\nIsFollowingPlaylist\n\n\n\n\nLibrary\n\n\n\n\nSaveTracks\n\n\nSaveTrack\n\n\nGetSavedTracks\n\n\nRemoveSavedTracks\n\n\nCheckSavedTracks\n\n\nSaveAlbums\n\n\nSaveAlbum\n\n\nGetSavedAlbums\n\n\nRemoveSavedAlbums\n\n\nCheckSavedAlbums\n\n\n\n\nPlaylists\n\n\n\n\nGetUserPlaylists\n\n\nGetPlaylist\n\n\nGetPlaylistTracks\n\n\nCreatePlaylist\n\n\nUpdatePlaylist\n\n\nReplacePlaylistTracks\n\n\nRemovePlaylistTracks\n\n\nRemovePlaylistTrack\n\n\nAddPlaylistTracks\n\n\nAddPlaylistTrack\n\n\nReorderPlaylist\n\n\n\n\nProfiles\n\n\n\n\nGetPublicProfile\n\n\nGetPrivateProfile\n\n\n\n\nSearch\n\n\n\n\nSearchItems\n\n\n\n\nTracks\n\n\n\n\nGetSeveralTracks\n\n\nGetTrack\n\n\n\n\nUtil\n\n\n\n\nUtility-Functions",
|
|
"title": "Getting started"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#getting-started",
|
|
"text": "This API provides full access to the new SpotifyWebAPI introduced here . \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.",
|
|
"title": "Getting started"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#first-steps",
|
|
"text": "Imports \nSo after you added the API to your project, you may want to add following imports to your files: using SpotifyAPI.Web; //Base Namespace\nusing SpotifyAPI.Web.Auth; //All Authentication-related classes\nusing SpotifyAPI.Web.Enums; //Enums\nusing SpotifyAPI.Web.Models; //Models for the JSON-responses Basic-Usage \nNow you can actually start doing calls to the SpotifyAPI, just create a new Instance of SpotifyWebAPI: private static SpotifyWebAPI _spotify;\n\npublic static void Main(String[] args)\n{\n _spotify = new SpotifyWebAPI()\n {\n UseAuth = false, //This will disable Authentication.\n }\n FullTrack track = _spotify.GetTrack( 3Hvu1pq89D4R0lyPBoujSv );\n Console.WriteLine(track.Name); //Yeay! We just printed a tracks name.\n //...\n}",
|
|
"title": "First steps"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#authentication",
|
|
"text": "If you look through the available API-Methods, you will soon notice nearly all of them require Authentication.\nFurther infos on how to implement Authentication can be found here",
|
|
"title": "Authentication"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#examples",
|
|
"text": "A list of small examples can be found here . Do you think a specific example is missing? Feel free to open a PR/Issue!",
|
|
"title": "Examples"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#error-handling",
|
|
"text": "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();\nif (profile.HasError())\n{\n Console.WriteLine( Error Status: + profile.Error.Status);\n Console.WriteLine( Error Msg: + profile.Error.Message);\n}",
|
|
"title": "Error-Handling"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#asynchronous",
|
|
"text": "Every API-Call now has an asynchronous method. Just append Async to the Method-Name. \nExample: public async void Test()\n{\n var profile = await _spotify.GetPrivateProfileAsync();\n Console.WriteLine(profile.DisplayName);\n}",
|
|
"title": "Asynchronous"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#api-reference",
|
|
"text": "",
|
|
"title": "API-Reference"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#albums",
|
|
"text": "GetAlbumTracks GetAlbum GetSeveralAlbums",
|
|
"title": "Albums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#artists",
|
|
"text": "GetArtist GetRelatedArtists GetArtistsTopTracks GetArtistsAlbums GetSeveralArtists",
|
|
"title": "Artists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#browse",
|
|
"text": "GetFeaturedPlaylists GetNewAlbumReleases GetCategories GetCategory GetCategoryPlaylists",
|
|
"title": "Browse"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#follow",
|
|
"text": "Follow Unfollow IsFollowing FollowPlaylist UnfollowPlaylist IsFollowingPlaylist",
|
|
"title": "Follow"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#library",
|
|
"text": "SaveTracks SaveTrack GetSavedTracks RemoveSavedTracks CheckSavedTracks SaveAlbums SaveAlbum GetSavedAlbums RemoveSavedAlbums CheckSavedAlbums",
|
|
"title": "Library"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#playlists",
|
|
"text": "GetUserPlaylists GetPlaylist GetPlaylistTracks CreatePlaylist UpdatePlaylist ReplacePlaylistTracks RemovePlaylistTracks RemovePlaylistTrack AddPlaylistTracks AddPlaylistTrack ReorderPlaylist",
|
|
"title": "Playlists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#profiles",
|
|
"text": "GetPublicProfile GetPrivateProfile",
|
|
"title": "Profiles"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#search",
|
|
"text": "SearchItems",
|
|
"title": "Search"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#tracks",
|
|
"text": "GetSeveralTracks GetTrack",
|
|
"title": "Tracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/gettingstarted/#util",
|
|
"text": "Utility-Functions",
|
|
"title": "Util"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/examples/",
|
|
"text": "",
|
|
"title": "Examples"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/",
|
|
"text": "Auth-Methods\n\n\nBefore you can use the Web API full functional, you need the user to authenticate your Application.\n\nIf you want to know more, you can read to the whole auth-process \nhere\n.\n\n\nBefore you start, you need to create a Application at Spotify: \nYour Applications\n\n\n\n\nAfter you created your Application, you will have following important values: \n\n\n\n\nClient_Id\n This is your client_id, you don't have to hide it\n\n\nClient_Secret\n Never use this in one of your client-side apps!! Keep it secret!\n\n\nRedirect URIs\n Add \"http://localhost\", if you want full support for this API \n\n\n\n\nNow you can start with the User-authentication, Spotify provides 3 ways:\n\n\n\n\n\n\nImplicitGrantAuth\n (\nRecommended\n, no server-side code needed) \n\n\n\n\n\n\nAutorizationCodeAuth\n (Not Recommended, Server-side code needed, else it's unsecure)\n\n\n\n\n\n\nClientCredentialsAuth\n (Not Recommended, Server-side code needed, else it's unsecure) \n\n\n\n\n\n\nNote:\n I would recommend a little PHP Script, which will exchange the Keys using AutorizationCodeAuth.\nWhen using ImplicitGrantAuth, another user could abuse the \"localhost\" RedirectUri by creating a \"fake\"-app which uses your ClientId.\n\n\nOverview:\n\n\n\nAfter implementing one of the provided auth-methods, you can start doing requests with the token you get from one of the auth-methods\n\n\nImplicitGrantAuth\n\n\nThis way is \nrecommended\n 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\" to your application redirects.\n\n\nMore info: \nhere\n\n\nstatic ImplicitGrantAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new ImplicitGrantAuth()\n {\n //Your client Id\n ClientId = \nXXXXXXXXXXXXXXXX\n,\n //Set this to localhost if you want to use the built-in HTTP Server\n RedirectUri = \nhttp://localhost\n,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //Start the internal http server\n auth.StartHttpServer();\n //When we got our response\n auth.OnResponseReceivedEvent += auth_OnResponseReceivedEvent;\n //Start\n auth.DoAuth();\n}\n\nstatic void auth_OnResponseReceivedEvent(Token token, string state, string error)\n{\n //stop the http server\n auth.StopHttpServer();\n\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken\n };\n //We can now make calls with the token object\n}\n\n\n\n\nAutorizationCodeAuth\n\n\nThis way is \nnot recommended\n and requires server-side code to run securely.\n\nWith this approach, you first get a code which you need to trade against the access-token.\n\nIn this exchange you need to provide your Client-Secret and because of that it's not recommended.\n\n(But you can e.g exchange to codes via a PHP Script)\n\nA good thing about this method: You can always refresh your token, without having the user to auth it again\n\n\nMore info: \nhere\n\n\nstatic AutorizationCodeAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new AutorizationCodeAuth()\n {\n //Your client Id\n ClientId = \nXXXXXXXXXXXXXXX\n,\n //Set this to localhost if you want to use the built-in HTTP Server\n RedirectUri = \nhttp://localhost\n,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //This will be called, if the user cancled/accept the auth-request\n auth.OnResponseReceivedEvent += auth_OnResponseReceivedEvent;\n //a local HTTP Server will be started (Needed for the response)\n auth.StartHttpServer();\n //This will open the spotify auth-page. The user can decline/accept the request\n auth.DoAuth();\n\n Thread.Sleep(60000);\n auth.StopHttpServer();\n Console.WriteLine(\nToo long, didnt respond, exiting now...\n);\n}\n\nprivate static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse response)\n{\n //Stop the HTTP Server, done.\n auth.StopHttpServer();\n\n //NEVER DO THIS! You would need to provide the ClientSecret.\n //You would need to do it e.g via a PHP-Script.\n Token token = auth.ExchangeAuthCode(response.Code, \nXXXXXXXXXXX\n);\n\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken\n };\n\n //With the token object, you can now make API calls\n}\n\n\n\n\nClientCredentialsAuth\n\n\nThis way is \nnot recommended\n and requires server-side code to run securely.\n\nWith 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.\n\nIf you want to use it securely, you would need to do it all server-side.\n\n\nNOTE:\n You will only be able to query non-user-related information e.g search for a Track.\n\n\nMore info: \nhere\n\n\nstatic ClientCredentialsAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new ClientCredentialsAuth()\n {\n //Your client Id\n ClientId = \nXXXXXXXXXXXXXXX\n,\n //Your client secret UNSECURE!!\n ClientSecret = \nXXXXXXXXXXXX\n,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //With this token object, we now can make calls\n Token token = auth.DoAuth();\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken,\n UseAuth = false\n };\n}\n\n\n\n\nScopes",
|
|
"title": "Authentication"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/#auth-methods",
|
|
"text": "Before you can use the Web API full functional, you need the user to authenticate your Application. \nIf you want to know more, you can read to the whole auth-process here . Before you start, you need to create a Application at Spotify: Your Applications After you created your Application, you will have following important values: 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 Add \"http://localhost\", if you want full support for this API Now you can start with the User-authentication, Spotify provides 3 ways: ImplicitGrantAuth ( Recommended , no server-side code needed) AutorizationCodeAuth (Not Recommended, Server-side code needed, else it's unsecure) ClientCredentialsAuth (Not Recommended, Server-side code needed, else it's unsecure) Note: I would recommend a little PHP Script, which will exchange the Keys using AutorizationCodeAuth.\nWhen using ImplicitGrantAuth, another user could abuse the \"localhost\" RedirectUri by creating a \"fake\"-app which uses your ClientId. Overview: After implementing one of the provided auth-methods, you can start doing requests with the token you get from one of the auth-methods",
|
|
"title": "Auth-Methods"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/#implicitgrantauth",
|
|
"text": "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.\nYou won't be able to refresh the token. If you want to use the internal Http server, please add \"http://localhost\" to your application redirects. More info: here static ImplicitGrantAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new ImplicitGrantAuth()\n {\n //Your client Id\n ClientId = XXXXXXXXXXXXXXXX ,\n //Set this to localhost if you want to use the built-in HTTP Server\n RedirectUri = http://localhost ,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //Start the internal http server\n auth.StartHttpServer();\n //When we got our response\n auth.OnResponseReceivedEvent += auth_OnResponseReceivedEvent;\n //Start\n auth.DoAuth();\n}\n\nstatic void auth_OnResponseReceivedEvent(Token token, string state, string error)\n{\n //stop the http server\n auth.StopHttpServer();\n\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken\n };\n //We can now make calls with the token object\n}",
|
|
"title": "ImplicitGrantAuth"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/#autorizationcodeauth",
|
|
"text": "This way is not recommended 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. \n(But you can e.g exchange to codes via a PHP Script) \nA good thing about this method: You can always refresh your token, without having the user to auth it again More info: here static AutorizationCodeAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new AutorizationCodeAuth()\n {\n //Your client Id\n ClientId = XXXXXXXXXXXXXXX ,\n //Set this to localhost if you want to use the built-in HTTP Server\n RedirectUri = http://localhost ,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //This will be called, if the user cancled/accept the auth-request\n auth.OnResponseReceivedEvent += auth_OnResponseReceivedEvent;\n //a local HTTP Server will be started (Needed for the response)\n auth.StartHttpServer();\n //This will open the spotify auth-page. The user can decline/accept the request\n auth.DoAuth();\n\n Thread.Sleep(60000);\n auth.StopHttpServer();\n Console.WriteLine( Too long, didnt respond, exiting now... );\n}\n\nprivate static void auth_OnResponseReceivedEvent(AutorizationCodeAuthResponse response)\n{\n //Stop the HTTP Server, done.\n auth.StopHttpServer();\n\n //NEVER DO THIS! You would need to provide the ClientSecret.\n //You would need to do it e.g via a PHP-Script.\n Token token = auth.ExchangeAuthCode(response.Code, XXXXXXXXXXX );\n\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken\n };\n\n //With the token object, you can now make API calls\n}",
|
|
"title": "AutorizationCodeAuth"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/#clientcredentialsauth",
|
|
"text": "This way is not recommended and requires server-side code to run securely. \nWith 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. NOTE: You will only be able to query non-user-related information e.g search for a Track. More info: here static ClientCredentialsAuth auth;\nstatic void Main(string[] args)\n{\n //Create the auth object\n auth = new ClientCredentialsAuth()\n {\n //Your client Id\n ClientId = XXXXXXXXXXXXXXX ,\n //Your client secret UNSECURE!!\n ClientSecret = XXXXXXXXXXXX ,\n //How many permissions we need?\n Scope = Scope.USER_READ_PRIVATE,\n };\n //With this token object, we now can make calls\n Token token = auth.DoAuth();\n var spotify = new SpotifyWebApiClass()\n {\n TokenType = token.TokenType,\n AccessToken = token.AccessToken,\n UseAuth = false\n };\n}",
|
|
"title": "ClientCredentialsAuth"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/auth/#scopes",
|
|
"text": "",
|
|
"title": "Scopes"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/albums/",
|
|
"text": "GetAlbumTracks\n\n\n\n\nGet Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the album.\n\n\n\"5O7V8l4SeXTymVp3IesT9C\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first track to return. Default: 0 (the first object).\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nSimpleTrack\n wrapped inside a \nPaging-object\n\n\nUsage\n \n\n\nPaging\nSimpleTrack\n tracks = _spotify.GetAlbumTracks(\n5O7V8l4SeXTymVp3IesT9C\n);\ntracks.Items.ForEach(item =\n Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)\nConsole.WriteLine(tracks.Total.ToString()) //Display total album track count\n\n\n\n\n\n\nGetAlbum\n\n\n\n\nGet Spotify catalog information for a single album.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the album.\n\n\n5O7V8l4SeXTymVp3IesT9C\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nFullAlbum\n\n\nUsage\n \n\n\nFullAlbum album = _spotify.GetAlbum(\n5O7V8l4SeXTymVp3IesT9C\n);\nConsole.WriteLine(album.Name + \n| Popularity: \n + album.Popularity); //Display name and Popularity\n\n\n\n\n\n\nGetSeveralAlbums\n\n\n\n\nGet Spotify catalog information for multiple albums identified by their Spotify IDs.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs for the albums. Maximum: 20 IDs.\n\n\nnew List\nString\n() { \"5O7V8l4SeXTymVp3IesT9C\" }\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nSeveralAlbums\n which Property \"Albums\" contains a list of \nFullAlbum\n\n\nUsage\n \n\n\nSeveralAlbums albums = _spotify.GetSeveralAlbums(new List\nString\n() { \n5O7V8l4SeXTymVp3IesT9C\n });\nConsole.WriteLine(albums.Albums[0].Name);",
|
|
"title": "- Albums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/albums/#getalbumtracks",
|
|
"text": "Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned. Paramters Name Description Example id The 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 );\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",
|
|
"title": "GetAlbumTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/albums/#getalbum",
|
|
"text": "Get Spotify catalog information for a single album. Paramters Name Description Example id The 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 );\nConsole.WriteLine(album.Name + | Popularity: + album.Popularity); //Display name and Popularity",
|
|
"title": "GetAlbum"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/albums/#getseveralalbums",
|
|
"text": "Get Spotify catalog information for multiple albums identified by their Spotify IDs. Paramters Name Description Example ids A 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 });\nConsole.WriteLine(albums.Albums[0].Name);",
|
|
"title": "GetSeveralAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/",
|
|
"text": "GetArtist\n\n\n\n\nGet Spotify catalog information for a single artist identified by their unique Spotify ID.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the artist.\n\n\n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nFullArtist\n\n\nUsage\n \n\n\nFullArtist artist = _spotify.GetArtist(\n1KpCi9BOfviCVhmpI4G2sY\n);\nConsole.WriteLine()\n\n\n\n\n\n\nGetRelatedArtists\n\n\n\n\nGet Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the artist.\n\n\n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nSeveralArtists\n object which contains the property \nList\nFullArtist\n Artists\n (\nFullArtist\n)\n\n\nUsage\n \n\n\nSeveralArtists artists = _spotify.GetRelatedArtists(\n1KpCi9BOfviCVhmpI4G2sY\n);\nConsole.WriteLine(artists.Artists[0].Name);\n\n\n\n\n\n\nGetArtistsTopTracks\n\n\n\n\nGet Spotify catalog information about an artist's top tracks by country.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the artist.\n\n\n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\ncountry\n\n\nThe country: an ISO 3166-1 alpha-2 country code.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nSeveralTracks\n object which contains the property \nList\nFullTrack\n Tracks\n (\nFullTrack\n)\n\n\nUsage\n \n\n\nSeveralTracks tracks = _spotify.GetArtistsTopTracks(\n1KpCi9BOfviCVhmpI4G2sY\n, \nDE\n);\nConsole.WriteLine(tracks.Tracks.Count); //How many tracks did we get?\n\n\n\n\n\n\nGetArtistsAlbums\n\n\n\n\nGet Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the artist.\n\n\n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n[type]\n\n\nA list of keywords that will be used to filter the response. If not supplied, all album types will be returned\n\n\nAlbumType.All\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first album to return. Default: 0\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nSimpleAlbum\n wrapped inside a \nPaging-object\n\n\nUsage\n \n\n\nPaging\nSimpleAlbum\n albums = _spotify.GetArtistsAlbums(\n1KpCi9BOfviCVhmpI4G2sY\n, AlbumType.All);\nalbums.Items.ForEach(album =\n Console.WriteLine(album.Name));\n\n\n\n\n\n\nGetSeveralArtists\n\n\n\n\nGet Spotify catalog information for several artists based on their Spotify IDs.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs for the artists. Maximum: 50 IDs.\n\n\nnew List\nString\n() { \"1KpCi9BOfviCVhmpI4G2sY\" }\n\n\n\n\n\n\n\n\nReturns a \nSeveralArtists\n object which contains the property \nList\nFullArtist\n Artists\n (\nFullArtist\n)\n\n\nUsage\n \n\n\nSeveralArtists artists = _spotify.GetSeveralArtists(new List\nString\n() {\n1KpCi9BOfviCVhmpI4G2sY\n});\nartists.Artists.ForEach(artist =\n Console.WriteLine(artist.Name));",
|
|
"title": "- Artists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/#getartist",
|
|
"text": "Get Spotify catalog information for a single artist identified by their unique Spotify ID. Paramters Name Description Example id The Spotify ID for the artist. \"1KpCi9BOfviCVhmpI4G2sY\" Returns a FullArtist Usage FullArtist artist = _spotify.GetArtist( 1KpCi9BOfviCVhmpI4G2sY );\nConsole.WriteLine()",
|
|
"title": "GetArtist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/#getrelatedartists",
|
|
"text": "Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history. Paramters Name Description Example id The Spotify ID for the artist. \"1KpCi9BOfviCVhmpI4G2sY\" Returns a SeveralArtists object which contains the property List FullArtist Artists ( FullArtist ) Usage SeveralArtists artists = _spotify.GetRelatedArtists( 1KpCi9BOfviCVhmpI4G2sY );\nConsole.WriteLine(artists.Artists[0].Name);",
|
|
"title": "GetRelatedArtists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/#getartiststoptracks",
|
|
"text": "Get Spotify catalog information about an artist's top tracks by country. Paramters Name Description Example id The Spotify ID for the artist. \"1KpCi9BOfviCVhmpI4G2sY\" country The 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 );\nConsole.WriteLine(tracks.Tracks.Count); //How many tracks did we get?",
|
|
"title": "GetArtistsTopTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/#getartistsalbums",
|
|
"text": "Get Spotify catalog information about an artist's albums. Optional parameters can be specified in the query string to filter and sort the response. Paramters Name Description Example id The 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 returned AlbumType.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: 0 0 [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);\nalbums.Items.ForEach(album = Console.WriteLine(album.Name));",
|
|
"title": "GetArtistsAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/artists/#getseveralartists",
|
|
"text": "Get Spotify catalog information for several artists based on their Spotify IDs. Paramters Name Description Example ids A 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 });\nartists.Artists.ForEach(artist = Console.WriteLine(artist.Name));",
|
|
"title": "GetSeveralArtists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/",
|
|
"text": "GetFeaturedPlaylists\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of Spotify featured playlists (shown, for example, on a Spotify player\u2019s \u201cBrowse\u201d tab).\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\n[locale]\n\n\nThe desired language, consisting of a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore.\n\n\n\"de_DE\" //Germany\n\n\n\n\n\n\n[country]\n\n\nA country: an ISO 3166-1 alpha-2 country code.\n\n\n\"DE\"\n\n\n\n\n\n\n[timestamp]\n\n\nA timestamp in ISO 8601 format\n\n\nDateTime.Now\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first item to return. Default: 0\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nFeaturedPlaylists\n object, which has 2 properties. \nString Message\n and \nPaging\nSimplePlaylist\n Playlists\n\n\nUsage\n \n\n\nFeaturedPlaylists playlists = _spotify.GetFeaturedPlaylists();\nConsole.WriteLine(playlists.Message);\nplaylists.Playlists.Items.ForEach(playlist =\n Console.WriteLine(playlist.Name));\n\n\n\n\n\n\nGetNewAlbumReleases\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of new album releases featured in Spotify (shown, for example, on a Spotify player\u2019s \u201cBrowse\u201d tab).\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\n[country]\n\n\nA country: an ISO 3166-1 alpha-2 country code.\n\n\n\"DE\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first item to return. Default: 0\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nNewAlbumReleases\n object, which has the property \nPaging\nSimpleAlbum\n Albums\n.\n\n\nUsage\n \n\n\nNewAlbumReleases newAlbums = _spotify.GetNewAlbumReleases();\nnewAlbums.Albums.Items.ForEach(album =\n Console.WriteLine(album.Name));\n\n\n\n\n\n\nGetCategories\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of categories used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab).\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\n[country]\n\n\nA 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\n\n\n\"DE\"\n\n\n\n\n\n\n[locale]\n\n\nThe desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore\n\n\n\"de_DE\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first item to return. Default: 0 (the first object).\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nCategoryList\n object, which has the property \nPaging\nCategory\n Categories\n.\n\n\nUsage\n \n\n\nCategoryList categoryList = _spotify.GetCategories();\ncategoryList.Categories.Items.ForEach(category =\n Console.WriteLine(category.Name));\n\n\n\n\n\n\nGetCategory\n\n\nAUTH REQUIRED\n\n\n\n\nGet a single category used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab).\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\ncategoryId\n\n\nThe Spotify category ID for the category.\n\n\n\"party\"\n\n\n\n\n\n\n[country]\n\n\nA country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.\n\n\n\"DE\"\n\n\n\n\n\n\n[locale]\n\n\nThe desired language, consisting of an ISO 639 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore\n\n\n\"de_DE\"\n\n\n\n\n\n\n\n\nReturns a \nCategory\n\n\nUsage\n \n\n\nCategory cat = _spotify.GetCategory(\nparty\n);\nConsole.WriteLine(cat.Name);\n\n\n\n\n\n\nGetCategoryPlaylists\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of Spotify playlists tagged with a particular category.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\ncategoryId\n\n\nThe Spotify category ID for the category.\n\n\n\"party\"\n\n\n\n\n\n\n[country]\n\n\nA country: an ISO 3166-1 alpha-2 country code.\n\n\n\"DE\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first item to return. Default: 0\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nCategoryPlaylist\n object, which has the property \nPaging\nSimplePlaylist\n Playlists\n\n\nUsage\n \n\n\nCategoryPlaylist playlists = _spotify.GetCategoryPlaylists(\nparty\n);\nplaylists.Playlists.Items.ForEach(playlist =\n Console.WriteLine(playlist.Name));",
|
|
"title": "- Browse"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/#getfeaturedplaylists",
|
|
"text": "AUTH REQUIRED Get a list of Spotify featured playlists (shown, for example, on a Spotify player\u2019s \u201cBrowse\u201d tab). Paramters Name Description Example [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 format DateTime.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: 0 0 Returns a FeaturedPlaylists object, which has 2 properties. String Message and Paging SimplePlaylist Playlists Usage FeaturedPlaylists playlists = _spotify.GetFeaturedPlaylists();\nConsole.WriteLine(playlists.Message);\nplaylists.Playlists.Items.ForEach(playlist = Console.WriteLine(playlist.Name));",
|
|
"title": "GetFeaturedPlaylists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/#getnewalbumreleases",
|
|
"text": "AUTH REQUIRED Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player\u2019s \u201cBrowse\u201d tab). Paramters Name Description Example [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: 0 0 Returns a NewAlbumReleases object, which has the property Paging SimpleAlbum Albums . Usage NewAlbumReleases newAlbums = _spotify.GetNewAlbumReleases();\nnewAlbums.Albums.Items.ForEach(album = Console.WriteLine(album.Name));",
|
|
"title": "GetNewAlbumReleases"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/#getcategories",
|
|
"text": "AUTH REQUIRED Get a list of categories used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab). Paramters Name Description Example [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();\ncategoryList.Categories.Items.ForEach(category = Console.WriteLine(category.Name));",
|
|
"title": "GetCategories"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/#getcategory",
|
|
"text": "AUTH REQUIRED Get a single category used to tag items in Spotify (on, for example, the Spotify player\u2019s \u201cBrowse\u201d tab). Paramters Name Description Example categoryId The 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 );\nConsole.WriteLine(cat.Name);",
|
|
"title": "GetCategory"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/browse/#getcategoryplaylists",
|
|
"text": "AUTH REQUIRED Get a list of Spotify playlists tagged with a particular category. Paramters Name Description Example categoryId The 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: 0 0 Returns a CategoryPlaylist object, which has the property Paging SimplePlaylist Playlists Usage CategoryPlaylist playlists = _spotify.GetCategoryPlaylists( party );\nplaylists.Playlists.Items.ForEach(playlist = Console.WriteLine(playlist.Name));",
|
|
"title": "GetCategoryPlaylists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/",
|
|
"text": "Follow\n\n\nAUTH REQUIRED\n\n\n\n\nAdd the current user as a follower of one or more artists or other Spotify users.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nfollowType\n\n\nThe ID type: either artist or user.\n\n\nFollowType.Artist\n\n\n\n\n\n\nids or id\n\n\nA list of the artist or the user Spotify IDs or just a Spotify ID\n\n\nnew List\nString\n { \"1KpCi9BOfviCVhmpI4G2sY\" }\n or \n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.Follow(FollowType.Artist, \n1KpCi9BOfviCVhmpI4G2sY\n);\n//or if it's a User\nErrorResponse response = _spotify.Follow(FollowType.User, \n1122095781\n);\n\n\n\n\n\n\nUnfollow\n\n\nAUTH REQUIRED\n\n\n\n\nRemove the current user as a follower of one or more artists or other Spotify users.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nfollowType\n\n\nThe ID type: either artist or user.\n\n\nFollowType.Artist\n\n\n\n\n\n\nids or id\n\n\nA list of the artist or the user Spotify IDs or just a Spotify ID\n\n\nnew List\nString\n { \"1KpCi9BOfviCVhmpI4G2sY\" }\n or \n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.Unfollow(FollowType.Artist, \n1KpCi9BOfviCVhmpI4G2sY\n);\n//or if it's a User\nErrorResponse response = _spotify.Unfollow(FollowType.User, \n1122095781\n);\n\n\n\n\n\n\nIsFollowing\n\n\nAUTH REQUIRED\n\n\n\n\nCheck to see if the current user is following one or more artists or other Spotify users.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nfollowType\n\n\nThe ID type: either artist or user.\n\n\nFollowType.Artist\n\n\n\n\n\n\nids or id\n\n\nA list of the artist or the user Spotify IDs or just a Spotify ID\n\n\nnew List\nString\n { \"1KpCi9BOfviCVhmpI4G2sY\" }\n or \n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nListResponse\n which contains the property \nList\nBoolean\n List\n\n\nUsage\n \n\n\n//Are you one of my Followers? :P\nListResponse\nBoolean\n response = _spotify.IsFollowing(FollowType.User, \n1122095781\n);\nConsole.WriteLine(response.List[0] ? \nYis!\n : \nNo :(\n);\n\n\n\n\n\n\nFollowPlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nAdd the current user as a follower of a playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nownerId\n\n\nThe Spotify user ID of the person who owns the playlist.\n\n\n\"maxloermans\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.\n\n\n\"3SIp2VAsKI03mReF0dFBmI\"\n\n\n\n\n\n\n[showPublic]\n\n\nIf true the playlist will be included in user's public playlists, if false it will remain private.\n\n\ntrue\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.FollowPlaylist(\nmaxloermans\n, \n3SIp2VAsKI03mReF0dFBmI\n);\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nUnfollowPlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nRemove the current user as a follower of a playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nownerId\n\n\nThe Spotify user ID of the person who owns the playlist.\n\n\n\"maxloermans\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID of the playlist that is to be no longer followed.\n\n\n\"3SIp2VAsKI03mReF0dFBmI\"\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.UnfollowPlaylist(\nmaxloermans\n, \n3SIp2VAsKI03mReF0dFBmI\n);\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nIsFollowingPlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nCheck to see if one or more Spotify users are following a specified playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nownerId\n\n\nThe Spotify user ID of the person who owns the playlist.\n\n\n\"maxloermans\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID of the playlist.\n\n\n\"3SIp2VAsKI03mReF0dFBmI\"\n\n\n\n\n\n\nids or id\n\n\nA list of the artist or the user Spotify IDs or just a Spotify ID\n\n\nnew List\nString\n { \"1KpCi9BOfviCVhmpI4G2sY\" }\n or \n\"1KpCi9BOfviCVhmpI4G2sY\"\n\n\n\n\n\n\n\n\nReturns a \nListResponse\n which contains the property \nList\nBoolean\n List\n\n\nUsage\n \n\n\n//Am I following the playlist?\nListResponse\nBoolean\n response = _spotify.IsFollowing(\nmaxloermans\n, \n3SIp2VAsKI03mReF0dFBmI\n, \n1122095781\n);\nConsole.WriteLine(response.List[0] ? \nYis!\n : \nNo :(\n);",
|
|
"title": "- Follow"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#follow",
|
|
"text": "AUTH REQUIRED Add the current user as a follower of one or more artists or other Spotify users. Paramters Name Description Example followType The ID type: either artist or user. FollowType.Artist ids or id A list of the artist or the user Spotify IDs or just a Spotify ID new 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 );\n//or if it's a User\nErrorResponse response = _spotify.Follow(FollowType.User, 1122095781 );",
|
|
"title": "Follow"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#unfollow",
|
|
"text": "AUTH REQUIRED Remove the current user as a follower of one or more artists or other Spotify users. Paramters Name Description Example followType The ID type: either artist or user. FollowType.Artist ids or id A list of the artist or the user Spotify IDs or just a Spotify ID new 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 );\n//or if it's a User\nErrorResponse response = _spotify.Unfollow(FollowType.User, 1122095781 );",
|
|
"title": "Unfollow"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#isfollowing",
|
|
"text": "AUTH REQUIRED Check to see if the current user is following one or more artists or other Spotify users. Paramters Name Description Example followType The ID type: either artist or user. FollowType.Artist ids or id A list of the artist or the user Spotify IDs or just a Spotify ID new List String { \"1KpCi9BOfviCVhmpI4G2sY\" } or \"1KpCi9BOfviCVhmpI4G2sY\" Returns a ListResponse which contains the property List Boolean List Usage //Are you one of my Followers? :P\nListResponse Boolean response = _spotify.IsFollowing(FollowType.User, 1122095781 );\nConsole.WriteLine(response.List[0] ? Yis! : No :( );",
|
|
"title": "IsFollowing"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#followplaylist",
|
|
"text": "AUTH REQUIRED Add the current user as a follower of a playlist. Paramters Name Description Example ownerId The Spotify user ID of the person who owns the playlist. \"maxloermans\" playlistId 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. \"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 );\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "FollowPlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#unfollowplaylist",
|
|
"text": "AUTH REQUIRED Remove the current user as a follower of a playlist. Paramters Name Description Example ownerId The Spotify user ID of the person who owns the playlist. \"maxloermans\" playlistId The 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 );\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "UnfollowPlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/follow/#isfollowingplaylist",
|
|
"text": "AUTH REQUIRED Check to see if one or more Spotify users are following a specified playlist. Paramters Name Description Example ownerId The Spotify user ID of the person who owns the playlist. \"maxloermans\" playlistId The Spotify ID of the playlist. \"3SIp2VAsKI03mReF0dFBmI\" ids or id A list of the artist or the user Spotify IDs or just a Spotify ID new List String { \"1KpCi9BOfviCVhmpI4G2sY\" } or \"1KpCi9BOfviCVhmpI4G2sY\" Returns a ListResponse which contains the property List Boolean List Usage //Am I following the playlist?\nListResponse Boolean response = _spotify.IsFollowing( maxloermans , 3SIp2VAsKI03mReF0dFBmI , 1122095781 );\nConsole.WriteLine(response.List[0] ? Yis! : No :( );",
|
|
"title": "IsFollowingPlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/",
|
|
"text": "SaveTracks\n\n\nAUTH REQUIRED\n\n\n\n\nSave one or more tracks to the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs\n\n\nnew List\nString\n { \"3Hvu1pq89D4R0lyPBoujSv\" }\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.SaveTracks(new List\nstring\n { \n3Hvu1pq89D4R0lyPBoujSv\n });\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nSaveTrack\n\n\nAUTH REQUIRED\n\n\n\n\nSave one track to the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nA Spotify ID\n\n\n\"3Hvu1pq89D4R0lyPBoujSv\"\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.SaveTrack(\n3Hvu1pq89D4R0lyPBoujSv\n);\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nGetSavedTracks\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of the songs saved in the current Spotify user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first object to return. Default: 0 (i.e., the first object)\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\nDE\n\n\n\n\n\n\n\n\nReturns a \nPaging\n, \nSavedTrack\n contains 2 properties, \nDateTime AddedAt\n and \nFullTrack Track\n\n\nUsage\n \n\n\nPaging\nSavedTrack\n savedTracks = _spotify.GetSavedTracks();\nsavedTracks.Items.ForEach(track =\n Console.WriteLine(track.Track.Name));\n\n\n\n\n\n\nRemoveSavedTracks\n\n\nAUTH REQUIRED\n\n\n\n\nRemove one or more tracks from the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs.\n\n\nnew List\nString\n { \"3Hvu1pq89D4R0lyPBoujSv\" }\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.RemoveSavedTracks(new List\nstring\n { \n3Hvu1pq89D4R0lyPBoujSv\n });\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nCheckSavedTracks\n\n\nAUTH REQUIRED\n\n\n\n\nCheck if one or more tracks is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs.\n\n\nnew List\nString\n { \"3Hvu1pq89D4R0lyPBoujSv\" }\n\n\n\n\n\n\n\n\nReturns a \nListResponse\n which contains a property, \nList\nbool\n List\n\n\nUsage\n \n\n\nListResponse\nbool\n tracksSaved = _spotify.CheckSavedTracks(new List\nString\n { \n3Hvu1pq89D4R0lyPBoujSv\n });\nif(tracksSaved.List[0])\n Console.WriteLine(\nThe track is in your library!\n);\n\n\n\n\n\n\nSaveAlbums\n\n\nAUTH REQUIRED\n\n\n\n\nSave one or more albums to the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs\n\n\nnew List\nString\n { \"1cq06d0kTUnFmJHixz1RaF\" }\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.SaveAlbums(new List\nstring\n { \n1cq06d0kTUnFmJHixz1RaF\n });\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nSaveAlbum\n\n\nAUTH REQUIRED\n\n\n\n\nSave one album to the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nA Spotify ID\n\n\n\"1cq06d0kTUnFmJHixz1RaF\"\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.SaveAlbum(\n1cq06d0kTUnFmJHixz1RaF\n);\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nGetSavedAlbums\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of the albums saved in the current Spotify user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first object to return. Default: 0 (i.e., the first object)\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\nDE\n\n\n\n\n\n\n\n\nReturns a \nPaging\nSavedAlbum\n, \nSavedAlbum\n contains 2 properties, \nDateTime AddedAt\n and \nFullAlbum Album\n\n\nUsage\n \n\n\nPaging\nSavedAlbum\n savedAlbums = _spotify.GetSavedAlbums();\nsavedAlbums.Items.ForEach(album =\n Console.WriteLine(album.Album.Name));\n\n\n\n\n\n\nRemoveSavedAlbums\n\n\nAUTH REQUIRED\n\n\n\n\nRemove one or more albums from the current user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs.\n\n\nnew List\nString\n { \"1cq06d0kTUnFmJHixz1RaF\" }\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.RemoveSavedAlbums(new List\nstring\n { \n1cq06d0kTUnFmJHixz1RaF\n });\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nCheckSavedAlbums\n\n\nAUTH REQUIRED\n\n\n\n\nCheck if one or more albums is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs.\n\n\nnew List\nString\n { \"1cq06d0kTUnFmJHixz1RaF\" }\n\n\n\n\n\n\n\n\nReturns a \nListResponse\n which contains a property, \nList\nbool\n List\n\n\nUsage\n \n\n\nListResponse\nbool\n albumsSaved = _spotify.CheckSavedAlbums(new List\nString\n { \n1cq06d0kTUnFmJHixz1RaF\n });\nif(albumsSaved.List[0])\n Console.WriteLine(\nThe album is in your library!\n);",
|
|
"title": "- Library"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#savetracks",
|
|
"text": "AUTH REQUIRED Save one or more tracks to the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A 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.SaveTracks(new List string { 3Hvu1pq89D4R0lyPBoujSv });\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "SaveTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#savetrack",
|
|
"text": "AUTH REQUIRED Save one track to the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example id A Spotify ID \"3Hvu1pq89D4R0lyPBoujSv\" Returns a ErrorResponse which just contains a possible error. ( response.HasError() and response.Error ) Usage ErrorResponse response = _spotify.SaveTrack( 3Hvu1pq89D4R0lyPBoujSv );\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "SaveTrack"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#getsavedtracks",
|
|
"text": "AUTH REQUIRED Get a list of the songs saved in the current Spotify user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example [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 contains 2 properties, DateTime AddedAt and FullTrack Track Usage Paging SavedTrack savedTracks = _spotify.GetSavedTracks();\nsavedTracks.Items.ForEach(track = Console.WriteLine(track.Track.Name));",
|
|
"title": "GetSavedTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#removesavedtracks",
|
|
"text": "AUTH REQUIRED Remove one or more tracks from the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A 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 });\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "RemoveSavedTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#checksavedtracks",
|
|
"text": "AUTH REQUIRED Check if one or more tracks is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A list of the Spotify IDs. new List String { \"3Hvu1pq89D4R0lyPBoujSv\" } Returns a ListResponse which contains a property, List bool List Usage ListResponse bool tracksSaved = _spotify.CheckSavedTracks(new List String { 3Hvu1pq89D4R0lyPBoujSv });\nif(tracksSaved.List[0])\n Console.WriteLine( The track is in your library! );",
|
|
"title": "CheckSavedTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#savealbums",
|
|
"text": "AUTH REQUIRED Save one or more albums to the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A 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.SaveAlbums(new List string { 1cq06d0kTUnFmJHixz1RaF });\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "SaveAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#savealbum",
|
|
"text": "AUTH REQUIRED Save one album to the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example id A Spotify ID \"1cq06d0kTUnFmJHixz1RaF\" Returns a ErrorResponse which just contains a possible error. ( response.HasError() and response.Error ) Usage ErrorResponse response = _spotify.SaveAlbum( 1cq06d0kTUnFmJHixz1RaF );\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "SaveAlbum"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#getsavedalbums",
|
|
"text": "AUTH REQUIRED Get a list of the albums saved in the current Spotify user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example [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();\nsavedAlbums.Items.ForEach(album = Console.WriteLine(album.Album.Name));",
|
|
"title": "GetSavedAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#removesavedalbums",
|
|
"text": "AUTH REQUIRED Remove one or more albums from the current user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A 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 });\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "RemoveSavedAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/library/#checksavedalbums",
|
|
"text": "AUTH REQUIRED Check if one or more albums is already saved in the current Spotify user\u2019s \u201cYour Music\u201d library. Paramters Name Description Example ids A list of the Spotify IDs. new List String { \"1cq06d0kTUnFmJHixz1RaF\" } Returns a ListResponse which contains a property, List bool List Usage ListResponse bool albumsSaved = _spotify.CheckSavedAlbums(new List String { 1cq06d0kTUnFmJHixz1RaF });\nif(albumsSaved.List[0])\n Console.WriteLine( The album is in your library! );",
|
|
"title": "CheckSavedAlbums"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/",
|
|
"text": "GetUserPlaylists\n\n\nAUTH REQUIRED\n\n\n\n\nGet a list of the playlists owned or followed by a Spotify user.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first playlist to return. Default: 0 (the first object)\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nSimplePlaylist\n wrapped inside a \nPaging Object\n\n\nUsage\n \n\n\nPaging\nSimplePlaylist\n userPlaylists = _spotify.GetUserPlaylists(\n1122095781\n);\nuserPlaylists.Items.ForEach(playlist =\n playlist.Owner.DisplayName) //Who is the owner of the playlist?\n\n\n\n\n\n\nGetPlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nGet a playlist owned by a Spotify user.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\n[fields]\n\n\nFilters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.\n\n\n\"description,uri\"\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nFullTrack\n\n\nUsage\n \n\n\nFullPlaylist playlist = _spotify.GetPlaylist(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n);\nplaylist.Tracks.Items.ForEach(track =\n Console.WriteLine(track.Track.Name));\n\n\n\n\n\n\nGetPlaylistTracks\n\n\nAUTH REQUIRED\n\n\n\n\nGet full details of the tracks of a playlist owned by a Spotify user.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\n[fields]\n\n\nFilters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.\n\n\n\"description,uri\"\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.\n\n\n100\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first object to return. Default: 0 (i.e., the first object)\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\nDE\n\n\n\n\n\n\n\n\nReturns a \nPlaylistTrack\n wrapped inside a \nPaging Object\n\n\nUsage\n \n\n\nPaging\nPlaylistTrack\n playlist = _spotify.GetPlaylistTracks(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n);\nplaylist.Items.ForEach(track =\n Console.WriteLine(track.Track.Name));\n\n\n\n\n\n\nCreatePlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nCreate a playlist for a Spotify user. (The playlist will be empty until you add tracks.)\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistName\n\n\nThe name for the new playlist, for example \"Your Coolest Playlist\". This name does not need to be unique.\n\n\n\"This is my new Playlist\"\n\n\n\n\n\n\n[isPublic]\n\n\ndefault 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.\n\n\ntrue\n\n\n\n\n\n\n\n\nReturns a \nFullPlaylist\n\n\nUsage\n \n\n\nFullPlaylist playlist = _spotify.CreatePlaylist(\n1122095781\n, \nThis is my new Playlist\n);\nif(!playlist.HasError())\n Console.WriteLine(\nPlaylist-URI: \n + playlist.Uri);\n\n\n\n\n\n\nUpdatePlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nChange a playlist\u2019s name and public/private state. (The user must, of course, own the playlist.)\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\n[newName]\n\n\nThe new name for the playlist, for example \"My New Playlist Title\".\n\n\n\"New Playlistname\"\n\n\n\n\n\n\n[newPublic]\n\n\nIf true the playlist will be public, if false it will be private.\n\n\nEXAMPLE\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.UpdatePlaylist(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, \nNew Name\n, true);\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nReplacePlaylistTracks\n\n\nAUTH REQUIRED\n\n\n\n\nReplace 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.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nuris\n\n\nA list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.\n\n\nnew List\nstring\n { \"1ri6UZpjPLmTCswIXZ6Uq1\" }\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.ReplacePlaylistTracks(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new List\nstring\n { \n1ri6UZpjPLmTCswIXZ6Uq1\n });\nif(!response.HasError())\n Console.WriteLine(\nsuccess\n);\n\n\n\n\n\n\nRemovePlaylistTracks\n\n\nAUTH REQUIRED\n\n\n\n\nRemove one or more tracks from a user\u2019s playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nuris\n\n\narray of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.\n\n\n(example below)\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\n//Remove multiple tracks\nErrorResponse playlist = _spotify.RemovePlaylistTracks(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new List\nDeleteTrackUri\n()\n{\n new DeleteTrackUri(\n1ri6UZpjPLmTCswIXZ6Uq1\n),\n new DeleteTrackUri(\n47xtGU3vht7mXLHqnbaau5\n)\n});\n//Remove multiple tracks at their specified positions\nErrorResponse playlist = _spotify.RemovePlaylistTracks(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new List\nDeleteTrackUri\n()\n{\n new DeleteTrackUri(\n1ri6UZpjPLmTCswIXZ6Uq1\n, 2),\n new DeleteTrackUri(\n47xtGU3vht7mXLHqnbaau5\n, 0, 50)\n});\n\n\n\n\n\n\nRemovePlaylistTrack\n\n\nAUTH REQUIRED\n\n\n\n\nRemove one or more tracks from a user\u2019s playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nuri\n\n\nSpotify URI\n\n\nnew DeleteTrackUri(\"1ri6UZpjPLmTCswIXZ6Uq1\")\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\n//Remove all tracks with the specified URI\nErrorResponse response = _spotify.RemovePlaylistTrack(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new DeleteTrackUri(\n1ri6UZpjPLmTCswIXZ6Uq1\n));\n//Remove all tracks with the specified URI and the specified positions\nErrorResponse response = _spotify.RemovePlaylistTrack(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new DeleteTrackUri(\n1ri6UZpjPLmTCswIXZ6Uq1\n, 0, 10, 20));\n\n\n\n\n\n\nAddPlaylistTracks\n\n\nAUTH REQUIRED\n\n\n\n\nAdd one or more tracks to a user\u2019s playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nuris\n\n\nA list of Spotify track URIs to add\n\n\nnew List\nstring\n { \"1ri6UZpjPLmTCswIXZ6Uq1\" }\n\n\n\n\n\n\n[position]\n\n\nThe position to insert the tracks, a zero-based index\n\n\n10\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.AddPlaylistTracks(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, new List\nstring\n { \n1ri6UZpjPLmTCswIXZ6Uq1\n });\nif(!response.HasError())\n Console.WriteLine(\nSuccess\n);\n\n\n\n\n\n\nAddPlaylistTrack\n\n\nAUTH REQUIRED\n\n\n\n\nAdd one or more tracks to a user\u2019s playlist.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nuri\n\n\nA Spotify Track URI\n\n\n\"1ri6UZpjPLmTCswIXZ6Uq1\"\n\n\n\n\n\n\nposition\n\n\nThe position to insert the tracks, a zero-based index\n\n\n10\n\n\n\n\n\n\n\n\nReturns a \nErrorResponse\n which just contains a possible error. (\nresponse.HasError()\n and \nresponse.Error\n)\n\n\nUsage\n \n\n\nErrorResponse response = _spotify.AddPlaylistTrack(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, \n1ri6UZpjPLmTCswIXZ6Uq1\n);\nif(!response.HasError())\n Console.WriteLine(\nSuccess\n);\n\n\n\n\n\n\nReorderPlaylist\n\n\nAUTH REQUIRED\n\n\n\n\nReorder a track or a group of tracks in a playlist.\nMore Info: \nReorder-Playlist\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\n\"1122095781\"\n\n\n\n\n\n\nplaylistId\n\n\nThe Spotify ID for the playlist.\n\n\n\"1TtEejT1y4D1WmcOnLfha2\"\n\n\n\n\n\n\nrangeStart\n\n\nThe position of the first track to be reordered.\n\n\n2\n\n\n\n\n\n\ninsertBefore\n\n\nThe position where the tracks should be inserted.\n\n\n0\n\n\n\n\n\n\n[rangeLength]\n\n\nThe amount of tracks to be reordered. Defaults to 1 if not set.\n\n\n2\n\n\n\n\n\n\n[snapshotId]\n\n\nThe playlist's snapshot ID against which you want to make the changes.\n\n\n``\n\n\n\n\n\n\n\n\nReturns a \nSnapshot\n-Object which contains the property \nString SnapshotId\n\n\nUsage\n \n\n\nSnapshot snapshot = _spotify.ReorderPlaylist(\n1122095781\n, \n1TtEejT1y4D1WmcOnLfha2\n, 2, 0, 2);\nConsole.WriteLine(\nNew SnapshotId: \n + snapshot.SnapshotId);",
|
|
"title": "- Playlists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#getuserplaylists",
|
|
"text": "AUTH REQUIRED Get a list of the playlists owned or followed by a Spotify user. Paramters Name Description Example userId The 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 );\nuserPlaylists.Items.ForEach(playlist = playlist.Owner.DisplayName) //Who is the owner of the playlist?",
|
|
"title": "GetUserPlaylists"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#getplaylist",
|
|
"text": "AUTH REQUIRED Get a playlist owned by a Spotify user. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The 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 );\nplaylist.Tracks.Items.ForEach(track = Console.WriteLine(track.Track.Name));",
|
|
"title": "GetPlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#getplaylisttracks",
|
|
"text": "AUTH REQUIRED Get full details of the tracks of a playlist owned by a Spotify user. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The 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 );\nplaylist.Items.ForEach(track = Console.WriteLine(track.Track.Name));",
|
|
"title": "GetPlaylistTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#createplaylist",
|
|
"text": "AUTH REQUIRED Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.) Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistName The 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 );\nif(!playlist.HasError())\n Console.WriteLine( Playlist-URI: + playlist.Uri);",
|
|
"title": "CreatePlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#updateplaylist",
|
|
"text": "AUTH REQUIRED Change a playlist\u2019s name and public/private state. (The user must, of course, own the playlist.) Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The 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);\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "UpdatePlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#replaceplaylisttracks",
|
|
"text": "AUTH REQUIRED 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. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" uris A 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 });\nif(!response.HasError())\n Console.WriteLine( success );",
|
|
"title": "ReplacePlaylistTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#removeplaylisttracks",
|
|
"text": "AUTH REQUIRED Remove one or more tracks from a user\u2019s playlist. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" uris array 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\nErrorResponse playlist = _spotify.RemovePlaylistTracks( 1122095781 , 1TtEejT1y4D1WmcOnLfha2 , new List DeleteTrackUri ()\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 DeleteTrackUri ()\n{\n new DeleteTrackUri( 1ri6UZpjPLmTCswIXZ6Uq1 , 2),\n new DeleteTrackUri( 47xtGU3vht7mXLHqnbaau5 , 0, 50)\n});",
|
|
"title": "RemovePlaylistTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#removeplaylisttrack",
|
|
"text": "AUTH REQUIRED Remove one or more tracks from a user\u2019s playlist. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" uri Spotify URI new DeleteTrackUri(\"1ri6UZpjPLmTCswIXZ6Uq1\") Returns a ErrorResponse which just contains a possible error. ( response.HasError() and response.Error ) Usage //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));",
|
|
"title": "RemovePlaylistTrack"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#addplaylisttracks",
|
|
"text": "AUTH REQUIRED Add one or more tracks to a user\u2019s playlist. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" uris A list of Spotify track URIs to add new List string { \"1ri6UZpjPLmTCswIXZ6Uq1\" } [position] The position to insert the tracks, a zero-based index 10 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 });\nif(!response.HasError())\n Console.WriteLine( Success );",
|
|
"title": "AddPlaylistTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#addplaylisttrack",
|
|
"text": "AUTH REQUIRED Add one or more tracks to a user\u2019s playlist. Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" uri A Spotify Track URI \"1ri6UZpjPLmTCswIXZ6Uq1\" position The position to insert the tracks, a zero-based index 10 Returns a ErrorResponse which just contains a possible error. ( response.HasError() and response.Error ) Usage ErrorResponse response = _spotify.AddPlaylistTrack( 1122095781 , 1TtEejT1y4D1WmcOnLfha2 , 1ri6UZpjPLmTCswIXZ6Uq1 );\nif(!response.HasError())\n Console.WriteLine( Success );",
|
|
"title": "AddPlaylistTrack"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/playlists/#reorderplaylist",
|
|
"text": "AUTH REQUIRED Reorder a track or a group of tracks in a playlist.\nMore Info: Reorder-Playlist Paramters Name Description Example userId The user's Spotify user ID. \"1122095781\" playlistId The Spotify ID for the playlist. \"1TtEejT1y4D1WmcOnLfha2\" rangeStart The position of the first track to be reordered. 2 insertBefore The 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);\nConsole.WriteLine( New SnapshotId: + snapshot.SnapshotId);",
|
|
"title": "ReorderPlaylist"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/profiles/",
|
|
"text": "GetPrivateProfile\n\n\nAUTH REQUIRED\n\n\n\n\nGet detailed profile information about the current user (including the current user\u2019s username).\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nReturns a \nPrivateProfile\n\n\nUsage\n \n\n\nPrivateUser user = _spotify.GetPrivateProfile();\nConsole.WriteLine(user.DisplayName);\n\n\n\n\n\n\nGetPublicProfile\n\n\n\n\nGet public profile information about a Spotify user.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nuserId\n\n\nThe user's Spotify user ID.\n\n\nEXAMPLE\n\n\n\n\n\n\n\n\nReturns a \nPublicProfile\n\n\nUsage",
|
|
"title": "- Profiles"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/profiles/#getprivateprofile",
|
|
"text": "AUTH REQUIRED Get detailed profile information about the current user (including the current user\u2019s username). Paramters Name Description Example Returns a PrivateProfile Usage PrivateUser user = _spotify.GetPrivateProfile();\nConsole.WriteLine(user.DisplayName);",
|
|
"title": "GetPrivateProfile"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/profiles/#getpublicprofile",
|
|
"text": "Get public profile information about a Spotify user. Paramters Name Description Example userId The user's Spotify user ID. EXAMPLE Returns a PublicProfile Usage",
|
|
"title": "GetPublicProfile"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/search/",
|
|
"text": "SearchItems\n\n\n\n\nGet Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.\n\n\n\n\nParamters\n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nq\n\n\nThe search query's keywords (and optional field filters and operators), for example q=roadhouse+blues.\n\n\n\"roadhouse+blues\"\n\n\n\n\n\n\ntype\n\n\nA list of item types to search across.\n\n\nSearchType.Album\n\n\n\n\n\n\n[limit]\n\n\nThe maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[offset]\n\n\nThe index of the first result to return. Default: 0\n\n\n0\n\n\n\n\n\n\n[market]\n\n\nAn ISO 3166-1 alpha-2 country code or the string from_token.\n\n\n\"de\"\n\n\n\n\n\n\n\n\nReturns a \nSearchItem\n which contains the properties \nPaging\nFullArtist\n Artists\n,\nPaging\nFullTrack\n Tracks\n, \nPaging\nSimpleAlbum\n Albums\n, \nPaging\nSimplePlaylist\n Playlists\n. They are filled based on your search-type.\n\n\nUsage\n\n\nSearchItem item = _spotify.SearchItems(\nroadhouse+blues\n, SearchType.Album | SearchType.Playlist);\nConsole.WriteLine(item.Albums.Total); //How many results are there in total? NOTE: item.Tracks = item.Artists = null",
|
|
"title": "- Search"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/search/#searchitems",
|
|
"text": "Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string. Paramters Name Description Example q The search query's keywords (and optional field filters and operators), for example q=roadhouse+blues. \"roadhouse+blues\" type A 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: 0 0 [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);\nConsole.WriteLine(item.Albums.Total); //How many results are there in total? NOTE: item.Tracks = item.Artists = null",
|
|
"title": "SearchItems"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/tracks/",
|
|
"text": "GetSeveralTracks\n\n\n\n\nGet Spotify catalog information for multiple tracks based on their Spotify IDs.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nids\n\n\nA list of the Spotify IDs for the tracks. Maximum: 50 IDs.\n\n\nnew List\nString\n {\"6Y1CLPwYe7zvI8PJiWVz6T\"}\n\n\n\n\n\n\nmarket\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nSeveralTracks\n object which has one property, \nList\nFullTrack\n Tracks\n\n\nUsage\n \n\n\nSeveralTracks severalTracks = _spotify.GetSeveralTracks(new List\nString\n {\n6Y1CLPwYe7zvI8PJiWVz6T\n});\nseveralTracks.Tracks.ForEach(track =\n Console.WriteLine(track.Name));\n\n\n\n\n\n\nGetTrack\n\n\n\n\nGet Spotify catalog information for a single track identified by its unique Spotify ID.\n\n\n\n\nParamters\n \n\n\n\n\n\n\n\n\nName\n\n\nDescription\n\n\nExample\n\n\n\n\n\n\n\n\n\n\nid\n\n\nThe Spotify ID for the track.\n\n\n\"6Y1CLPwYe7zvI8PJiWVz6T\"\n\n\n\n\n\n\nmarket\n\n\nAn ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.\n\n\n\"DE\"\n\n\n\n\n\n\n\n\nReturns a \nFullTrack\n\n\nUsage\n \n\n\nFullTrack track = _spotify.GetTrack(\n6Y1CLPwYe7zvI8PJiWVz6T\n);\nConsole.WriteLine(track.Name);",
|
|
"title": "- Tracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/tracks/#getseveraltracks",
|
|
"text": "Get Spotify catalog information for multiple tracks based on their Spotify IDs. Paramters Name Description Example ids A list of the Spotify IDs for the tracks. Maximum: 50 IDs. new List String {\"6Y1CLPwYe7zvI8PJiWVz6T\"} market An 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 });\nseveralTracks.Tracks.ForEach(track = Console.WriteLine(track.Name));",
|
|
"title": "GetSeveralTracks"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/tracks/#gettrack",
|
|
"text": "Get Spotify catalog information for a single track identified by its unique Spotify ID. Paramters Name Description Example id The Spotify ID for the track. \"6Y1CLPwYe7zvI8PJiWVz6T\" market An 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 );\nConsole.WriteLine(track.Name);",
|
|
"title": "GetTrack"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/util/",
|
|
"text": "Paging-Methods\n\n\nThe \nSpotifyWebAPI\n features two paging-helper Methods, \nGetNextPage(Paging\nT\n page)\n and \nGetPreviousPage(Paging\nT\n page)\n.\nBoth are an easy way to receive the next/previous page of a Paging-Object.\n\n\nSample:\n\n\nvar playlistTracks = _spotify.GetPlaylistTracks(\n1122095781\n, \n4EcNf2l8rXInbJOf3tQdgU\n, \n, 50);\nwhile (true)\n{\n Console.WriteLine(playlistTracks.Items.Count);\n if (!playlistTracks.HasNextPage())\n break;\n playlistTracks = _spotify.GetNextPage(playlistTracks);\n}",
|
|
"title": "- Util"
|
|
},
|
|
{
|
|
"location": "/SpotifyWebAPI/util/#paging-methods",
|
|
"text": "The SpotifyWebAPI features two paging-helper Methods, GetNextPage(Paging T page) and GetPreviousPage(Paging T page) .\nBoth are an easy way to receive the next/previous page of a Paging-Object. Sample: 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}",
|
|
"title": "Paging-Methods"
|
|
},
|
|
{
|
|
"location": "/SpotifyLocalAPI/",
|
|
"text": "WIP",
|
|
"title": "SpotifyLocalAPI"
|
|
},
|
|
{
|
|
"location": "/SpotifyLocalAPI/#wip",
|
|
"text": "",
|
|
"title": "WIP"
|
|
}
|
|
]
|
|
} |