mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-27 08:26:25 +00:00
1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{200:function(t,a,e){"use strict";e.r(a);var s=e(0),r=Object(s.a)({},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"player"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#player","aria-hidden":"true"}},[t._v("#")]),t._v(" Player")]),t._v(" "),e("h2",{attrs:{id:"getdevices"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getdevices","aria-hidden":"true"}},[t._v("#")]),t._v(" GetDevices")]),t._v(" "),e("blockquote",[e("p",[t._v("Get information about a user’s available devices.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody")]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AvailabeDevices")]),t._v(" devices "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetDevices")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndevices"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Devices"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("device "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("device"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h2",{attrs:{id:"getplayback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getplayback","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlayback")]),t._v(" "),e("blockquote",[e("p",[t._v("Get information about the user’s current playback state, including track, track progress, and active device.")])]),t._v(" "),e("p",[e("strong",[t._v("Parameters")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Example")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("[market]")]),t._v(" "),e("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),e("td",[e("code",[t._v('"DE"')])])])])]),t._v(" "),e("p",[e("strong",[t._v("Usage")])]),t._v(" "),e("div",{staticClass:"language-csharp extra-class"},[e("pre",{pre:!0,attrs:{class:"language-csharp"}},[e("code",[e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("PlaybackContext")]),t._v(" context "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlayback")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("contex"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t.
|