@@ -215,7 +219,7 @@ public static void Main(String[] args)
Configuration
-
Different spotify versions often require different configuration. Some versions run their web-helper on port 4371, others on 4381. Also, some use https, and others use http. You can use SpotifyLocalAPIConfig to configure the API:
+
Different spotify versions often require different configuration. Some versions run their web-helper on port 4371, others on 4381 or 4380. Also, some use https, and others use http. You can use SpotifyLocalAPIConfig to configure the API:
_spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig
{
Port = 4371,
diff --git a/SpotifyWebAPI/albums/index.html b/SpotifyWebAPI/albums/index.html
index 95365652..b2216551 100644
--- a/SpotifyWebAPI/albums/index.html
+++ b/SpotifyWebAPI/albums/index.html
@@ -91,6 +91,10 @@
- Library
+
diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json
index 24d48cf0..28dcefde 100644
--- a/mkdocs/search_index.json
+++ b/mkdocs/search_index.json
@@ -330,6 +330,26 @@
"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/personalization/",
+ "text": "GetUsersTopTracks\n\n\n\n\nGet the current user\u2019s top tracks based on calculated affinity.\n\n\n\n\nParameters\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[timeRange]\n\n\nOver what time frame the affinities are compute.\n\n\nTimeRangeType.MediumTerm\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 entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nFullTrack\n wrapped inside a \nPaging-object\n\n\nUsage\n \n\n\nPaging\nFullTrack\n tracks = _spotify.GetUsersTopTracks();\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\nGetUsersTopArtists\n\n\n\n\nGet the current user\u2019s top artists based on calculated affinity.\n\n\n\n\nParameters\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[timeRange]\n\n\nOver what time frame the affinities are compute.\n\n\nTimeRangeType.MediumTerm\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 entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.\n\n\n0\n\n\n\n\n\n\n\n\nReturns a \nFullArtist\n wrapped inside a \nPaging-object\n\n\nUsage\n \n\n\nPaging\nFullArtist\n artists = _spotify.GetUsersTopArtists();\nartists.Items.ForEach(item =\n Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)\n\n\n\n\n\n\nGetUsersRecentlyPlayedTracks\n\n\n\n\nGet tracks from the current user\u2019s recent play history.\n\n\n\n\nParameters\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 items to return. Default: 20. Minimum: 1. Maximum: 50.\n\n\n20\n\n\n\n\n\n\n[after]\n\n\nReturns all items after (but not including) this cursor position.\n\n\nDateTime.Now.AddDays(-1)\n\n\n\n\n\n\n[before]\n\n\nReturns all items before (but not including) this cursor position.\n\n\nDateTime.Now.AddDays(-1)\n\n\n\n\n\n\n\n\nReturns a \nPlayHistory\n wrapped inside a \nCursorPaging-object\n\n\nUsage\n \n\n\nCursorPaging\nPlayHistory\n histories = _spotify.GetUsersRecentlyPlayedTracks();\nhistories.Items.ForEach(item =\n Console.WriteLine(item.Track.Name));",
+ "title": "- Personalization"
+ },
+ {
+ "location": "/SpotifyWebAPI/personalization/#getuserstoptracks",
+ "text": "Get the current user\u2019s top tracks based on calculated affinity. Parameters Name Description Example [timeRange] Over what time frame the affinities are compute. TimeRangeType.MediumTerm [limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20 [offset] The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities. 0 Returns a FullTrack wrapped inside a Paging-object Usage Paging FullTrack tracks = _spotify.GetUsersTopTracks();\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": "GetUsersTopTracks"
+ },
+ {
+ "location": "/SpotifyWebAPI/personalization/#getuserstopartists",
+ "text": "Get the current user\u2019s top artists based on calculated affinity. Parameters Name Description Example [timeRange] Over what time frame the affinities are compute. TimeRangeType.MediumTerm [limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20 [offset] The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities. 0 Returns a FullArtist wrapped inside a Paging-object Usage Paging FullArtist artists = _spotify.GetUsersTopArtists();\nartists.Items.ForEach(item = Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)",
+ "title": "GetUsersTopArtists"
+ },
+ {
+ "location": "/SpotifyWebAPI/personalization/#getusersrecentlyplayedtracks",
+ "text": "Get tracks from the current user\u2019s recent play history. Parameters Name Description Example [limit] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 20 [after] Returns all items after (but not including) this cursor position. DateTime.Now.AddDays(-1) [before] Returns all items before (but not including) this cursor position. DateTime.Now.AddDays(-1) Returns a PlayHistory wrapped inside a CursorPaging-object Usage CursorPaging PlayHistory histories = _spotify.GetUsersRecentlyPlayedTracks();\nhistories.Items.ForEach(item = Console.WriteLine(item.Track.Name));",
+ "title": "GetUsersRecentlyPlayedTracks"
+ },
{
"location": "/SpotifyWebAPI/player/",
"text": "GetDevices\n\n\n\n\nGet information about a user\u2019s available devices.\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\n\n\n\n\n\n\n\n\n\n\n\nUsage\n \n\n\nAvailabeDevices devices = _spotify.GetDevices();\ndevices.Devices.ForEach(device =\n Console.WriteLine(device.Name));\n\n\n\n\n\n\nGetPlayback\n\n\n\n\nGet information about the user\u2019s current playback state, including track, track progress, and active device.\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[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\nUsage\n \n\n\nPlaybackContext context = _spotify.GetPlayback();\nif(contex.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n\n\n\n\n\n\nGetPlayingTrack\n\n\n\n\nGet the object currently being played on the user\u2019s Spotify account.\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[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\nThis is a simpler (less data) version of \nGetPlayback\n\n\nUsage\n \n\n\nPlaybackContext context = _spotify.GetPlayingTrack();\nif(contex.Item != null)\n Console.WriteLine(context.Item.Name)); //Print the current song\n\n\n\n\n\n\nTransferPlayback\n\n\n\n\nTransfer playback to a new device and determine if it should start playing.\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\ndeviceIds or deviceId\n\n\nA JSON array containing the ID of the device on which playback should be started/transferred\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\nplay\n\n\ntrue: ensure playback happens on new device, false: keep current playback state\n\n\ntrue\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.TransferPlayback(\nXXXX-XXXX-XXXX-XXXX\n);\n\n\n\n\n\n\nResumePlayback\n\n\n\n\nStart a new context or resume current playback on the user\u2019s active device.\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[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\ncontextUri\n\n\nSpotify URI of the context to play\n\n\n\"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT\"\n\n\n\n\n\n\nuris\n\n\nAn array of the Spotify track URIs to play.\n\n\nnew List\nstring\n { \"spotify:track:4iV5W9uYEdYUVa79Axb7Rh\" }\n\n\n\n\n\n\noffset\n\n\nIndicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object, or when the uris parameter is used.\n\n\n0\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.ResumePlayback(uris: new List\nstring\n { \nspotify:track:4iV5W9uYEdYUVa79Axb7Rh\n });\n\n\n\n\n\n\nPausePlayback\n\n\n\n\nPause playback on the user\u2019s account.\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[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.PausePlayback();\n\n\n\n\n\n\nSkipPlaybackToNext\n\n\n\n\nSkips to next track in the user\u2019s queue.\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[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SkipPlaybackToNext();\n\n\n\n\n\n\nSkipPlaybackToPrevious\n\n\n\n\nSkips to previous track in the user\u2019s queue.\nNote that this will ALWAYS skip to the previous track, regardless of the current track\u2019s progress.\nReturning to the start of the current track should be performed using the https://api.spotify.com/v1/me/player/seek endpoint.\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[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SkipPlaybackToPrevious();\n\n\n\n\n\n\nSeekPlayback\n\n\n\n\nSeeks to the given position in the user\u2019s currently playing track.\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\npositionMs\n\n\nThe position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.\n\n\n50\n\n\n\n\n\n\n[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SeekPlayback(50);\n\n\n\n\n\n\nSetRepeatMode\n\n\n\n\nSet the repeat mode for the user\u2019s playback. Options are repeat-track, repeat-context, and off.\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\nstate\n\n\ntrack, context or off.\n\n\nRepeatState.Track\n\n\n\n\n\n\n[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SetRepeatMode(RepeatState.Track);\n\n\n\n\n\n\nSetVolume\n\n\n\n\nSet the volume for the user\u2019s current playback device.\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\nvolumePercent\n\n\nInteger. The volume to set. Must be a value from 0 to 100 inclusive.\n\n\n50\n\n\n\n\n\n\n[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SetVolume(50);\n\n\n\n\n\n\nSetShuffle\n\n\n\n\nToggle shuffle on or off for user\u2019s playback.\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\nshuffle\n\n\nTrue or False\n\n\nfalse\n\n\n\n\n\n\n[deviceId]\n\n\nThe id of the device this command is targeting. If not supplied, the user's currently active device is the target.\n\n\n\"XXXX-XXXX-XXXX-XXXX\"\n\n\n\n\n\n\n\n\nUsage\n \n\n\nErrorResponse error = _spotify.SetShuffle(false);",
@@ -512,7 +532,7 @@
},
{
"location": "/SpotifyLocalAPI/",
- "text": "Getting started\n\n\nThis API provides some access to the local running Spotify-Client (Windows only).\n\nYou can fetch details for the current track, play/pause, skip/previous track and\nget notified on various events.\n\n\nNOTE:\n This API is unofficial, things may break in the future and there is no\nguarantee everything works out of the box.\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.Local; //Base Namespace\nusing SpotifyAPI.Local.Enums; //Enums\nusing SpotifyAPI.Local.Models; //Models for the JSON-responses\n\n\n\n\nBasic-Usage\n\nNow you can actually start fetching infos from your spotify client, just create a new Instance of SpotifyLocalAPI:\n\n\nprivate static SpotifyLocalAPI _spotify;\n\npublic static void Main(String[] args)\n{\n _spotify = new SpotifyLocalAPI();\n if (!SpotifyLocalAPI.IsSpotifyRunning())\n return; //Make sure the spotify client is running\n if (!SpotifyLocalAPI.IsSpotifyWebHelperRunning())\n return; //Make sure the WebHelper is running\n\n if(!_spotify.Connect())\n return; //We need to call Connect before fetching infos, this will handle Auth stuff\n\n StatusResponse status = _spotify.GetStatus(); //status contains infos\n}\n\n\n\n\nConfiguration\n\n\nDifferent spotify versions often require different configuration. Some versions run their web-helper on port \n4371\n, others on \n4381\n. Also, some use \nhttps\n, and others use \nhttp\n. You can use \nSpotifyLocalAPIConfig\n to configure the API:\n\n\n_spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig\n{\n Port = 4371,\n HostUrl = \nhttps://127.0.0.1\n\n});\n\n\n\n\nAnti-Virus Blocking Response\n\n\nSome Anti-Virus Software blocks the response from spotify due wrong headers.\nCurrently, it's confirmed for AVG's LinkScanner and Bitdefender.\nAdding \nhttp://SpotifyAPI.spotilocal.com:4380\n to the URL-Exceptions seems to fix it for most users.\nMore infos can be found \nhere\n\n\nClient Status\n\n\nCalling \n_spotify.GetStatus()\n after connecting returns the following \nStatusResponse\n:\n\n\npublic int Version { get; set; }\n\npublic string ClientVersion { get; set; }\n\npublic bool Playing { get; set; }\n\npublic bool Shuffle { get; set; }\n\npublic bool Repeat { get; set; }\n\npublic bool PlayEnabled { get; set; }\n\npublic bool PrevEnabled { get; set; }\n\npublic bool NextEnabled { get; set; }\n\npublic Track Track { get; set; }\n\npublic double PlayingPosition { get; set; }\n\npublic int ServerTime { get; set; }\n\npublic double Volume { get; set; }\n\npublic bool Online { get; set; }\n\npublic bool Running { get; set; }\n\n\n\n\nMost of the properties are self-explanatory, some notes:\n\n\n\n\nShuffle\n and \nRepeat\n currently always return \nfalse\n\n\n\n\nCurrent Track\n\n\nThe current Track can be fetched via \n_spotify.GetStatus().Track\n and contains following properties/methods:\n\n\n\n\nTrackResource\n - \nSpotifyResource\n which contains Track \nName\n and \nUri\n\n\nAlbumResource\n - \nSpotifyResource\n which contains Album \nName\n and \nUri\n\n\nArtistResource\n - \nSpotifyResource\n which contains Artist \nName\n and \nUri\n (Only the main artist will be listed)\n\n\nIsAd()\n will check whether the current track is an AD\n\n\nVarious methods for getting the album art:\n\n\nstring GetAlbumArtUrl(AlbumArtSize size)\n\n\nTask\nBitmap\n GetAlbumArtAsync(AlbumArtSize size)\n\n\nBitmap GetAlbumArt(AlbumArtSize size)\n\n\nTask\nbyte[]\n GetAlbumArtAsByteArrayAsync(AlbumArtSize size)\n\n\nbyte[] GetAlbumArtAsByteArray(AlbumArtSize size)\n\n\n\n\nEvents\n\n\nTo receive events, make sure you listen for them \n_spotify.ListenForEvents = true;\n\nYou can set a \nSynchronizingObject\n, then the events will be called on the specific context\n\n\nFollowing events can be overriden:\n\n\n\n\nOnPlayStateChange\n - triggers when the player changes from \nplay\n to \npause\n and vice versa\n\n\nOnTrackChange\n - triggers when a new track will be played\n\n\nOnTrackTimeChange\n - triggers when a track is playing and track-time changes\n\n\nOnVolumeChange\n - triggeres when the internal volume of spotify changes\n\n\n\n\nMethods\n\n\nFurthermore, following methods are available:\n\n\n\n\nvoid Mute()\n - will mute the Spotify client via WindowsAPI\n\n\nvoid UnMute()\n - will unmute the Spotify client via WindowsAPI\n\n\nbool IsSpotifyMuted()\n - will return wether the Spotify client is muted\n\n\nvoid SetSpotifyVolume(float volume = 100)\n - sets the windows volume of spotify (0 - 100)\n\n\nfloat GetSpotifyVolume()\n - returns the windows volume of spotify (0 - 100)\n\n\nvoid Pause()\n - will pause spotify's playback\n\n\nvoid Play()\n - will resume spotify's playback\n\n\nvoid PlayURL(string uri, string context = \"\")\n - will play a spotify URI (track/album/playlist) in the specifc context (can be a album/playlist URI)\n\n\nvoid Skip()\n - will skip the track via an emulated media key\n\n\nvoid Previous()\n - will play the previous track via an emulated media key\n\n\nbool IsSpotifyRunning()\n - returns true if a spotify client instance is running, false if not\n\n\nbool IsSpotifyWebHelperRunning()\n - returns true if a spotify web-helper instance is running, false if not\n\n\nvoid RunSpotify()\n - will attempt to start a Spotify instance\n\n\nvoid RunSpotifyWebHelper()\n - will attempt to start a Spotify web-helper instance",
+ "text": "Getting started\n\n\nThis API provides some access to the local running Spotify-Client (Windows only).\n\nYou can fetch details for the current track, play/pause, skip/previous track and\nget notified on various events.\n\n\nNOTE:\n This API is unofficial, things may break in the future and there is no\nguarantee everything works out of the box.\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.Local; //Base Namespace\nusing SpotifyAPI.Local.Enums; //Enums\nusing SpotifyAPI.Local.Models; //Models for the JSON-responses\n\n\n\n\nBasic-Usage\n\nNow you can actually start fetching infos from your spotify client, just create a new Instance of SpotifyLocalAPI:\n\n\nprivate static SpotifyLocalAPI _spotify;\n\npublic static void Main(String[] args)\n{\n _spotify = new SpotifyLocalAPI();\n if (!SpotifyLocalAPI.IsSpotifyRunning())\n return; //Make sure the spotify client is running\n if (!SpotifyLocalAPI.IsSpotifyWebHelperRunning())\n return; //Make sure the WebHelper is running\n\n if(!_spotify.Connect())\n return; //We need to call Connect before fetching infos, this will handle Auth stuff\n\n StatusResponse status = _spotify.GetStatus(); //status contains infos\n}\n\n\n\n\nConfiguration\n\n\nDifferent spotify versions often require different configuration. Some versions run their web-helper on port \n4371\n, others on \n4381\n or \n4380\n. Also, some use \nhttps\n, and others use \nhttp\n. You can use \nSpotifyLocalAPIConfig\n to configure the API:\n\n\n_spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig\n{\n Port = 4371,\n HostUrl = \nhttps://127.0.0.1\n\n});\n\n\n\n\nAnti-Virus Blocking Response\n\n\nSome Anti-Virus Software blocks the response from spotify due wrong headers.\nCurrently, it's confirmed for AVG's LinkScanner and Bitdefender.\nAdding \nhttp://SpotifyAPI.spotilocal.com:4380\n to the URL-Exceptions seems to fix it for most users.\nMore infos can be found \nhere\n\n\nClient Status\n\n\nCalling \n_spotify.GetStatus()\n after connecting returns the following \nStatusResponse\n:\n\n\npublic int Version { get; set; }\n\npublic string ClientVersion { get; set; }\n\npublic bool Playing { get; set; }\n\npublic bool Shuffle { get; set; }\n\npublic bool Repeat { get; set; }\n\npublic bool PlayEnabled { get; set; }\n\npublic bool PrevEnabled { get; set; }\n\npublic bool NextEnabled { get; set; }\n\npublic Track Track { get; set; }\n\npublic double PlayingPosition { get; set; }\n\npublic int ServerTime { get; set; }\n\npublic double Volume { get; set; }\n\npublic bool Online { get; set; }\n\npublic bool Running { get; set; }\n\n\n\n\nMost of the properties are self-explanatory, some notes:\n\n\n\n\nShuffle\n and \nRepeat\n currently always return \nfalse\n\n\n\n\nCurrent Track\n\n\nThe current Track can be fetched via \n_spotify.GetStatus().Track\n and contains following properties/methods:\n\n\n\n\nTrackResource\n - \nSpotifyResource\n which contains Track \nName\n and \nUri\n\n\nAlbumResource\n - \nSpotifyResource\n which contains Album \nName\n and \nUri\n\n\nArtistResource\n - \nSpotifyResource\n which contains Artist \nName\n and \nUri\n (Only the main artist will be listed)\n\n\nIsAd()\n will check whether the current track is an AD\n\n\nVarious methods for getting the album art:\n\n\nstring GetAlbumArtUrl(AlbumArtSize size)\n\n\nTask\nBitmap\n GetAlbumArtAsync(AlbumArtSize size)\n\n\nBitmap GetAlbumArt(AlbumArtSize size)\n\n\nTask\nbyte[]\n GetAlbumArtAsByteArrayAsync(AlbumArtSize size)\n\n\nbyte[] GetAlbumArtAsByteArray(AlbumArtSize size)\n\n\n\n\nEvents\n\n\nTo receive events, make sure you listen for them \n_spotify.ListenForEvents = true;\n\nYou can set a \nSynchronizingObject\n, then the events will be called on the specific context\n\n\nFollowing events can be overriden:\n\n\n\n\nOnPlayStateChange\n - triggers when the player changes from \nplay\n to \npause\n and vice versa\n\n\nOnTrackChange\n - triggers when a new track will be played\n\n\nOnTrackTimeChange\n - triggers when a track is playing and track-time changes\n\n\nOnVolumeChange\n - triggeres when the internal volume of spotify changes\n\n\n\n\nMethods\n\n\nFurthermore, following methods are available:\n\n\n\n\nvoid Mute()\n - will mute the Spotify client via WindowsAPI\n\n\nvoid UnMute()\n - will unmute the Spotify client via WindowsAPI\n\n\nbool IsSpotifyMuted()\n - will return wether the Spotify client is muted\n\n\nvoid SetSpotifyVolume(float volume = 100)\n - sets the windows volume of spotify (0 - 100)\n\n\nfloat GetSpotifyVolume()\n - returns the windows volume of spotify (0 - 100)\n\n\nvoid Pause()\n - will pause spotify's playback\n\n\nvoid Play()\n - will resume spotify's playback\n\n\nvoid PlayURL(string uri, string context = \"\")\n - will play a spotify URI (track/album/playlist) in the specifc context (can be a album/playlist URI)\n\n\nvoid Skip()\n - will skip the track via an emulated media key\n\n\nvoid Previous()\n - will play the previous track via an emulated media key\n\n\nbool IsSpotifyRunning()\n - returns true if a spotify client instance is running, false if not\n\n\nbool IsSpotifyWebHelperRunning()\n - returns true if a spotify web-helper instance is running, false if not\n\n\nvoid RunSpotify()\n - will attempt to start a Spotify instance\n\n\nvoid RunSpotifyWebHelper()\n - will attempt to start a Spotify web-helper instance",
"title": "SpotifyLocalAPI"
},
{
@@ -527,7 +547,7 @@
},
{
"location": "/SpotifyLocalAPI/#configuration",
- "text": "Different spotify versions often require different configuration. Some versions run their web-helper on port 4371 , others on 4381 . Also, some use https , and others use http . You can use SpotifyLocalAPIConfig to configure the API: _spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig\n{\n Port = 4371,\n HostUrl = https://127.0.0.1 \n});",
+ "text": "Different spotify versions often require different configuration. Some versions run their web-helper on port 4371 , others on 4381 or 4380 . Also, some use https , and others use http . You can use SpotifyLocalAPIConfig to configure the API: _spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig\n{\n Port = 4371,\n HostUrl = https://127.0.0.1 \n});",
"title": "Configuration"
},
{
diff --git a/sitemap.xml b/sitemap.xml
index 7dbc1601..8ea72a27 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -59,6 +59,12 @@
daily
+
+ /SpotifyWebAPI/personalization/
+ 2018-01-15
+ daily
+
+
/SpotifyWebAPI/player/2018-01-15