spotifywebapiPython 1.0.148__py3-none-any.whl → 1.0.150__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spotifywebapiPython might be problematic. Click here for more details.
- {spotifywebapiPython-1.0.148.dist-info → spotifywebapiPython-1.0.150.dist-info}/METADATA +5 -9
- {spotifywebapiPython-1.0.148.dist-info → spotifywebapiPython-1.0.150.dist-info}/RECORD +38 -29
- spotifywebapipython/__init__.py +0 -2
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +25 -4
- spotifywebapipython/docs/index.html +26 -2
- spotifywebapipython/docs/search.js +1 -1
- spotifywebapipython/docs/spotifywebapipython/const.html +3 -3
- spotifywebapipython/docs/spotifywebapipython/saappmessages.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/sautils.html +8 -8
- spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyclient.html +514 -741
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +3 -3
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html +466 -0
- spotifywebapipython/models/spotifyconnectdevice.py +84 -4
- spotifywebapipython/models/spotifyconnectdevices.py +16 -307
- spotifywebapipython/models/zeroconfdiscoveryresult.py +1 -42
- spotifywebapipython/sautils.py +0 -1
- spotifywebapipython/spotifyclient.py +1380 -1834
- spotifywebapipython/spotifyconnect/__init__.py +19 -0
- spotifywebapipython/{spotifyconnectdeviceeventargs.py → spotifyconnect/spotifyconnectdeviceeventargs.py} +1 -1
- spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py +1994 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastapptask.py +336 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastcontroller.py +609 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastlistener.py +317 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfexceptions.py +10 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconflistener.py +335 -0
- spotifywebapipython/spotifydiscovery.py +0 -1
- spotifywebapipython/spotifywebplayertoken.py +344 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfo.py +4 -52
- spotifywebapipython/zeroconfapi/zeroconfresponse.py +8 -0
- {spotifywebapiPython-1.0.148.dist-info → spotifywebapiPython-1.0.150.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.148.dist-info → spotifywebapiPython-1.0.150.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.148.dist-info → spotifywebapiPython-1.0.150.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</title>
|
|
10
10
|
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20role%3D%22img%22%20aria-label%3D%22pdoc%20logo%22%20width%3D%22300%22%20height%3D%22150%22%20viewBox%3D%22-1%200%2060%2030%22%3E%3Ctitle%3Epdoc%3C/title%3E%3Cpath%20d%3D%22M29.621%2021.293c-.011-.273-.214-.475-.511-.481a.5.5%200%200%200-.489.503l-.044%201.393c-.097.551-.695%201.215-1.566%201.704-.577.428-1.306.486-2.193.182-1.426-.617-2.467-1.654-3.304-2.487l-.173-.172a3.43%203.43%200%200%200-.365-.306.49.49%200%200%200-.286-.196c-1.718-1.06-4.931-1.47-7.353.191l-.219.15c-1.707%201.187-3.413%202.131-4.328%201.03-.02-.027-.49-.685-.141-1.763.233-.721.546-2.408.772-4.076.042-.09.067-.187.046-.288.166-1.347.277-2.625.241-3.351%201.378-1.008%202.271-2.586%202.271-4.362%200-.976-.272-1.935-.788-2.774-.057-.094-.122-.18-.184-.268.033-.167.052-.339.052-.516%200-1.477-1.202-2.679-2.679-2.679-.791%200-1.496.352-1.987.9a6.3%206.3%200%200%200-1.001.029c-.492-.564-1.207-.929-2.012-.929-1.477%200-2.679%201.202-2.679%202.679A2.65%202.65%200%200%200%20.97%206.554c-.383.747-.595%201.572-.595%202.41%200%202.311%201.507%204.29%203.635%205.107-.037.699-.147%202.27-.423%203.294l-.137.461c-.622%202.042-2.515%208.257%201.727%2010.643%201.614.908%203.06%201.248%204.317%201.248%202.665%200%204.492-1.524%205.322-2.401%201.476-1.559%202.886-1.854%206.491.82%201.877%201.393%203.514%201.753%204.861%201.068%202.223-1.713%202.811-3.867%203.399-6.374.077-.846.056-1.469.054-1.537zm-4.835%204.313c-.054.305-.156.586-.242.629-.034-.007-.131-.022-.307-.157-.145-.111-.314-.478-.456-.908.221.121.432.25.675.355.115.039.219.051.33.081zm-2.251-1.238c-.05.33-.158.648-.252.694-.022.001-.125-.018-.307-.157-.217-.166-.488-.906-.639-1.573.358.344.754.693%201.198%201.036zm-3.887-2.337c-.006-.116-.018-.231-.041-.342.635.145%201.189.368%201.599.625.097.231.166.481.174.642-.03.049-.055.101-.067.158-.046.013-.128.026-.298.004-.278-.037-.901-.57-1.367-1.087zm-1.127-.497c.116.306.176.625.12.71-.019.014-.117.045-.345.016-.206-.027-.604-.332-.986-.695.41-.051.816-.056%201.211-.031zm-4.535%201.535c.209.22.379.47.358.598-.006.041-.088.138-.351.234-.144.055-.539-.063-.979-.259a11.66%2011.66%200%200%200%20.972-.573zm.983-.664c.359-.237.738-.418%201.126-.554.25.237.479.548.457.694-.006.042-.087.138-.351.235-.174.064-.694-.105-1.232-.375zm-3.381%201.794c-.022.145-.061.29-.149.401-.133.166-.358.248-.69.251h-.002c-.133%200-.306-.26-.45-.621.417.091.854.07%201.291-.031zm-2.066-8.077a4.78%204.78%200%200%201-.775-.584c.172-.115.505-.254.88-.378l-.105.962zm-.331%202.302a10.32%2010.32%200%200%201-.828-.502c.202-.143.576-.328.984-.49l-.156.992zm-.45%202.157l-.701-.403c.214-.115.536-.249.891-.376a11.57%2011.57%200%200%201-.19.779zm-.181%201.716c.064.398.194.702.298.893-.194-.051-.435-.162-.736-.398.061-.119.224-.3.438-.495zM8.87%204.141c0%20.152-.123.276-.276.276s-.275-.124-.275-.276.123-.276.276-.276.275.124.275.276zm-.735-.389a1.15%201.15%200%200%200-.314.783%201.16%201.16%200%200%200%201.162%201.162c.457%200%20.842-.27%201.032-.653.026.117.042.238.042.362a1.68%201.68%200%200%201-1.679%201.679%201.68%201.68%200%200%201-1.679-1.679c0-.843.626-1.535%201.436-1.654zM5.059%205.406A1.68%201.68%200%200%201%203.38%207.085a1.68%201.68%200%200%201-1.679-1.679c0-.037.009-.072.011-.109.21.3.541.508.935.508a1.16%201.16%200%200%200%201.162-1.162%201.14%201.14%200%200%200-.474-.912c.015%200%20.03-.005.045-.005.926.001%201.679.754%201.679%201.68zM3.198%204.141c0%20.152-.123.276-.276.276s-.275-.124-.275-.276.123-.276.276-.276.275.124.275.276zM1.375%208.964c0-.52.103-1.035.288-1.52.466.394%201.06.64%201.717.64%201.144%200%202.116-.725%202.499-1.738.383%201.012%201.355%201.738%202.499%201.738.867%200%201.631-.421%202.121-1.062.307.605.478%201.267.478%201.942%200%202.486-2.153%204.51-4.801%204.51s-4.801-2.023-4.801-4.51zm24.342%2019.349c-.985.498-2.267.168-3.813-.979-3.073-2.281-5.453-3.199-7.813-.705-1.315%201.391-4.163%203.365-8.423.97-3.174-1.786-2.239-6.266-1.261-9.479l.146-.492c.276-1.02.395-2.457.444-3.268a6.11%206.11%200%200%200%201.18.115%206.01%206.01%200%200%200%202.536-.562l-.006.175c-.802.215-1.848.612-2.021%201.25-.079.295.021.601.274.837.219.203.415.364.598.501-.667.304-1.243.698-1.311%201.179-.02.144-.022.507.393.787.213.144.395.26.564.365-1.285.521-1.361.96-1.381%201.126-.018.142-.011.496.427.746l.854.489c-.473.389-.971.914-.999%201.429-.018.278.095.532.316.713.675.556%201.231.721%201.653.721.059%200%20.104-.014.158-.02.207.707.641%201.64%201.513%201.64h.013c.8-.008%201.236-.345%201.462-.626.173-.216.268-.457.325-.692.424.195.93.374%201.372.374.151%200%20.294-.021.423-.068.732-.27.944-.704.993-1.021.009-.061.003-.119.002-.179.266.086.538.147.789.147.15%200%20.294-.021.423-.069.542-.2.797-.489.914-.754.237.147.478.258.704.288.106.014.205.021.296.021.356%200%20.595-.101.767-.229.438.435%201.094.992%201.656%201.067.106.014.205.021.296.021a1.56%201.56%200%200%200%20.323-.035c.17.575.453%201.289.866%201.605.358.273.665.362.914.362a.99.99%200%200%200%20.421-.093%201.03%201.03%200%200%200%20.245-.164c.168.428.39.846.68%201.068.358.273.665.362.913.362a.99.99%200%200%200%20.421-.093c.317-.148.512-.448.639-.762.251.157.495.257.726.257.127%200%20.25-.024.37-.071.427-.17.706-.617.841-1.314.022-.015.047-.022.068-.038.067-.051.133-.104.196-.159-.443%201.486-1.107%202.761-2.086%203.257zM8.66%209.925a.5.5%200%201%200-1%200c0%20.653-.818%201.205-1.787%201.205s-1.787-.552-1.787-1.205a.5.5%200%201%200-1%200c0%201.216%201.25%202.205%202.787%202.205s2.787-.989%202.787-2.205zm4.4%2015.965l-.208.097c-2.661%201.258-4.708%201.436-6.086.527-1.542-1.017-1.88-3.19-1.844-4.198a.4.4%200%200%200-.385-.414c-.242-.029-.406.164-.414.385-.046%201.249.367%203.686%202.202%204.896.708.467%201.547.7%202.51.7%201.248%200%202.706-.392%204.362-1.174l.185-.086a.4.4%200%200%200%20.205-.527c-.089-.204-.326-.291-.527-.206zM9.547%202.292c.093.077.205.114.317.114a.5.5%200%200%200%20.318-.886L8.817.397a.5.5%200%200%200-.703.068.5.5%200%200%200%20.069.703l1.364%201.124zm-7.661-.065c.086%200%20.173-.022.253-.068l1.523-.893a.5.5%200%200%200-.506-.863l-1.523.892a.5.5%200%200%200-.179.685c.094.158.261.247.432.247z%22%20transform%3D%22matrix%28-1%200%200%201%2058%200%29%22%20fill%3D%22%233bb300%22/%3E%3Cpath%20d%3D%22M.3%2021.86V10.18q0-.46.02-.68.04-.22.18-.5.28-.54%201.34-.54%201.06%200%201.42.28.38.26.44.78.76-1.04%202.38-1.04%201.64%200%203.1%201.54%201.46%201.54%201.46%203.58%200%202.04-1.46%203.58-1.44%201.54-3.08%201.54-1.64%200-2.38-.92v4.04q0%20.46-.04.68-.02.22-.18.5-.14.3-.5.42-.36.12-.98.12-.62%200-1-.12-.36-.12-.52-.4-.14-.28-.18-.5-.02-.22-.02-.68zm3.96-9.42q-.46.54-.46%201.18%200%20.64.46%201.18.48.52%201.2.52.74%200%201.24-.52.52-.52.52-1.18%200-.66-.48-1.18-.48-.54-1.26-.54-.76%200-1.22.54zm14.741-8.36q.16-.3.54-.42.38-.12%201-.12.64%200%201.02.12.38.12.52.42.16.3.18.54.04.22.04.68v11.94q0%20.46-.04.7-.02.22-.18.5-.3.54-1.7.54-1.38%200-1.54-.98-.84.96-2.34.96-1.8%200-3.28-1.56-1.48-1.58-1.48-3.66%200-2.1%201.48-3.68%201.5-1.58%203.28-1.58%201.48%200%202.3%201v-4.2q0-.46.02-.68.04-.24.18-.52zm-3.24%2010.86q.52.54%201.26.54.74%200%201.22-.54.5-.54.5-1.18%200-.66-.48-1.22-.46-.56-1.26-.56-.8%200-1.28.56-.48.54-.48%201.2%200%20.66.52%201.2zm7.833-1.2q0-2.4%201.68-3.96%201.68-1.56%203.84-1.56%202.16%200%203.82%201.56%201.66%201.54%201.66%203.94%200%201.66-.86%202.96-.86%201.28-2.1%201.9-1.22.6-2.54.6-1.32%200-2.56-.64-1.24-.66-2.1-1.92-.84-1.28-.84-2.88zm4.18%201.44q.64.48%201.3.48.66%200%201.32-.5.66-.5.66-1.48%200-.98-.62-1.46-.62-.48-1.34-.48-.72%200-1.34.5-.62.5-.62%201.48%200%20.96.64%201.46zm11.412-1.44q0%20.84.56%201.32.56.46%201.18.46.64%200%201.18-.36.56-.38.9-.38.6%200%201.46%201.06.46.58.46%201.04%200%20.76-1.1%201.42-1.14.8-2.8.8-1.86%200-3.58-1.34-.82-.64-1.34-1.7-.52-1.08-.52-2.36%200-1.3.52-2.34.52-1.06%201.34-1.7%201.66-1.32%203.54-1.32.76%200%201.48.22.72.2%201.06.4l.32.2q.36.24.56.38.52.4.52.92%200%20.5-.42%201.14-.72%201.1-1.38%201.1-.38%200-1.08-.44-.36-.34-1.04-.34-.66%200-1.24.48-.58.48-.58%201.34z%22%20fill%3D%22green%22/%3E%3C/svg%3E"/>
|
|
11
11
|
<!-- build env - Package Name = "spotifywebapiPython" -->
|
|
12
|
-
<!-- build env - Package Version = "1.0.
|
|
12
|
+
<!-- build env - Package Version = "1.0.150" -->
|
|
13
13
|
<!-- pdoc module.modulename = "spotifywebapipython.spotifyclient" -->
|
|
14
14
|
<!-- pdoc module.is_package = "False" -->
|
|
15
15
|
<!-- pdoc root_module_name = "None" -->
|
|
@@ -69,9 +69,15 @@
|
|
|
69
69
|
<li>
|
|
70
70
|
<a class="variable" href="#SpotifyClient.DefaultDeviceId">DefaultDeviceId</a>
|
|
71
71
|
</li>
|
|
72
|
+
<li>
|
|
73
|
+
<a class="variable" href="#SpotifyClient.SpotifyConnectDirectoryEnabled">SpotifyConnectDirectoryEnabled</a>
|
|
74
|
+
</li>
|
|
72
75
|
<li>
|
|
73
76
|
<a class="variable" href="#SpotifyClient.Manager">Manager</a>
|
|
74
77
|
</li>
|
|
78
|
+
<li>
|
|
79
|
+
<a class="variable" href="#SpotifyClient.SpotifyConnectDirectory">SpotifyConnectDirectory</a>
|
|
80
|
+
</li>
|
|
75
81
|
<li>
|
|
76
82
|
<a class="variable" href="#SpotifyClient.SpotifyConnectLoginId">SpotifyConnectLoginId</a>
|
|
77
83
|
</li>
|
|
@@ -97,10 +103,10 @@
|
|
|
97
103
|
<a class="variable" href="#SpotifyClient.ZeroconfClient">ZeroconfClient</a>
|
|
98
104
|
</li>
|
|
99
105
|
<li>
|
|
100
|
-
<a class="function" href="#SpotifyClient.
|
|
106
|
+
<a class="function" href="#SpotifyClient.StopSpotifyConnectDirectoryTask">StopSpotifyConnectDirectoryTask</a>
|
|
101
107
|
</li>
|
|
102
108
|
<li>
|
|
103
|
-
<a class="function" href="#SpotifyClient.
|
|
109
|
+
<a class="function" href="#SpotifyClient.MakeRequest">MakeRequest</a>
|
|
104
110
|
</li>
|
|
105
111
|
<li>
|
|
106
112
|
<a class="function" href="#SpotifyClient.AddPlayerQueueItems">AddPlayerQueueItems</a>
|
|
@@ -246,15 +252,9 @@
|
|
|
246
252
|
<li>
|
|
247
253
|
<a class="function" href="#SpotifyClient.GetMarkets">GetMarkets</a>
|
|
248
254
|
</li>
|
|
249
|
-
<li>
|
|
250
|
-
<a class="function" href="#SpotifyClient.VerifyPlayerActiveDeviceId">VerifyPlayerActiveDeviceId</a>
|
|
251
|
-
</li>
|
|
252
255
|
<li>
|
|
253
256
|
<a class="function" href="#SpotifyClient.GetPlayerDevice">GetPlayerDevice</a>
|
|
254
257
|
</li>
|
|
255
|
-
<li>
|
|
256
|
-
<a class="function" href="#SpotifyClient.PlayerActivateDevices">PlayerActivateDevices</a>
|
|
257
|
-
</li>
|
|
258
258
|
<li>
|
|
259
259
|
<a class="function" href="#SpotifyClient.PlayerConvertDeviceNameToId">PlayerConvertDeviceNameToId</a>
|
|
260
260
|
</li>
|
|
@@ -399,9 +399,6 @@
|
|
|
399
399
|
<li>
|
|
400
400
|
<a class="function" href="#SpotifyClient.PlayerTransferPlayback">PlayerTransferPlayback</a>
|
|
401
401
|
</li>
|
|
402
|
-
<li>
|
|
403
|
-
<a class="function" href="#SpotifyClient.PlayerVerifyDeviceDefault">PlayerVerifyDeviceDefault</a>
|
|
404
|
-
</li>
|
|
405
402
|
<li>
|
|
406
403
|
<a class="function" href="#SpotifyClient.RemoveAlbumFavorites">RemoveAlbumFavorites</a>
|
|
407
404
|
</li>
|
|
@@ -497,7 +494,7 @@
|
|
|
497
494
|
|
|
498
495
|
<footer class="footertext">
|
|
499
496
|
spotifywebapiPython</br>
|
|
500
|
-
Version 1.0.
|
|
497
|
+
Version 1.0.150</br>
|
|
501
498
|
<a href="https://developer.spotify.com/documentation/web-api" target="_blank">
|
|
502
499
|
<img src="../spotifywebapipython.ico" alt="brand icon" style="width:32px; height:32px; padding:4px;"/>
|
|
503
500
|
A Spotify Web Api Client
|
|
@@ -541,7 +538,7 @@ Spotify music service.</p>
|
|
|
541
538
|
<div id="SpotifyClient.__init__" class="classattr">
|
|
542
539
|
<div class="attr function">
|
|
543
540
|
|
|
544
|
-
<span class="name">SpotifyClient</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">manager</span><span class="p">:</span> <span class="n">urllib3</span><span class="o">.</span><span class="n">poolmanager</span><span class="o">.</span><span class="n">PoolManager</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenStorageDir</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenStorageFile</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenUpdater</span><span class="p">:</span> <span class="n">Callable</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">zeroconfClient</span><span class="p">:</span> <span class="n">zeroconf</span><span class="o">.</span><span class="n">_core</span><span class="o">.</span><span class="n">Zeroconf</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectUsername</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectPassword</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectLoginId</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectDiscoveryTimeout</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">2.0</span></span>)</span>
|
|
541
|
+
<span class="name">SpotifyClient</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">manager</span><span class="p">:</span> <span class="n">urllib3</span><span class="o">.</span><span class="n">poolmanager</span><span class="o">.</span><span class="n">PoolManager</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenStorageDir</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenStorageFile</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">tokenUpdater</span><span class="p">:</span> <span class="n">Callable</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">zeroconfClient</span><span class="p">:</span> <span class="n">zeroconf</span><span class="o">.</span><span class="n">_core</span><span class="o">.</span><span class="n">Zeroconf</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectUsername</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectPassword</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectLoginId</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">spotifyConnectDiscoveryTimeout</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">2.0</span>,</span><span class="param"> <span class="n">spotifyConnectDirectoryEnabled</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span></span>)</span>
|
|
545
542
|
|
|
546
543
|
|
|
547
544
|
</div>
|
|
@@ -574,7 +571,11 @@ This value is required if a non-null value was specified for the <code>spotifyCo
|
|
|
574
571
|
This is also known as the canonical user id value. <br />
|
|
575
572
|
This MUST be the value that relates to the <code>spotifyConnectUsername</code> argument. </li>
|
|
576
573
|
<li><strong>spotifyConnectDiscoveryTimeout (float):</strong> Maximum amount of time to wait (in seconds) for the Spotify Connect discovery to complete. <br />
|
|
574
|
+
Specify a value of zero (0) to disable Spotify Connect Zeroconf browsing features.
|
|
577
575
|
Default is 2 seconds.</li>
|
|
576
|
+
<li><strong>spotifyConnectDirectoryEnabled (bool):</strong> True to enable the Spotify Connect Directory task features.
|
|
577
|
+
otherwise, False to disable the Directory.
|
|
578
|
+
Default is True.</li>
|
|
578
579
|
</ul>
|
|
579
580
|
|
|
580
581
|
<p>The <code>spotifyConnectUsername</code>, <code>spotifyConnectPassword</code> and <code>spotifyConnectLoginId</code> arguments are only used
|
|
@@ -587,6 +588,17 @@ or other non-password methods for login), then you will need to define a "device
|
|
|
587
588
|
ZeroConf Connect service; use the <a href="https://www.spotify.com/uk/account/set-device-password/">Spotify Set Device Password</a>
|
|
588
589
|
page to define a device password. You will then use your Spotify username and the device password as your
|
|
589
590
|
Spotify Connect credentials.</p>
|
|
591
|
+
|
|
592
|
+
<p>If the Spotify Connect Directory task Zeroconf feature is disabled (e.g. <code>spotifyConnectDiscoveryTimeout=0</code>), then the
|
|
593
|
+
various player functions that utilize Spotify Connect device entries will fail (e.g. PlayerTransferPlayback, etc) if
|
|
594
|
+
the device does not appear in the Spotify Web API player device list. Chromecast devices will also fail to start, as
|
|
595
|
+
they are controlled via Zeroconf functionality.</p>
|
|
596
|
+
|
|
597
|
+
<p>If the Spotify Connect Directory task is disabled (e.g. <code>spotifyConnectDirectoryEnabled=False</code>), then the
|
|
598
|
+
various player functions that utilize Spotify Connect device entries will fail (e.g. PlayerTransferPlayback, etc)
|
|
599
|
+
since Spotify Connect devices are not being tracked. It is recommended that you disable the Directory task if
|
|
600
|
+
you only wish to access methods that retrieve Spotify catalog information, as it speeds up the startup time of the
|
|
601
|
+
client initialization and does not consume extra resources.</p>
|
|
590
602
|
</div>
|
|
591
603
|
|
|
592
604
|
|
|
@@ -718,6 +730,20 @@ there is no active player detected (e.g. "Office", "5d4931f9d0684b625d702eaa2413
|
|
|
718
730
|
</div>
|
|
719
731
|
|
|
720
732
|
|
|
733
|
+
</div>
|
|
734
|
+
<div id="SpotifyClient.SpotifyConnectDirectoryEnabled" class="classattr">
|
|
735
|
+
<div class="attr variable">
|
|
736
|
+
<span class="name">SpotifyConnectDirectoryEnabled</span><span class="annotation">: bool</span>
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
</div>
|
|
740
|
+
<a class="headerlink" href="#SpotifyClient.SpotifyConnectDirectoryEnabled"></a>
|
|
741
|
+
|
|
742
|
+
<div class="docstring"><p>Returns true if the Spotify Connect Directory is active and tracking Zeroconf
|
|
743
|
+
Spotify Connect devices; otherwise, false.</p>
|
|
744
|
+
</div>
|
|
745
|
+
|
|
746
|
+
|
|
721
747
|
</div>
|
|
722
748
|
<div id="SpotifyClient.Manager" class="classattr">
|
|
723
749
|
<div class="attr variable">
|
|
@@ -737,6 +763,20 @@ there is no active player detected (e.g. "Office", "5d4931f9d0684b625d702eaa2413
|
|
|
737
763
|
</div>
|
|
738
764
|
|
|
739
765
|
|
|
766
|
+
</div>
|
|
767
|
+
<div id="SpotifyClient.SpotifyConnectDirectory" class="classattr">
|
|
768
|
+
<div class="attr variable">
|
|
769
|
+
<span class="name">SpotifyConnectDirectory</span><span class="annotation">: <a href="spotifyconnect/spotifyconnectdirectorytask.html#SpotifyConnectDirectoryTask">spotifywebapipython.spotifyconnect.spotifyconnectdirectorytask.SpotifyConnectDirectoryTask</a></span>
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
</div>
|
|
773
|
+
<a class="headerlink" href="#SpotifyClient.SpotifyConnectDirectory"></a>
|
|
774
|
+
|
|
775
|
+
<div class="docstring"><p>Spotify Connect Directory task is used to discover Spotify Connect devices, as well
|
|
776
|
+
as maintain the active device list.</p>
|
|
777
|
+
</div>
|
|
778
|
+
|
|
779
|
+
|
|
740
780
|
</div>
|
|
741
781
|
<div id="SpotifyClient.SpotifyConnectLoginId" class="classattr">
|
|
742
782
|
<div class="attr variable">
|
|
@@ -858,6 +898,27 @@ properties that require specific scope.</p>
|
|
|
858
898
|
</div>
|
|
859
899
|
|
|
860
900
|
|
|
901
|
+
</div>
|
|
902
|
+
<div id="SpotifyClient.StopSpotifyConnectDirectoryTask" class="classattr">
|
|
903
|
+
<div class="attr function">
|
|
904
|
+
|
|
905
|
+
<span class="def">def</span>
|
|
906
|
+
<span class="name">StopSpotifyConnectDirectoryTask</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">timeout</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">3.0</span></span><span class="return-annotation">) -> <span class="kc">None</span>:</span></span>
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
</div>
|
|
910
|
+
<a class="headerlink" href="#SpotifyClient.StopSpotifyConnectDirectoryTask"></a>
|
|
911
|
+
|
|
912
|
+
<div class="docstring"><p>Stops the Spotify Connect Directory task.</p>
|
|
913
|
+
|
|
914
|
+
<h6 id="arguments">Arguments:</h6>
|
|
915
|
+
|
|
916
|
+
<ul>
|
|
917
|
+
<li><strong>timeout (float):</strong> Time to wait (in seconds) for the task to stop.</li>
|
|
918
|
+
</ul>
|
|
919
|
+
</div>
|
|
920
|
+
|
|
921
|
+
|
|
861
922
|
</div>
|
|
862
923
|
<div id="SpotifyClient.MakeRequest" class="classattr">
|
|
863
924
|
<div class="attr function">
|
|
@@ -918,48 +979,6 @@ output response.</li>
|
|
|
918
979
|
</div>
|
|
919
980
|
|
|
920
981
|
|
|
921
|
-
</div>
|
|
922
|
-
<div id="SpotifyClient.AddPlayerQueueItem" class="classattr">
|
|
923
|
-
<div class="attr function">
|
|
924
|
-
|
|
925
|
-
<span class="def">def</span>
|
|
926
|
-
<span class="name">AddPlayerQueueItem</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">uri</span><span class="p">:</span> <span class="nb">str</span>, </span><span class="param"><span class="n">deviceId</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span></span><span class="return-annotation">) -> <span class="kc">None</span>:</span></span>
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
</div>
|
|
930
|
-
<a class="headerlink" href="#SpotifyClient.AddPlayerQueueItem"></a>
|
|
931
|
-
|
|
932
|
-
<div class="docstring"><p>DEPRECATED - use <code><a href="#SpotifyClient.AddPlayerQueueItems">AddPlayerQueueItems</a></code> method instead.</p>
|
|
933
|
-
|
|
934
|
-
<p>Add an item to the end of the user's current playback queue. </p>
|
|
935
|
-
|
|
936
|
-
<p>This method requires the <code>user-modify-playback-state</code> scope.</p>
|
|
937
|
-
|
|
938
|
-
<h6 id="arguments">Arguments:</h6>
|
|
939
|
-
|
|
940
|
-
<ul>
|
|
941
|
-
<li><strong>uri (str):</strong> The uri of the item to add to the queue; must be a track or an episode uri. <br />
|
|
942
|
-
Example: <code>spotify:track:4iV5W9uYEdYUVa79Axb7Rh</code></li>
|
|
943
|
-
<li><strong>deviceId (str):</strong> The id or name of the device this command is targeting. <br />
|
|
944
|
-
If not supplied, the user's currently active device is the target. <br />
|
|
945
|
-
Example: <code>0d1841b0976bae2a3a310dd74c0f3df354899bc8</code> <br />
|
|
946
|
-
Example: <code>Web Player (Chrome)</code> </li>
|
|
947
|
-
</ul>
|
|
948
|
-
|
|
949
|
-
<h6 id="raises">Raises:</h6>
|
|
950
|
-
|
|
951
|
-
<ul>
|
|
952
|
-
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
953
|
-
and the response contains error information.</li>
|
|
954
|
-
<li><strong>SpotifApiError:</strong> If the method fails for any other reason.</li>
|
|
955
|
-
</ul>
|
|
956
|
-
|
|
957
|
-
<p>This API only works for users who have Spotify Premium. </p>
|
|
958
|
-
|
|
959
|
-
<p>The order of execution is not guaranteed when you use this API with other Player API endpoints.</p>
|
|
960
|
-
</div>
|
|
961
|
-
|
|
962
|
-
|
|
963
982
|
</div>
|
|
964
983
|
<div id="SpotifyClient.AddPlayerQueueItems" class="classattr">
|
|
965
984
|
<div class="attr function">
|
|
@@ -1002,7 +1021,7 @@ Default is 0.15; value range is 0 - 10.</li>
|
|
|
1002
1021
|
<ul>
|
|
1003
1022
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1004
1023
|
and the response contains error information.</li>
|
|
1005
|
-
<li><strong>
|
|
1024
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1006
1025
|
</ul>
|
|
1007
1026
|
|
|
1008
1027
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -1016,8 +1035,8 @@ The Spotify Web API does not currently support adding more than 1 item to the qu
|
|
|
1016
1035
|
<summary>Sample Code</summary></p>
|
|
1017
1036
|
|
|
1018
1037
|
<div class="pdoc-code codehilite">
|
|
1019
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1020
|
-
<span class="kn">from</span>
|
|
1038
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1039
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1021
1040
|
|
|
1022
1041
|
<span class="k">try</span><span class="p">:</span>
|
|
1023
1042
|
|
|
@@ -1088,15 +1107,15 @@ The image must be in JPEG format, and cannot exceed 256KB in Base64 encoded size
|
|
|
1088
1107
|
<ul>
|
|
1089
1108
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1090
1109
|
and the response contains error information.</li>
|
|
1091
|
-
<li><strong>
|
|
1110
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1092
1111
|
</ul>
|
|
1093
1112
|
|
|
1094
1113
|
<p><details>
|
|
1095
1114
|
<summary>Sample Code</summary></p>
|
|
1096
1115
|
|
|
1097
1116
|
<div class="pdoc-code codehilite">
|
|
1098
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1099
|
-
<span class="kn">from</span>
|
|
1117
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1118
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1100
1119
|
|
|
1101
1120
|
<span class="k">try</span><span class="p">:</span>
|
|
1102
1121
|
|
|
@@ -1182,15 +1201,15 @@ Items are added in the order they are listed in the <code>uris</code> argument.<
|
|
|
1182
1201
|
<ul>
|
|
1183
1202
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1184
1203
|
and the response contains error information.</li>
|
|
1185
|
-
<li><strong>
|
|
1204
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1186
1205
|
</ul>
|
|
1187
1206
|
|
|
1188
1207
|
<p><details>
|
|
1189
1208
|
<summary>Sample Code</summary></p>
|
|
1190
1209
|
|
|
1191
1210
|
<div class="pdoc-code codehilite">
|
|
1192
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1193
|
-
<span class="kn">from</span>
|
|
1211
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1212
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1194
1213
|
|
|
1195
1214
|
<span class="k">try</span><span class="p">:</span>
|
|
1196
1215
|
|
|
@@ -1288,7 +1307,7 @@ The image must be in JPEG format, and cannot exceed 256KB in Base64 encoded size
|
|
|
1288
1307
|
<ul>
|
|
1289
1308
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1290
1309
|
and the response contains error information.</li>
|
|
1291
|
-
<li><strong>
|
|
1310
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1292
1311
|
</ul>
|
|
1293
1312
|
|
|
1294
1313
|
<p>Setting the <code>public</code> argument to true will publish the playlist on the user's profile,
|
|
@@ -1306,8 +1325,8 @@ upload the image after the playlist details are updated.</p>
|
|
|
1306
1325
|
<summary>Sample Code</summary></p>
|
|
1307
1326
|
|
|
1308
1327
|
<div class="pdoc-code codehilite">
|
|
1309
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1310
|
-
<span class="kn">from</span>
|
|
1328
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1329
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1311
1330
|
|
|
1312
1331
|
<span class="k">try</span><span class="p">:</span>
|
|
1313
1332
|
|
|
@@ -1402,15 +1421,15 @@ If null, the currently playing album uri id value is used.</li>
|
|
|
1402
1421
|
<ul>
|
|
1403
1422
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1404
1423
|
and the response contains error information.</li>
|
|
1405
|
-
<li><strong>
|
|
1424
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1406
1425
|
</ul>
|
|
1407
1426
|
|
|
1408
1427
|
<p><details>
|
|
1409
1428
|
<summary>Sample Code</summary></p>
|
|
1410
1429
|
|
|
1411
1430
|
<div class="pdoc-code codehilite">
|
|
1412
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1413
|
-
<span class="kn">from</span>
|
|
1431
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1432
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1414
1433
|
|
|
1415
1434
|
<span class="k">try</span><span class="p">:</span>
|
|
1416
1435
|
|
|
@@ -1490,15 +1509,15 @@ If null, the currently playing artist uri id value is used.</li>
|
|
|
1490
1509
|
<ul>
|
|
1491
1510
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1492
1511
|
and the response contains error information.</li>
|
|
1493
|
-
<li><strong>
|
|
1512
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1494
1513
|
</ul>
|
|
1495
1514
|
|
|
1496
1515
|
<p><details>
|
|
1497
1516
|
<summary>Sample Code</summary></p>
|
|
1498
1517
|
|
|
1499
1518
|
<div class="pdoc-code codehilite">
|
|
1500
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1501
|
-
<span class="kn">from</span>
|
|
1519
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1520
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1502
1521
|
|
|
1503
1522
|
<span class="k">try</span><span class="p">:</span>
|
|
1504
1523
|
|
|
@@ -1583,15 +1602,15 @@ If null, the currently playing audiobook uri id value is used.</li>
|
|
|
1583
1602
|
<ul>
|
|
1584
1603
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1585
1604
|
and the response contains error information.</li>
|
|
1586
|
-
<li><strong>
|
|
1605
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1587
1606
|
</ul>
|
|
1588
1607
|
|
|
1589
1608
|
<p><details>
|
|
1590
1609
|
<summary>Sample Code</summary></p>
|
|
1591
1610
|
|
|
1592
1611
|
<div class="pdoc-code codehilite">
|
|
1593
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1594
|
-
<span class="kn">from</span>
|
|
1612
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1613
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1595
1614
|
|
|
1596
1615
|
<span class="k">try</span><span class="p">:</span>
|
|
1597
1616
|
|
|
@@ -1672,15 +1691,15 @@ If null, the currently playing episode uri id value is used.</li>
|
|
|
1672
1691
|
<ul>
|
|
1673
1692
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1674
1693
|
and the response contains error information.</li>
|
|
1675
|
-
<li><strong>
|
|
1694
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1676
1695
|
</ul>
|
|
1677
1696
|
|
|
1678
1697
|
<p><details>
|
|
1679
1698
|
<summary>Sample Code</summary></p>
|
|
1680
1699
|
|
|
1681
1700
|
<div class="pdoc-code codehilite">
|
|
1682
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1683
|
-
<span class="kn">from</span>
|
|
1701
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1702
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1684
1703
|
|
|
1685
1704
|
<span class="k">try</span><span class="p">:</span>
|
|
1686
1705
|
|
|
@@ -1769,7 +1788,7 @@ Deprecated - A single item list containing current user's Spotify Username; Maxi
|
|
|
1769
1788
|
<ul>
|
|
1770
1789
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1771
1790
|
and the response contains error information.</li>
|
|
1772
|
-
<li><strong>
|
|
1791
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1773
1792
|
</ul>
|
|
1774
1793
|
|
|
1775
1794
|
<p>As of (at least) 2024/10/07, Spotify has deprecated the userId's argument;
|
|
@@ -1780,8 +1799,8 @@ generate a <code>400 Bad Request</code> error.</p>
|
|
|
1780
1799
|
<summary>Sample Code</summary></p>
|
|
1781
1800
|
|
|
1782
1801
|
<div class="pdoc-code codehilite">
|
|
1783
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1784
|
-
<span class="kn">from</span>
|
|
1802
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1803
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1785
1804
|
|
|
1786
1805
|
<span class="k">try</span><span class="p">:</span>
|
|
1787
1806
|
|
|
@@ -1853,15 +1872,15 @@ If null, the currently playing show uri id value is used.</li>
|
|
|
1853
1872
|
<ul>
|
|
1854
1873
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1855
1874
|
and the response contains error information.</li>
|
|
1856
|
-
<li><strong>
|
|
1875
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1857
1876
|
</ul>
|
|
1858
1877
|
|
|
1859
1878
|
<p><details>
|
|
1860
1879
|
<summary>Sample Code</summary></p>
|
|
1861
1880
|
|
|
1862
1881
|
<div class="pdoc-code codehilite">
|
|
1863
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1864
|
-
<span class="kn">from</span>
|
|
1882
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1883
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1865
1884
|
|
|
1866
1885
|
<span class="k">try</span><span class="p">:</span>
|
|
1867
1886
|
|
|
@@ -1942,15 +1961,15 @@ If null, the currently playing track uri id value is used.</li>
|
|
|
1942
1961
|
<ul>
|
|
1943
1962
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
1944
1963
|
and the response contains error information.</li>
|
|
1945
|
-
<li><strong>
|
|
1964
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
1946
1965
|
</ul>
|
|
1947
1966
|
|
|
1948
1967
|
<p><details>
|
|
1949
1968
|
<summary>Sample Code</summary></p>
|
|
1950
1969
|
|
|
1951
1970
|
<div class="pdoc-code codehilite">
|
|
1952
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
1953
|
-
<span class="kn">from</span>
|
|
1971
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1972
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
1954
1973
|
|
|
1955
1974
|
<span class="k">try</span><span class="p">:</span>
|
|
1956
1975
|
|
|
@@ -2029,15 +2048,15 @@ Example: <code>smedjan,smedjan123</code> </li>
|
|
|
2029
2048
|
<ul>
|
|
2030
2049
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2031
2050
|
and the response contains error information.</li>
|
|
2032
|
-
<li><strong>
|
|
2051
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2033
2052
|
</ul>
|
|
2034
2053
|
|
|
2035
2054
|
<p><details>
|
|
2036
2055
|
<summary>Sample Code</summary></p>
|
|
2037
2056
|
|
|
2038
2057
|
<div class="pdoc-code codehilite">
|
|
2039
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2040
|
-
<span class="kn">from</span>
|
|
2058
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2059
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2041
2060
|
|
|
2042
2061
|
<span class="k">try</span><span class="p">:</span>
|
|
2043
2062
|
|
|
@@ -2125,15 +2144,15 @@ Example: <code>5AC9ZXA7nJ7oGWO911FuDG</code></li>
|
|
|
2125
2144
|
<ul>
|
|
2126
2145
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2127
2146
|
and the response contains error information.</li>
|
|
2128
|
-
<li><strong>
|
|
2147
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2129
2148
|
</ul>
|
|
2130
2149
|
|
|
2131
2150
|
<p><details>
|
|
2132
2151
|
<summary>Sample Code</summary></p>
|
|
2133
2152
|
|
|
2134
2153
|
<div class="pdoc-code codehilite">
|
|
2135
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2136
|
-
<span class="kn">from</span>
|
|
2154
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2155
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2137
2156
|
|
|
2138
2157
|
<span class="k">try</span><span class="p">:</span>
|
|
2139
2158
|
|
|
@@ -2237,15 +2256,15 @@ upload the image after the playlist is created.</p>
|
|
|
2237
2256
|
<ul>
|
|
2238
2257
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2239
2258
|
and the response contains error information.</li>
|
|
2240
|
-
<li><strong>
|
|
2259
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2241
2260
|
</ul>
|
|
2242
2261
|
|
|
2243
2262
|
<p><details>
|
|
2244
2263
|
<summary>Sample Code</summary></p>
|
|
2245
2264
|
|
|
2246
2265
|
<div class="pdoc-code codehilite">
|
|
2247
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2248
|
-
<span class="kn">from</span>
|
|
2266
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2267
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2249
2268
|
|
|
2250
2269
|
<span class="k">try</span><span class="p">:</span>
|
|
2251
2270
|
|
|
@@ -2323,7 +2342,7 @@ If null, the currently playing track artist uri id value is used.</li>
|
|
|
2323
2342
|
<ul>
|
|
2324
2343
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2325
2344
|
and the response contains error information.</li>
|
|
2326
|
-
<li><strong>
|
|
2345
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2327
2346
|
</ul>
|
|
2328
2347
|
|
|
2329
2348
|
<p>No exception is raised if an artist is already followed.</p>
|
|
@@ -2332,8 +2351,8 @@ and the response contains error information.</li>
|
|
|
2332
2351
|
<summary>Sample Code</summary></p>
|
|
2333
2352
|
|
|
2334
2353
|
<div class="pdoc-code codehilite">
|
|
2335
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2336
|
-
<span class="kn">from</span>
|
|
2354
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2355
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2337
2356
|
|
|
2338
2357
|
<span class="k">try</span><span class="p">:</span>
|
|
2339
2358
|
|
|
@@ -2408,15 +2427,15 @@ Default is True. </li>
|
|
|
2408
2427
|
<ul>
|
|
2409
2428
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2410
2429
|
and the response contains error information.</li>
|
|
2411
|
-
<li><strong>
|
|
2430
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2412
2431
|
</ul>
|
|
2413
2432
|
|
|
2414
2433
|
<p><details>
|
|
2415
2434
|
<summary>Sample Code</summary></p>
|
|
2416
2435
|
|
|
2417
2436
|
<div class="pdoc-code codehilite">
|
|
2418
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2419
|
-
<span class="kn">from</span>
|
|
2437
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2438
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2420
2439
|
|
|
2421
2440
|
<span class="k">try</span><span class="p">:</span>
|
|
2422
2441
|
|
|
@@ -2491,7 +2510,7 @@ Example: <code>smedjan</code></li>
|
|
|
2491
2510
|
<ul>
|
|
2492
2511
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2493
2512
|
and the response contains error information.</li>
|
|
2494
|
-
<li><strong>
|
|
2513
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2495
2514
|
</ul>
|
|
2496
2515
|
|
|
2497
2516
|
<p>No exception is raised if a user is already followed.</p>
|
|
@@ -2500,8 +2519,8 @@ and the response contains error information.</li>
|
|
|
2500
2519
|
<summary>Sample Code</summary></p>
|
|
2501
2520
|
|
|
2502
2521
|
<div class="pdoc-code codehilite">
|
|
2503
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2504
|
-
<span class="kn">from</span>
|
|
2522
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2523
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2505
2524
|
|
|
2506
2525
|
<span class="k">try</span><span class="p">:</span>
|
|
2507
2526
|
|
|
@@ -2579,15 +2598,15 @@ Example: <code>ES</code></li>
|
|
|
2579
2598
|
<ul>
|
|
2580
2599
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2581
2600
|
and the response contains error information.</li>
|
|
2582
|
-
<li><strong>
|
|
2601
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2583
2602
|
</ul>
|
|
2584
2603
|
|
|
2585
2604
|
<p><details>
|
|
2586
2605
|
<summary>Sample Code</summary></p>
|
|
2587
2606
|
|
|
2588
2607
|
<div class="pdoc-code codehilite">
|
|
2589
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2590
|
-
<span class="kn">from</span>
|
|
2608
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2609
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2591
2610
|
|
|
2592
2611
|
<span class="k">try</span><span class="p">:</span>
|
|
2593
2612
|
|
|
@@ -2628,8 +2647,8 @@ and the response contains error information.</li>
|
|
|
2628
2647
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
2629
2648
|
|
|
2630
2649
|
<div class="pdoc-code codehilite">
|
|
2631
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2632
|
-
<span class="kn">from</span>
|
|
2650
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2651
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2633
2652
|
|
|
2634
2653
|
<span class="k">try</span><span class="p">:</span>
|
|
2635
2654
|
|
|
@@ -2724,15 +2743,15 @@ Default: True</li>
|
|
|
2724
2743
|
<ul>
|
|
2725
2744
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2726
2745
|
and the response contains error information.</li>
|
|
2727
|
-
<li><strong>
|
|
2746
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2728
2747
|
</ul>
|
|
2729
2748
|
|
|
2730
2749
|
<p><details>
|
|
2731
2750
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
2732
2751
|
|
|
2733
2752
|
<div class="pdoc-code codehilite">
|
|
2734
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2735
|
-
<span class="kn">from</span>
|
|
2753
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2754
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2736
2755
|
|
|
2737
2756
|
<span class="k">try</span><span class="p">:</span>
|
|
2738
2757
|
|
|
@@ -2786,8 +2805,8 @@ and the response contains error information.</li>
|
|
|
2786
2805
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
2787
2806
|
|
|
2788
2807
|
<div class="pdoc-code codehilite">
|
|
2789
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2790
|
-
<span class="kn">from</span>
|
|
2808
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2809
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2791
2810
|
|
|
2792
2811
|
<span class="k">try</span><span class="p">:</span>
|
|
2793
2812
|
|
|
@@ -2875,15 +2894,15 @@ Default: True</li>
|
|
|
2875
2894
|
<ul>
|
|
2876
2895
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
2877
2896
|
and the response contains error information.</li>
|
|
2878
|
-
<li><strong>
|
|
2897
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
2879
2898
|
</ul>
|
|
2880
2899
|
|
|
2881
2900
|
<p><details>
|
|
2882
2901
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
2883
2902
|
|
|
2884
2903
|
<div class="pdoc-code codehilite">
|
|
2885
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2886
|
-
<span class="kn">from</span>
|
|
2904
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2905
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2887
2906
|
|
|
2888
2907
|
<span class="k">try</span><span class="p">:</span>
|
|
2889
2908
|
|
|
@@ -2936,8 +2955,8 @@ and the response contains error information.</li>
|
|
|
2936
2955
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
2937
2956
|
|
|
2938
2957
|
<div class="pdoc-code codehilite">
|
|
2939
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
2940
|
-
<span class="kn">from</span>
|
|
2958
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2959
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
2941
2960
|
|
|
2942
2961
|
<span class="k">try</span><span class="p">:</span>
|
|
2943
2962
|
|
|
@@ -3014,15 +3033,15 @@ Example: <code>ES</code></li>
|
|
|
3014
3033
|
<ul>
|
|
3015
3034
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3016
3035
|
and the response contains error information.</li>
|
|
3017
|
-
<li><strong>
|
|
3036
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3018
3037
|
</ul>
|
|
3019
3038
|
|
|
3020
3039
|
<p><details>
|
|
3021
3040
|
<summary>Sample Code</summary></p>
|
|
3022
3041
|
|
|
3023
3042
|
<div class="pdoc-code codehilite">
|
|
3024
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3025
|
-
<span class="kn">from</span>
|
|
3043
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3044
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3026
3045
|
|
|
3027
3046
|
<span class="k">try</span><span class="p">:</span>
|
|
3028
3047
|
|
|
@@ -3120,15 +3139,15 @@ Default: None (disabled)</li>
|
|
|
3120
3139
|
<ul>
|
|
3121
3140
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3122
3141
|
and the response contains error information.</li>
|
|
3123
|
-
<li><strong>
|
|
3142
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3124
3143
|
</ul>
|
|
3125
3144
|
|
|
3126
3145
|
<p><details>
|
|
3127
3146
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
3128
3147
|
|
|
3129
3148
|
<div class="pdoc-code codehilite">
|
|
3130
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3131
|
-
<span class="kn">from</span>
|
|
3149
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3150
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3132
3151
|
|
|
3133
3152
|
<span class="k">try</span><span class="p">:</span>
|
|
3134
3153
|
|
|
@@ -3186,8 +3205,8 @@ and the response contains error information.</li>
|
|
|
3186
3205
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
3187
3206
|
|
|
3188
3207
|
<div class="pdoc-code codehilite">
|
|
3189
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3190
|
-
<span class="kn">from</span>
|
|
3208
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3209
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3191
3210
|
|
|
3192
3211
|
<span class="k">try</span><span class="p">:</span>
|
|
3193
3212
|
|
|
@@ -3259,15 +3278,15 @@ is required to correctly read the currently playing context.</li>
|
|
|
3259
3278
|
<ul>
|
|
3260
3279
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3261
3280
|
and the response contains error information.</li>
|
|
3262
|
-
<li><strong>
|
|
3281
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3263
3282
|
</ul>
|
|
3264
3283
|
|
|
3265
3284
|
<p><details>
|
|
3266
3285
|
<summary>Sample Code</summary></p>
|
|
3267
3286
|
|
|
3268
3287
|
<div class="pdoc-code codehilite">
|
|
3269
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3270
|
-
<span class="kn">from</span>
|
|
3288
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3289
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3271
3290
|
|
|
3272
3291
|
<span class="k">try</span><span class="p">:</span>
|
|
3273
3292
|
|
|
@@ -3298,8 +3317,8 @@ and the response contains error information.</li>
|
|
|
3298
3317
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
3299
3318
|
|
|
3300
3319
|
<div class="pdoc-code codehilite">
|
|
3301
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3302
|
-
<span class="kn">from</span>
|
|
3320
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3321
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3303
3322
|
|
|
3304
3323
|
<span class="k">try</span><span class="p">:</span>
|
|
3305
3324
|
|
|
@@ -3389,15 +3408,15 @@ Default: True</li>
|
|
|
3389
3408
|
<ul>
|
|
3390
3409
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3391
3410
|
and the response contains error information.</li>
|
|
3392
|
-
<li><strong>
|
|
3411
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3393
3412
|
</ul>
|
|
3394
3413
|
|
|
3395
3414
|
<p><details>
|
|
3396
3415
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
3397
3416
|
|
|
3398
3417
|
<div class="pdoc-code codehilite">
|
|
3399
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3400
|
-
<span class="kn">from</span>
|
|
3418
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3419
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3401
3420
|
|
|
3402
3421
|
<span class="k">try</span><span class="p">:</span>
|
|
3403
3422
|
|
|
@@ -3452,8 +3471,8 @@ and the response contains error information.</li>
|
|
|
3452
3471
|
<summary>Sample Code - auto Paging</summary></p>
|
|
3453
3472
|
|
|
3454
3473
|
<div class="pdoc-code codehilite">
|
|
3455
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3456
|
-
<span class="kn">from</span>
|
|
3474
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3475
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3457
3476
|
|
|
3458
3477
|
<span class="k">try</span><span class="p">:</span>
|
|
3459
3478
|
|
|
@@ -3527,15 +3546,15 @@ is required to correctly read the currently playing context.</li>
|
|
|
3527
3546
|
<ul>
|
|
3528
3547
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3529
3548
|
and the response contains error information.</li>
|
|
3530
|
-
<li><strong>
|
|
3549
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3531
3550
|
</ul>
|
|
3532
3551
|
|
|
3533
3552
|
<p><details>
|
|
3534
3553
|
<summary>Sample Code</summary></p>
|
|
3535
3554
|
|
|
3536
3555
|
<div class="pdoc-code codehilite">
|
|
3537
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3538
|
-
<span class="kn">from</span>
|
|
3556
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3557
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3539
3558
|
|
|
3540
3559
|
<span class="k">try</span><span class="p">:</span>
|
|
3541
3560
|
|
|
@@ -3610,15 +3629,15 @@ Default: True</li>
|
|
|
3610
3629
|
<ul>
|
|
3611
3630
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3612
3631
|
and the response contains error information.</li>
|
|
3613
|
-
<li><strong>
|
|
3632
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3614
3633
|
</ul>
|
|
3615
3634
|
|
|
3616
3635
|
<p><details>
|
|
3617
3636
|
<summary>Sample Code</summary></p>
|
|
3618
3637
|
|
|
3619
3638
|
<div class="pdoc-code codehilite">
|
|
3620
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3621
|
-
<span class="kn">from</span>
|
|
3639
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3640
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3622
3641
|
|
|
3623
3642
|
<span class="k">try</span><span class="p">:</span>
|
|
3624
3643
|
|
|
@@ -3686,15 +3705,15 @@ Example: <code>2CIMQHirSU0MQqyYHq0eOx,1vCWHaC5f2uS3yhpwWbIA6</code></li>
|
|
|
3686
3705
|
<ul>
|
|
3687
3706
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3688
3707
|
and the response contains error information.</li>
|
|
3689
|
-
<li><strong>
|
|
3708
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3690
3709
|
</ul>
|
|
3691
3710
|
|
|
3692
3711
|
<p><details>
|
|
3693
3712
|
<summary>Sample Code</summary></p>
|
|
3694
3713
|
|
|
3695
3714
|
<div class="pdoc-code codehilite">
|
|
3696
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3697
|
-
<span class="kn">from</span>
|
|
3715
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3716
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3698
3717
|
|
|
3699
3718
|
<span class="k">try</span><span class="p">:</span>
|
|
3700
3719
|
|
|
@@ -3773,15 +3792,15 @@ Default: True</li>
|
|
|
3773
3792
|
<ul>
|
|
3774
3793
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3775
3794
|
and the response contains error information.</li>
|
|
3776
|
-
<li><strong>
|
|
3795
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3777
3796
|
</ul>
|
|
3778
3797
|
|
|
3779
3798
|
<p><details>
|
|
3780
3799
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
3781
3800
|
|
|
3782
3801
|
<div class="pdoc-code codehilite">
|
|
3783
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3784
|
-
<span class="kn">from</span>
|
|
3802
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3803
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3785
3804
|
|
|
3786
3805
|
<span class="k">try</span><span class="p">:</span>
|
|
3787
3806
|
|
|
@@ -3840,8 +3859,8 @@ and the response contains error information.</li>
|
|
|
3840
3859
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
3841
3860
|
|
|
3842
3861
|
<div class="pdoc-code codehilite">
|
|
3843
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3844
|
-
<span class="kn">from</span>
|
|
3862
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3863
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3845
3864
|
|
|
3846
3865
|
<span class="k">try</span><span class="p">:</span>
|
|
3847
3866
|
|
|
@@ -3928,15 +3947,15 @@ Default: True</li>
|
|
|
3928
3947
|
<ul>
|
|
3929
3948
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
3930
3949
|
and the response contains error information.</li>
|
|
3931
|
-
<li><strong>
|
|
3950
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
3932
3951
|
</ul>
|
|
3933
3952
|
|
|
3934
3953
|
<p><details>
|
|
3935
3954
|
<summary>Sample Code</summary></p>
|
|
3936
3955
|
|
|
3937
3956
|
<div class="pdoc-code codehilite">
|
|
3938
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
3939
|
-
<span class="kn">from</span>
|
|
3957
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3958
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
3940
3959
|
|
|
3941
3960
|
<span class="k">try</span><span class="p">:</span>
|
|
3942
3961
|
|
|
@@ -4014,7 +4033,7 @@ Example: <code>ES</code></li>
|
|
|
4014
4033
|
<ul>
|
|
4015
4034
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4016
4035
|
and the response contains error information.</li>
|
|
4017
|
-
<li><strong>
|
|
4036
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4018
4037
|
</ul>
|
|
4019
4038
|
|
|
4020
4039
|
<p>Important policy notes: </p>
|
|
@@ -4029,8 +4048,8 @@ and the response contains error information.</li>
|
|
|
4029
4048
|
<summary>Sample Code</summary></p>
|
|
4030
4049
|
|
|
4031
4050
|
<div class="pdoc-code codehilite">
|
|
4032
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4033
|
-
<span class="kn">from</span>
|
|
4051
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4052
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4034
4053
|
|
|
4035
4054
|
<span class="k">try</span><span class="p">:</span>
|
|
4036
4055
|
|
|
@@ -4088,8 +4107,8 @@ and the response contains error information.</li>
|
|
|
4088
4107
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
4089
4108
|
|
|
4090
4109
|
<div class="pdoc-code codehilite">
|
|
4091
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4092
|
-
<span class="kn">from</span>
|
|
4110
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4111
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4093
4112
|
|
|
4094
4113
|
<span class="k">try</span><span class="p">:</span>
|
|
4095
4114
|
|
|
@@ -4201,15 +4220,15 @@ Default: None (disabled)</li>
|
|
|
4201
4220
|
<ul>
|
|
4202
4221
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4203
4222
|
and the response contains error information.</li>
|
|
4204
|
-
<li><strong>
|
|
4223
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4205
4224
|
</ul>
|
|
4206
4225
|
|
|
4207
4226
|
<p><details>
|
|
4208
4227
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
4209
4228
|
|
|
4210
4229
|
<div class="pdoc-code codehilite">
|
|
4211
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4212
|
-
<span class="kn">from</span>
|
|
4230
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4231
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4213
4232
|
|
|
4214
4233
|
<span class="k">try</span><span class="p">:</span>
|
|
4215
4234
|
|
|
@@ -4278,8 +4297,8 @@ and the response contains error information.</li>
|
|
|
4278
4297
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
4279
4298
|
|
|
4280
4299
|
<div class="pdoc-code codehilite">
|
|
4281
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4282
|
-
<span class="kn">from</span>
|
|
4300
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4301
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4283
4302
|
|
|
4284
4303
|
<span class="k">try</span><span class="p">:</span>
|
|
4285
4304
|
|
|
@@ -4374,15 +4393,15 @@ Default: True</li>
|
|
|
4374
4393
|
<ul>
|
|
4375
4394
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4376
4395
|
and the response contains error information.</li>
|
|
4377
|
-
<li><strong>
|
|
4396
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4378
4397
|
</ul>
|
|
4379
4398
|
|
|
4380
4399
|
<p><details>
|
|
4381
4400
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
4382
4401
|
|
|
4383
4402
|
<div class="pdoc-code codehilite">
|
|
4384
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4385
|
-
<span class="kn">from</span>
|
|
4403
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4404
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4386
4405
|
|
|
4387
4406
|
<span class="k">try</span><span class="p">:</span>
|
|
4388
4407
|
|
|
@@ -4441,8 +4460,8 @@ and the response contains error information.</li>
|
|
|
4441
4460
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
4442
4461
|
|
|
4443
4462
|
<div class="pdoc-code codehilite">
|
|
4444
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4445
|
-
<span class="kn">from</span>
|
|
4463
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4464
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4446
4465
|
|
|
4447
4466
|
<span class="k">try</span><span class="p">:</span>
|
|
4448
4467
|
|
|
@@ -4516,7 +4535,7 @@ Example: <code>ES</code></li>
|
|
|
4516
4535
|
<ul>
|
|
4517
4536
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4518
4537
|
and the response contains error information.</li>
|
|
4519
|
-
<li><strong>
|
|
4538
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4520
4539
|
</ul>
|
|
4521
4540
|
|
|
4522
4541
|
<p>Important policy notes: </p>
|
|
@@ -4531,8 +4550,8 @@ and the response contains error information.</li>
|
|
|
4531
4550
|
<summary>Sample Code</summary></p>
|
|
4532
4551
|
|
|
4533
4552
|
<div class="pdoc-code codehilite">
|
|
4534
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4535
|
-
<span class="kn">from</span>
|
|
4553
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4554
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4536
4555
|
|
|
4537
4556
|
<span class="k">try</span><span class="p">:</span>
|
|
4538
4557
|
|
|
@@ -4617,7 +4636,7 @@ creates a caches list of <code>Category</code> objects).</li>
|
|
|
4617
4636
|
<ul>
|
|
4618
4637
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4619
4638
|
and the response contains error information.</li>
|
|
4620
|
-
<li><strong>
|
|
4639
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4621
4640
|
</ul>
|
|
4622
4641
|
|
|
4623
4642
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -4628,8 +4647,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
4628
4647
|
<summary>Sample Code</summary></p>
|
|
4629
4648
|
|
|
4630
4649
|
<div class="pdoc-code codehilite">
|
|
4631
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4632
|
-
<span class="kn">from</span>
|
|
4650
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4651
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4633
4652
|
|
|
4634
4653
|
<span class="k">try</span><span class="p">:</span>
|
|
4635
4654
|
|
|
@@ -4726,15 +4745,15 @@ Default: True</li>
|
|
|
4726
4745
|
<ul>
|
|
4727
4746
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4728
4747
|
and the response contains error information.</li>
|
|
4729
|
-
<li><strong>
|
|
4748
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4730
4749
|
</ul>
|
|
4731
4750
|
|
|
4732
4751
|
<p><details>
|
|
4733
4752
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
4734
4753
|
|
|
4735
4754
|
<div class="pdoc-code codehilite">
|
|
4736
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4737
|
-
<span class="kn">from</span>
|
|
4755
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4756
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4738
4757
|
|
|
4739
4758
|
<span class="k">try</span><span class="p">:</span>
|
|
4740
4759
|
|
|
@@ -4791,8 +4810,8 @@ and the response contains error information.</li>
|
|
|
4791
4810
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
4792
4811
|
|
|
4793
4812
|
<div class="pdoc-code codehilite">
|
|
4794
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4795
|
-
<span class="kn">from</span>
|
|
4813
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4814
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4796
4815
|
|
|
4797
4816
|
<span class="k">try</span><span class="p">:</span>
|
|
4798
4817
|
|
|
@@ -4874,7 +4893,7 @@ update the cache; otherwise, False to just return the cached value. </li>
|
|
|
4874
4893
|
<ul>
|
|
4875
4894
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4876
4895
|
and the response contains error information.</li>
|
|
4877
|
-
<li><strong>
|
|
4896
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4878
4897
|
</ul>
|
|
4879
4898
|
|
|
4880
4899
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -4885,8 +4904,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
4885
4904
|
<summary>Sample Code</summary></p>
|
|
4886
4905
|
|
|
4887
4906
|
<div class="pdoc-code codehilite">
|
|
4888
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
4889
|
-
<span class="kn">from</span>
|
|
4907
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4908
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
4890
4909
|
|
|
4891
4910
|
<span class="k">try</span><span class="p">:</span>
|
|
4892
4911
|
|
|
@@ -4991,7 +5010,7 @@ Default: True</li>
|
|
|
4991
5010
|
<ul>
|
|
4992
5011
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
4993
5012
|
and the response contains error information.</li>
|
|
4994
|
-
<li><strong>
|
|
5013
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
4995
5014
|
</ul>
|
|
4996
5015
|
|
|
4997
5016
|
<p>The following are special undocumented category ID's that I have found: </p>
|
|
@@ -5004,8 +5023,8 @@ and the response contains error information.</li>
|
|
|
5004
5023
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
5005
5024
|
|
|
5006
5025
|
<div class="pdoc-code codehilite">
|
|
5007
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5008
|
-
<span class="kn">from</span>
|
|
5026
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5027
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5009
5028
|
|
|
5010
5029
|
<span class="k">try</span><span class="p">:</span>
|
|
5011
5030
|
|
|
@@ -5065,8 +5084,8 @@ and the response contains error information.</li>
|
|
|
5065
5084
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
5066
5085
|
|
|
5067
5086
|
<div class="pdoc-code codehilite">
|
|
5068
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5069
|
-
<span class="kn">from</span>
|
|
5087
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5088
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5070
5089
|
|
|
5071
5090
|
<span class="k">try</span><span class="p">:</span>
|
|
5072
5091
|
|
|
@@ -5108,8 +5127,8 @@ and the response contains error information.</li>
|
|
|
5108
5127
|
<summary>Sample Code - Made For You Playlists</summary></p>
|
|
5109
5128
|
|
|
5110
5129
|
<div class="pdoc-code codehilite">
|
|
5111
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5112
|
-
<span class="kn">from</span>
|
|
5130
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5131
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5113
5132
|
|
|
5114
5133
|
<span class="k">try</span><span class="p">:</span>
|
|
5115
5134
|
|
|
@@ -5194,7 +5213,7 @@ if a response error is detected (default).</li>
|
|
|
5194
5213
|
<ul>
|
|
5195
5214
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5196
5215
|
and the response contains error information.</li>
|
|
5197
|
-
<li><strong>
|
|
5216
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5198
5217
|
</ul>
|
|
5199
5218
|
|
|
5200
5219
|
<p>Important policy notes: </p>
|
|
@@ -5209,8 +5228,8 @@ and the response contains error information.</li>
|
|
|
5209
5228
|
<summary>Sample Code</summary></p>
|
|
5210
5229
|
|
|
5211
5230
|
<div class="pdoc-code codehilite">
|
|
5212
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5213
|
-
<span class="kn">from</span>
|
|
5231
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5232
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5214
5233
|
|
|
5215
5234
|
<span class="k">try</span><span class="p">:</span>
|
|
5216
5235
|
|
|
@@ -5284,7 +5303,7 @@ Example: <code>ES</code></li>
|
|
|
5284
5303
|
<ul>
|
|
5285
5304
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5286
5305
|
and the response contains error information.</li>
|
|
5287
|
-
<li><strong>
|
|
5306
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5288
5307
|
</ul>
|
|
5289
5308
|
|
|
5290
5309
|
<p>Important policy notes: </p>
|
|
@@ -5299,8 +5318,8 @@ and the response contains error information.</li>
|
|
|
5299
5318
|
<summary>Sample Code</summary></p>
|
|
5300
5319
|
|
|
5301
5320
|
<div class="pdoc-code codehilite">
|
|
5302
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5303
|
-
<span class="kn">from</span>
|
|
5321
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5322
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5304
5323
|
|
|
5305
5324
|
<span class="k">try</span><span class="p">:</span>
|
|
5306
5325
|
|
|
@@ -5424,7 +5443,7 @@ Example: <code>ES</code></li>
|
|
|
5424
5443
|
<ul>
|
|
5425
5444
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5426
5445
|
and the response contains error information.</li>
|
|
5427
|
-
<li><strong>
|
|
5446
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5428
5447
|
</ul>
|
|
5429
5448
|
|
|
5430
5449
|
<p>Important policy notes: </p>
|
|
@@ -5439,8 +5458,8 @@ and the response contains error information.</li>
|
|
|
5439
5458
|
<summary>Sample Code</summary></p>
|
|
5440
5459
|
|
|
5441
5460
|
<div class="pdoc-code codehilite">
|
|
5442
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5443
|
-
<span class="kn">from</span>
|
|
5461
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5462
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5444
5463
|
|
|
5445
5464
|
<span class="k">try</span><span class="p">:</span>
|
|
5446
5465
|
|
|
@@ -5528,15 +5547,15 @@ Default: True</li>
|
|
|
5528
5547
|
<ul>
|
|
5529
5548
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5530
5549
|
and the response contains error information.</li>
|
|
5531
|
-
<li><strong>
|
|
5550
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5532
5551
|
</ul>
|
|
5533
5552
|
|
|
5534
5553
|
<p><details>
|
|
5535
5554
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
5536
5555
|
|
|
5537
5556
|
<div class="pdoc-code codehilite">
|
|
5538
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5539
|
-
<span class="kn">from</span>
|
|
5557
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5558
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5540
5559
|
|
|
5541
5560
|
<span class="k">try</span><span class="p">:</span>
|
|
5542
5561
|
|
|
@@ -5604,8 +5623,8 @@ and the response contains error information.</li>
|
|
|
5604
5623
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
5605
5624
|
|
|
5606
5625
|
<div class="pdoc-code codehilite">
|
|
5607
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5608
|
-
<span class="kn">from</span>
|
|
5626
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5627
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5609
5628
|
|
|
5610
5629
|
<span class="k">try</span><span class="p">:</span>
|
|
5611
5630
|
|
|
@@ -5693,7 +5712,7 @@ Example: <code>ES</code></li>
|
|
|
5693
5712
|
<ul>
|
|
5694
5713
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5695
5714
|
and the response contains error information.</li>
|
|
5696
|
-
<li><strong>
|
|
5715
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5697
5716
|
</ul>
|
|
5698
5717
|
|
|
5699
5718
|
<p>Important policy notes: </p>
|
|
@@ -5708,8 +5727,8 @@ and the response contains error information.</li>
|
|
|
5708
5727
|
<summary>Sample Code</summary></p>
|
|
5709
5728
|
|
|
5710
5729
|
<div class="pdoc-code codehilite">
|
|
5711
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5712
|
-
<span class="kn">from</span>
|
|
5730
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5731
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5713
5732
|
|
|
5714
5733
|
<span class="k">try</span><span class="p">:</span>
|
|
5715
5734
|
|
|
@@ -5831,15 +5850,15 @@ Default: True</li>
|
|
|
5831
5850
|
<ul>
|
|
5832
5851
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5833
5852
|
and the response contains error information.</li>
|
|
5834
|
-
<li><strong>
|
|
5853
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5835
5854
|
</ul>
|
|
5836
5855
|
|
|
5837
5856
|
<p><details>
|
|
5838
5857
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
5839
5858
|
|
|
5840
5859
|
<div class="pdoc-code codehilite">
|
|
5841
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5842
|
-
<span class="kn">from</span>
|
|
5860
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5861
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5843
5862
|
|
|
5844
5863
|
<span class="k">try</span><span class="p">:</span>
|
|
5845
5864
|
|
|
@@ -5898,8 +5917,8 @@ and the response contains error information.</li>
|
|
|
5898
5917
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
5899
5918
|
|
|
5900
5919
|
<div class="pdoc-code codehilite">
|
|
5901
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5902
|
-
<span class="kn">from</span>
|
|
5920
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5921
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5903
5922
|
|
|
5904
5923
|
<span class="k">try</span><span class="p">:</span>
|
|
5905
5924
|
|
|
@@ -5977,7 +5996,7 @@ update the cache; otherwise, False to just return the cached value.</li>
|
|
|
5977
5996
|
<ul>
|
|
5978
5997
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
5979
5998
|
and the response contains error information.</li>
|
|
5980
|
-
<li><strong>
|
|
5999
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
5981
6000
|
</ul>
|
|
5982
6001
|
|
|
5983
6002
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -5988,8 +6007,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
5988
6007
|
<summary>Sample Code</summary></p>
|
|
5989
6008
|
|
|
5990
6009
|
<div class="pdoc-code codehilite">
|
|
5991
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
5992
|
-
<span class="kn">from</span>
|
|
6010
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6011
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
5993
6012
|
|
|
5994
6013
|
<span class="k">try</span><span class="p">:</span>
|
|
5995
6014
|
|
|
@@ -6096,7 +6115,7 @@ update the cache; otherwise, False to just return the cached value.</li>
|
|
|
6096
6115
|
<ul>
|
|
6097
6116
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6098
6117
|
and the response contains error information.</li>
|
|
6099
|
-
<li><strong>
|
|
6118
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6100
6119
|
</ul>
|
|
6101
6120
|
|
|
6102
6121
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -6107,8 +6126,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
6107
6126
|
<summary>Sample Code</summary></p>
|
|
6108
6127
|
|
|
6109
6128
|
<div class="pdoc-code codehilite">
|
|
6110
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6111
|
-
<span class="kn">from</span>
|
|
6129
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6130
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6112
6131
|
|
|
6113
6132
|
<span class="k">try</span><span class="p">:</span>
|
|
6114
6133
|
|
|
@@ -6153,33 +6172,6 @@ the spotify web api request. This results in better performance.</p>
|
|
|
6153
6172
|
</div>
|
|
6154
6173
|
|
|
6155
6174
|
|
|
6156
|
-
</div>
|
|
6157
|
-
<div id="SpotifyClient.VerifyPlayerActiveDeviceId" class="classattr">
|
|
6158
|
-
<div class="attr function">
|
|
6159
|
-
|
|
6160
|
-
<span class="def">def</span>
|
|
6161
|
-
<span class="name">VerifyPlayerActiveDeviceId</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span>
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
</div>
|
|
6165
|
-
<a class="headerlink" href="#SpotifyClient.VerifyPlayerActiveDeviceId"></a>
|
|
6166
|
-
|
|
6167
|
-
<div class="docstring"><p>Verifies that there is an active Spotify player device id, and returns the <code><a href="#SpotifyClient.DefaultDeviceId">DefaultDeviceId</a></code>
|
|
6168
|
-
value if there is not; otherwise, a null is returned to indicate that the currently active
|
|
6169
|
-
Spotify player will be used.</p>
|
|
6170
|
-
|
|
6171
|
-
<p>Note that if there is no active player and there was no <code><a href="#SpotifyClient.DefaultDeviceId">DefaultDeviceId</a></code> defined, then
|
|
6172
|
-
subsequent calls to the Spotify Web API player endpoints will probably fail with a
|
|
6173
|
-
"No Active Device" exception.</p>
|
|
6174
|
-
|
|
6175
|
-
<h6 id="returns">Returns:</h6>
|
|
6176
|
-
|
|
6177
|
-
<blockquote>
|
|
6178
|
-
<p>A device id or null value.</p>
|
|
6179
|
-
</blockquote>
|
|
6180
|
-
</div>
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
6175
|
</div>
|
|
6184
6176
|
<div id="SpotifyClient.GetPlayerDevice" class="classattr">
|
|
6185
6177
|
<div class="attr function">
|
|
@@ -6215,7 +6207,7 @@ device.</li>
|
|
|
6215
6207
|
<ul>
|
|
6216
6208
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6217
6209
|
and the response contains error information.</li>
|
|
6218
|
-
<li><strong>
|
|
6210
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6219
6211
|
</ul>
|
|
6220
6212
|
|
|
6221
6213
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -6226,8 +6218,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
6226
6218
|
<summary>Sample Code</summary></p>
|
|
6227
6219
|
|
|
6228
6220
|
<div class="pdoc-code codehilite">
|
|
6229
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6230
|
-
<span class="kn">from</span>
|
|
6221
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6222
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6231
6223
|
|
|
6232
6224
|
<span class="k">try</span><span class="p">:</span>
|
|
6233
6225
|
|
|
@@ -6282,123 +6274,6 @@ the spotify web api request. This results in better performance.</p>
|
|
|
6282
6274
|
</code></pre>
|
|
6283
6275
|
</div>
|
|
6284
6276
|
|
|
6285
|
-
<p></details></p>
|
|
6286
|
-
</div>
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
</div>
|
|
6290
|
-
<div id="SpotifyClient.PlayerActivateDevices" class="classattr">
|
|
6291
|
-
<div class="attr function">
|
|
6292
|
-
|
|
6293
|
-
<span class="def">def</span>
|
|
6294
|
-
<span class="name">PlayerActivateDevices</span><span class="signature pdoc-code condensed">(<span class="param"><span class="bp">self</span>, </span><span class="param"><span class="n">verifyUserContext</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>, </span><span class="param"><span class="n">delay</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.25</span></span><span class="return-annotation">) -> <span class="nb">str</span>:</span></span>
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
</div>
|
|
6298
|
-
<a class="headerlink" href="#SpotifyClient.PlayerActivateDevices"></a>
|
|
6299
|
-
|
|
6300
|
-
<div class="docstring"><p>Activates all static Spotify Connect player devices, and (optionally) switches the active user
|
|
6301
|
-
context to the current user context.</p>
|
|
6302
|
-
|
|
6303
|
-
<h6 id="arguments">Arguments:</h6>
|
|
6304
|
-
|
|
6305
|
-
<ul>
|
|
6306
|
-
<li><strong>verifyUserContext (bool):</strong> If True, the active user context of the resolved device is checked to ensure it
|
|
6307
|
-
matches the user context specified on the class constructor.
|
|
6308
|
-
If False, the user context will not be checked.
|
|
6309
|
-
Default is False.</li>
|
|
6310
|
-
<li><strong>delay (float):</strong> Time delay (in seconds) to wait AFTER issuing the final Connect command (if necessary).
|
|
6311
|
-
This delay will give the spotify web api time to process the device list change before
|
|
6312
|
-
another command is issued. <br />
|
|
6313
|
-
Default is 0.25; value range is 0 - 10.</li>
|
|
6314
|
-
</ul>
|
|
6315
|
-
|
|
6316
|
-
<h6 id="returns">Returns:</h6>
|
|
6317
|
-
|
|
6318
|
-
<blockquote>
|
|
6319
|
-
<p>A string that contains status text.</p>
|
|
6320
|
-
</blockquote>
|
|
6321
|
-
|
|
6322
|
-
<h6 id="raises">Raises:</h6>
|
|
6323
|
-
|
|
6324
|
-
<ul>
|
|
6325
|
-
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6326
|
-
and the response contains error information.</li>
|
|
6327
|
-
<li><strong>SpotifyZeroconfApiError:</strong> If any Spotify Zeroconf API request failed. </li>
|
|
6328
|
-
<li><strong>SpotifApiError:</strong> If the <code>spotifyConnectLoginId</code> argument was not specified for the class contructor. <br />
|
|
6329
|
-
If the <code>spotifyConnectUsername</code> argument was not specified for the class contructor. <br />
|
|
6330
|
-
If the <code>spotifyConnectPassword</code> argument was not specified for the class contructor. <br />
|
|
6331
|
-
If the method fails for any other reason.</li>
|
|
6332
|
-
</ul>
|
|
6333
|
-
|
|
6334
|
-
<p>A Zeroconf discovery process is initiated to search for all Spotify Connect devices connected
|
|
6335
|
-
to the local network. It will then iterate through the returned devices and perform the
|
|
6336
|
-
following on each one: </p>
|
|
6337
|
-
|
|
6338
|
-
<ul>
|
|
6339
|
-
<li>call Spotify Zeroconf API <code>getInfo</code> endpoint to retrieve device information. </li>
|
|
6340
|
-
<li>call Spotify Zeroconf API <code>resetUsers</code> endpoint to disconnect the device. This step is omitted
|
|
6341
|
-
for dynamic devices (see note below). Note that this will force any users that are connected to
|
|
6342
|
-
the device off of the device. </li>
|
|
6343
|
-
<li>call Spotify Zeroconf API <code>addUser</code> endpoint to connect the device. This step is omitted for
|
|
6344
|
-
dynamic devices (see note below). This should "re-awaken" the device if necessary, and make it
|
|
6345
|
-
ready for immediate use. </li>
|
|
6346
|
-
</ul>
|
|
6347
|
-
|
|
6348
|
-
<p>Dynamic Spotify Connect devices are not processed by this method, as they are temporary devices and
|
|
6349
|
-
are already active and in the device list. These devices are not found in Zeroconf discovery process,
|
|
6350
|
-
and only exist in the player device list. These are usually Spotify Connect web or mobile players
|
|
6351
|
-
with temporary device id's. </p>
|
|
6352
|
-
|
|
6353
|
-
<p>Note that the SpotifyConnectUsername, SpotifyConnectPassword, and SpotifyConnectLoginId arguments must
|
|
6354
|
-
be specified on the class contructor in order to use this method. They are all required in order to
|
|
6355
|
-
reactivate a Spotify Connect device.</p>
|
|
6356
|
-
|
|
6357
|
-
<p><details>
|
|
6358
|
-
<summary>Sample Code</summary></p>
|
|
6359
|
-
|
|
6360
|
-
<div class="pdoc-code codehilite">
|
|
6361
|
-
<pre><span></span><code><span class="kn">from</span> <span class="nn">spotifywebapipython</span> <span class="kn">import</span> <span class="o">*</span>
|
|
6362
|
-
<span class="kn">from</span> <span class="nn">spotifywebapipython.models</span> <span class="kn">import</span> <span class="o">*</span>
|
|
6363
|
-
|
|
6364
|
-
<span class="k">try</span><span class="p">:</span>
|
|
6365
|
-
|
|
6366
|
-
<span class="c1"># this sample requires an authorization token, as it requires security scope to accesses user data.</span>
|
|
6367
|
-
|
|
6368
|
-
<span class="n">CLIENT_ID</span><span class="p">:</span><span class="nb">str</span> <span class="o">=</span> <span class="s1">'your_client_id'</span>
|
|
6369
|
-
<span class="n">SPOTIFY_SCOPES</span><span class="p">:</span><span class="nb">list</span> <span class="o">=</span> \
|
|
6370
|
-
<span class="p">[</span>
|
|
6371
|
-
<span class="s1">'user-read-playback-state'</span><span class="p">,</span>
|
|
6372
|
-
<span class="s1">'user-read-email'</span><span class="p">,</span>
|
|
6373
|
-
<span class="p">]</span>
|
|
6374
|
-
|
|
6375
|
-
<span class="c1"># create new spotify client instance, passing the Spotify Connect user context and discovery timeout.</span>
|
|
6376
|
-
<span class="n">spotify</span><span class="p">:</span><span class="n">SpotifyClient</span> <span class="o">=</span> <span class="n">SpotifyClient</span><span class="p">(</span>
|
|
6377
|
-
<span class="n">spotifyConnectUsername</span><span class="o">=</span><span class="s2">"yourSpotifyUsername"</span><span class="p">,</span> <span class="c1"># (e.g. 'yourname@gmail.com', '1234567890', etc)</span>
|
|
6378
|
-
<span class="n">spotifyConnectPassword</span><span class="o">=</span><span class="s2">"yourSpotifyPassword"</span><span class="p">,</span>
|
|
6379
|
-
<span class="n">spotifyConnectLoginId</span><span class="o">=</span><span class="s2">"yourSpotifyLoginId"</span><span class="p">,</span> <span class="c1"># (e.g. '31l77548798704mns987fdf0986e')</span>
|
|
6380
|
-
<span class="n">spotifyConnectDiscoveryTimeout</span><span class="o">=</span><span class="mf">1.5</span><span class="p">,</span>
|
|
6381
|
-
<span class="n">tokenStorageDir</span><span class="o">=</span><span class="s1">'./yourTokenStorageDir'</span><span class="p">,</span>
|
|
6382
|
-
<span class="p">)</span>
|
|
6383
|
-
|
|
6384
|
-
<span class="c1"># generate a spotify authorization code with PKCE access token (with scope, private and public data use).</span>
|
|
6385
|
-
<span class="n">spotify</span><span class="o">.</span><span class="n">SetAuthTokenAuthorizationCodePKCE</span><span class="p">(</span><span class="n">CLIENT_ID</span><span class="p">,</span> <span class="n">SPOTIFY_SCOPES</span><span class="p">)</span>
|
|
6386
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">Auth Token:</span><span class="se">\n</span><span class="s1"> Type="</span><span class="si">%s</span><span class="s1">"</span><span class="se">\n</span><span class="s1"> Scope="</span><span class="si">%s</span><span class="s1">"'</span> <span class="o">%</span> <span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">AuthToken</span><span class="o">.</span><span class="n">AuthorizationType</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">AuthToken</span><span class="o">.</span><span class="n">Scope</span><span class="p">)))</span>
|
|
6387
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">User:</span><span class="se">\n</span><span class="s1"> DisplayName="</span><span class="si">%s</span><span class="s1">"</span><span class="se">\n</span><span class="s1"> EMail="</span><span class="si">%s</span><span class="s1">"'</span> <span class="o">%</span> <span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">UserProfile</span><span class="o">.</span><span class="n">DisplayName</span><span class="p">,</span> <span class="n">spotify</span><span class="o">.</span><span class="n">UserProfile</span><span class="o">.</span><span class="n">EMail</span><span class="p">))</span>
|
|
6388
|
-
|
|
6389
|
-
<span class="c1"># activate all Spotify Connect player devices on the local network.</span>
|
|
6390
|
-
<span class="c1"># this will disconnect other users from all spotify connect player </span>
|
|
6391
|
-
<span class="c1"># devices defined to the local network.</span>
|
|
6392
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">Activating Spotify Connect player devices'</span><span class="p">)</span>
|
|
6393
|
-
<span class="n">result</span><span class="p">:</span><span class="nb">str</span> <span class="o">=</span> <span class="n">spotify</span><span class="o">.</span><span class="n">PlayerActivateDevices</span><span class="p">()</span>
|
|
6394
|
-
<span class="nb">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
|
|
6395
|
-
|
|
6396
|
-
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
6397
|
-
|
|
6398
|
-
<span class="nb">print</span><span class="p">(</span><span class="s2">"** Exception: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">ex</span><span class="p">))</span>
|
|
6399
|
-
</code></pre>
|
|
6400
|
-
</div>
|
|
6401
|
-
|
|
6402
6277
|
<p></details></p>
|
|
6403
6278
|
</div>
|
|
6404
6279
|
|
|
@@ -6448,7 +6323,7 @@ otherwise, False (default) to use the cached device list to resolve the device.<
|
|
|
6448
6323
|
<ul>
|
|
6449
6324
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6450
6325
|
and the response contains error information.</li>
|
|
6451
|
-
<li><strong>
|
|
6326
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6452
6327
|
</ul>
|
|
6453
6328
|
|
|
6454
6329
|
<p>The id for the first match found on the device name will be returned if multiple devices
|
|
@@ -6465,8 +6340,8 @@ in better performance.</p>
|
|
|
6465
6340
|
<summary>Sample Code</summary></p>
|
|
6466
6341
|
|
|
6467
6342
|
<div class="pdoc-code codehilite">
|
|
6468
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6469
|
-
<span class="kn">from</span>
|
|
6343
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6344
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6470
6345
|
|
|
6471
6346
|
<span class="k">try</span><span class="p">:</span>
|
|
6472
6347
|
|
|
@@ -6541,7 +6416,7 @@ Default: True</li>
|
|
|
6541
6416
|
<ul>
|
|
6542
6417
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6543
6418
|
and the response contains error information.</li>
|
|
6544
|
-
<li><strong>
|
|
6419
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6545
6420
|
</ul>
|
|
6546
6421
|
|
|
6547
6422
|
<p>Note that this method will only return the devices for which the current user
|
|
@@ -6557,8 +6432,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
6557
6432
|
<summary>Sample Code</summary></p>
|
|
6558
6433
|
|
|
6559
6434
|
<div class="pdoc-code codehilite">
|
|
6560
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6561
|
-
<span class="kn">from</span>
|
|
6435
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6436
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6562
6437
|
|
|
6563
6438
|
<span class="k">try</span><span class="p">:</span>
|
|
6564
6439
|
|
|
@@ -6653,15 +6528,15 @@ properly handles cases of new types in the future by checking against the type f
|
|
|
6653
6528
|
<ul>
|
|
6654
6529
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6655
6530
|
and the response contains error information.</li>
|
|
6656
|
-
<li><strong>
|
|
6531
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6657
6532
|
</ul>
|
|
6658
6533
|
|
|
6659
6534
|
<p><details>
|
|
6660
6535
|
<summary>Sample Code</summary></p>
|
|
6661
6536
|
|
|
6662
6537
|
<div class="pdoc-code codehilite">
|
|
6663
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6664
|
-
<span class="kn">from</span>
|
|
6538
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6539
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6665
6540
|
|
|
6666
6541
|
<span class="k">try</span><span class="p">:</span>
|
|
6667
6542
|
|
|
@@ -6912,15 +6787,15 @@ properly handles cases of new types in the future by checking against the type f
|
|
|
6912
6787
|
<ul>
|
|
6913
6788
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6914
6789
|
and the response contains error information.</li>
|
|
6915
|
-
<li><strong>
|
|
6790
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6916
6791
|
</ul>
|
|
6917
6792
|
|
|
6918
6793
|
<p><details>
|
|
6919
6794
|
<summary>Sample Code</summary></p>
|
|
6920
6795
|
|
|
6921
6796
|
<div class="pdoc-code codehilite">
|
|
6922
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
6923
|
-
<span class="kn">from</span>
|
|
6797
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6798
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6924
6799
|
|
|
6925
6800
|
<span class="k">try</span><span class="p">:</span>
|
|
6926
6801
|
|
|
@@ -6991,15 +6866,15 @@ and the response contains error information.</li>
|
|
|
6991
6866
|
<ul>
|
|
6992
6867
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
6993
6868
|
and the response contains error information.</li>
|
|
6994
|
-
<li><strong>
|
|
6869
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
6995
6870
|
</ul>
|
|
6996
6871
|
|
|
6997
6872
|
<p><details>
|
|
6998
6873
|
<summary>Sample Code</summary></p>
|
|
6999
6874
|
|
|
7000
6875
|
<div class="pdoc-code codehilite">
|
|
7001
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7002
|
-
<span class="kn">from</span>
|
|
6876
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6877
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7003
6878
|
|
|
7004
6879
|
<span class="k">try</span><span class="p">:</span>
|
|
7005
6880
|
|
|
@@ -7103,15 +6978,15 @@ is generated that will retrieve the last 50 recently played tracks.</p>
|
|
|
7103
6978
|
<ul>
|
|
7104
6979
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7105
6980
|
and the response contains error information.</li>
|
|
7106
|
-
<li><strong>
|
|
6981
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
7107
6982
|
</ul>
|
|
7108
6983
|
|
|
7109
6984
|
<p><details>
|
|
7110
6985
|
<summary>Sample Code - After DateTime</summary></p>
|
|
7111
6986
|
|
|
7112
6987
|
<div class="pdoc-code codehilite">
|
|
7113
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7114
|
-
<span class="kn">from</span>
|
|
6988
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
6989
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7115
6990
|
|
|
7116
6991
|
<span class="k">try</span><span class="p">:</span>
|
|
7117
6992
|
|
|
@@ -7174,8 +7049,8 @@ and the response contains error information.</li>
|
|
|
7174
7049
|
<summary>Sample Code - For Past 1 Hour</summary></p>
|
|
7175
7050
|
|
|
7176
7051
|
<div class="pdoc-code codehilite">
|
|
7177
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7178
|
-
<span class="kn">from</span>
|
|
7052
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7053
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7179
7054
|
|
|
7180
7055
|
<span class="k">try</span><span class="p">:</span>
|
|
7181
7056
|
|
|
@@ -7296,15 +7171,15 @@ client properly handles cases of new types in the future by checking against the
|
|
|
7296
7171
|
<ul>
|
|
7297
7172
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7298
7173
|
and the response contains error information.</li>
|
|
7299
|
-
<li><strong>
|
|
7174
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
7300
7175
|
</ul>
|
|
7301
7176
|
|
|
7302
7177
|
<p><details>
|
|
7303
7178
|
<summary>Sample Code</summary></p>
|
|
7304
7179
|
|
|
7305
7180
|
<div class="pdoc-code codehilite">
|
|
7306
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7307
|
-
<span class="kn">from</span>
|
|
7181
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7182
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7308
7183
|
|
|
7309
7184
|
<span class="k">try</span><span class="p">:</span>
|
|
7310
7185
|
|
|
@@ -7343,8 +7218,8 @@ and the response contains error information.</li>
|
|
|
7343
7218
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
7344
7219
|
|
|
7345
7220
|
<div class="pdoc-code codehilite">
|
|
7346
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7347
|
-
<span class="kn">from</span>
|
|
7221
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7222
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7348
7223
|
|
|
7349
7224
|
<span class="k">try</span><span class="p">:</span>
|
|
7350
7225
|
|
|
@@ -7417,15 +7292,15 @@ Example: <code>5v5ETK9WFXAnGQ3MRubKuE</code></li>
|
|
|
7417
7292
|
<ul>
|
|
7418
7293
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7419
7294
|
and the response contains error information.</li>
|
|
7420
|
-
<li><strong>
|
|
7295
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
7421
7296
|
</ul>
|
|
7422
7297
|
|
|
7423
7298
|
<p><details>
|
|
7424
7299
|
<summary>Sample Code</summary></p>
|
|
7425
7300
|
|
|
7426
7301
|
<div class="pdoc-code codehilite">
|
|
7427
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7428
|
-
<span class="kn">from</span>
|
|
7302
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7303
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7429
7304
|
|
|
7430
7305
|
<span class="k">try</span><span class="p">:</span>
|
|
7431
7306
|
|
|
@@ -7532,7 +7407,7 @@ Default: None (disabled)</li>
|
|
|
7532
7407
|
<ul>
|
|
7533
7408
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7534
7409
|
and the response contains error information.</li>
|
|
7535
|
-
<li><p><strong>
|
|
7410
|
+
<li><p><strong>SpotifyApiError:</strong> If the method fails for any other reason.</p>
|
|
7536
7411
|
|
|
7537
7412
|
<ul>
|
|
7538
7413
|
<li>Notes regarding <code>limit_total</code> processing. <br />
|
|
@@ -7549,8 +7424,8 @@ which is the largest playlist on spotify (4700+ items).</li>
|
|
|
7549
7424
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
7550
7425
|
|
|
7551
7426
|
<div class="pdoc-code codehilite">
|
|
7552
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7553
|
-
<span class="kn">from</span>
|
|
7427
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7428
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7554
7429
|
|
|
7555
7430
|
<span class="k">try</span><span class="p">:</span>
|
|
7556
7431
|
|
|
@@ -7612,8 +7487,8 @@ which is the largest playlist on spotify (4700+ items).</li>
|
|
|
7612
7487
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
7613
7488
|
|
|
7614
7489
|
<div class="pdoc-code codehilite">
|
|
7615
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7616
|
-
<span class="kn">from</span>
|
|
7490
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7491
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7617
7492
|
|
|
7618
7493
|
<span class="k">try</span><span class="p">:</span>
|
|
7619
7494
|
|
|
@@ -7699,7 +7574,7 @@ Default: True</li>
|
|
|
7699
7574
|
<ul>
|
|
7700
7575
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7701
7576
|
and the response contains error information.</li>
|
|
7702
|
-
<li><strong>
|
|
7577
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
7703
7578
|
</ul>
|
|
7704
7579
|
|
|
7705
7580
|
<p>As of 2024/11/27, the Spotify Web API will only return user-defined playlists in the results. It will
|
|
@@ -7711,8 +7586,8 @@ Forum Blog post</a> that was conveyed on November 27, 2024.</p>
|
|
|
7711
7586
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
7712
7587
|
|
|
7713
7588
|
<div class="pdoc-code codehilite">
|
|
7714
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7715
|
-
<span class="kn">from</span>
|
|
7589
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7590
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7716
7591
|
|
|
7717
7592
|
<span class="k">try</span><span class="p">:</span>
|
|
7718
7593
|
|
|
@@ -7774,8 +7649,8 @@ Forum Blog post</a> that was conveyed on November 27, 2024.</p>
|
|
|
7774
7649
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
7775
7650
|
|
|
7776
7651
|
<div class="pdoc-code codehilite">
|
|
7777
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7778
|
-
<span class="kn">from</span>
|
|
7652
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7653
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7779
7654
|
|
|
7780
7655
|
<span class="k">try</span><span class="p">:</span>
|
|
7781
7656
|
|
|
@@ -7869,15 +7744,15 @@ Default: True</li>
|
|
|
7869
7744
|
<ul>
|
|
7870
7745
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
7871
7746
|
and the response contains error information.</li>
|
|
7872
|
-
<li><strong>
|
|
7747
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
7873
7748
|
</ul>
|
|
7874
7749
|
|
|
7875
7750
|
<p><details>
|
|
7876
7751
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
7877
7752
|
|
|
7878
7753
|
<div class="pdoc-code codehilite">
|
|
7879
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7880
|
-
<span class="kn">from</span>
|
|
7754
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7755
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7881
7756
|
|
|
7882
7757
|
<span class="k">try</span><span class="p">:</span>
|
|
7883
7758
|
|
|
@@ -7940,8 +7815,8 @@ and the response contains error information.</li>
|
|
|
7940
7815
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
7941
7816
|
|
|
7942
7817
|
<div class="pdoc-code codehilite">
|
|
7943
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
7944
|
-
<span class="kn">from</span>
|
|
7818
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7819
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7945
7820
|
|
|
7946
7821
|
<span class="k">try</span><span class="p">:</span>
|
|
7947
7822
|
|
|
@@ -8029,7 +7904,7 @@ Example: <code>ES</code></li>
|
|
|
8029
7904
|
<ul>
|
|
8030
7905
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8031
7906
|
and the response contains error information.</li>
|
|
8032
|
-
<li><strong>
|
|
7907
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8033
7908
|
</ul>
|
|
8034
7909
|
|
|
8035
7910
|
<p>Important policy notes: </p>
|
|
@@ -8044,8 +7919,8 @@ and the response contains error information.</li>
|
|
|
8044
7919
|
<summary>Sample Code</summary></p>
|
|
8045
7920
|
|
|
8046
7921
|
<div class="pdoc-code codehilite">
|
|
8047
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8048
|
-
<span class="kn">from</span>
|
|
7922
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7923
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8049
7924
|
|
|
8050
7925
|
<span class="k">try</span><span class="p">:</span>
|
|
8051
7926
|
|
|
@@ -8103,8 +7978,8 @@ and the response contains error information.</li>
|
|
|
8103
7978
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
8104
7979
|
|
|
8105
7980
|
<div class="pdoc-code codehilite">
|
|
8106
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8107
|
-
<span class="kn">from</span>
|
|
7981
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
7982
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8108
7983
|
|
|
8109
7984
|
<span class="k">try</span><span class="p">:</span>
|
|
8110
7985
|
|
|
@@ -8216,15 +8091,15 @@ Default: None (disabled)</li>
|
|
|
8216
8091
|
<ul>
|
|
8217
8092
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8218
8093
|
and the response contains error information.</li>
|
|
8219
|
-
<li><strong>
|
|
8094
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8220
8095
|
</ul>
|
|
8221
8096
|
|
|
8222
8097
|
<p><details>
|
|
8223
8098
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
8224
8099
|
|
|
8225
8100
|
<div class="pdoc-code codehilite">
|
|
8226
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8227
|
-
<span class="kn">from</span>
|
|
8101
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8102
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8228
8103
|
|
|
8229
8104
|
<span class="k">try</span><span class="p">:</span>
|
|
8230
8105
|
|
|
@@ -8293,8 +8168,8 @@ and the response contains error information.</li>
|
|
|
8293
8168
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
8294
8169
|
|
|
8295
8170
|
<div class="pdoc-code codehilite">
|
|
8296
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8297
|
-
<span class="kn">from</span>
|
|
8171
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8172
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8298
8173
|
|
|
8299
8174
|
<span class="k">try</span><span class="p">:</span>
|
|
8300
8175
|
|
|
@@ -8392,7 +8267,7 @@ Default: True </li>
|
|
|
8392
8267
|
<ul>
|
|
8393
8268
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8394
8269
|
and the response contains error information.</li>
|
|
8395
|
-
<li><strong>
|
|
8270
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8396
8271
|
</ul>
|
|
8397
8272
|
|
|
8398
8273
|
<p>For some reason, Spotify Web API returns audiobooks AND podcasts with the <code>/me/shows</code> service.
|
|
@@ -8404,8 +8279,8 @@ only return podcast shows in the results if desired.</p>
|
|
|
8404
8279
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
8405
8280
|
|
|
8406
8281
|
<div class="pdoc-code codehilite">
|
|
8407
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8408
|
-
<span class="kn">from</span>
|
|
8282
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8283
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8409
8284
|
|
|
8410
8285
|
<span class="k">try</span><span class="p">:</span>
|
|
8411
8286
|
|
|
@@ -8464,8 +8339,8 @@ only return podcast shows in the results if desired.</p>
|
|
|
8464
8339
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
8465
8340
|
|
|
8466
8341
|
<div class="pdoc-code codehilite">
|
|
8467
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8468
|
-
<span class="kn">from</span>
|
|
8342
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8343
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8469
8344
|
|
|
8470
8345
|
<span class="k">try</span><span class="p">:</span>
|
|
8471
8346
|
|
|
@@ -8544,7 +8419,7 @@ Example: <code>ES</code></li>
|
|
|
8544
8419
|
<ul>
|
|
8545
8420
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8546
8421
|
and the response contains error information.</li>
|
|
8547
|
-
<li><strong>
|
|
8422
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8548
8423
|
</ul>
|
|
8549
8424
|
|
|
8550
8425
|
<p>Important policy notes: </p>
|
|
@@ -8559,8 +8434,8 @@ and the response contains error information.</li>
|
|
|
8559
8434
|
<summary>Sample Code</summary></p>
|
|
8560
8435
|
|
|
8561
8436
|
<div class="pdoc-code codehilite">
|
|
8562
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8563
|
-
<span class="kn">from</span>
|
|
8437
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8438
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8564
8439
|
|
|
8565
8440
|
<span class="k">try</span><span class="p">:</span>
|
|
8566
8441
|
|
|
@@ -8613,14 +8488,15 @@ activate the device if it requires it.</p>
|
|
|
8613
8488
|
<p>This method requires the <code>user-read-playback-state</code> scope.</p>
|
|
8614
8489
|
|
|
8615
8490
|
<p>Resolves a Spotify Connect device from a specified device id, name, alias id,
|
|
8616
|
-
or alias name. This will ensure that the device can be found on the network,
|
|
8617
|
-
|
|
8491
|
+
or alias name. This will ensure that the device can be found on the network, and that
|
|
8492
|
+
playback can be immediately transferred to the device.</p>
|
|
8618
8493
|
|
|
8619
8494
|
<h6 id="arguments">Arguments:</h6>
|
|
8620
8495
|
|
|
8621
8496
|
<ul>
|
|
8622
8497
|
<li><strong>deviceValue (str):</strong> The device id / name value to check.</li>
|
|
8623
|
-
<li><strong>verifyUserContext (bool):</strong>
|
|
8498
|
+
<li><strong>verifyUserContext (bool):</strong> DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
8499
|
+
If True, the active user context of the resolved device is checked to ensure it
|
|
8624
8500
|
matches the user context specified on the class constructor.
|
|
8625
8501
|
If False, the user context will not be checked.
|
|
8626
8502
|
Default is True.</li>
|
|
@@ -8642,7 +8518,7 @@ Default is 0.25; value range is 0 - 10.</li>
|
|
|
8642
8518
|
<h6 id="returns">Returns:</h6>
|
|
8643
8519
|
|
|
8644
8520
|
<blockquote>
|
|
8645
|
-
<p>A <code>SpotifyConnectDevice</code> object for the deviceValue if one could be resolved
|
|
8521
|
+
<p>A <code>SpotifyConnectDevice</code> object for the deviceValue if one could be resolved.
|
|
8646
8522
|
otherwise, a null value with the understanding that subsequent operations will probably
|
|
8647
8523
|
fail since it's not in the Spotify Connect discovery list. </p>
|
|
8648
8524
|
</blockquote>
|
|
@@ -8653,7 +8529,8 @@ Default is 0.25; value range is 0 - 10.</li>
|
|
|
8653
8529
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8654
8530
|
and the response contains error information.</li>
|
|
8655
8531
|
<li><strong>SpotifyZeroconfApiError:</strong> If any Spotify Zeroconf API request failed.</li>
|
|
8656
|
-
<li><strong>
|
|
8532
|
+
<li><strong>SpotifyApiError:</strong> If the <code>deviceValue</code> could not be resolved to a valid device instance.
|
|
8533
|
+
If the <code>spotifyConnectLoginId</code> argument was not specified for the class contructor. <br />
|
|
8657
8534
|
If the <code>spotifyConnectUsername</code> argument was not specified for the class contructor. <br />
|
|
8658
8535
|
If the <code>spotifyConnectPassword</code> argument was not specified for the class contructor. <br />
|
|
8659
8536
|
If the method fails for any other reason.</li>
|
|
@@ -8661,12 +8538,10 @@ If the method fails for any other reason.</li>
|
|
|
8661
8538
|
|
|
8662
8539
|
<p>The Spotify Connect discovery list is searched for the specified device value; the search will
|
|
8663
8540
|
match on either a Device ID or RemoteName as well as any alias ID's or Names that are in use.
|
|
8664
|
-
The cached Spotify Connect
|
|
8665
|
-
False, or if the cache is empty; otherwise, Spotify Connect discovery list will be refreshed
|
|
8666
|
-
and the cache updated prior to the search.</p>
|
|
8541
|
+
The cached Spotify Connect Directory will be used to resolve the device object.</p>
|
|
8667
8542
|
|
|
8668
|
-
<p>The <code>SpotifyConnectDevice</code> object is returned if a match is found; otherwise,
|
|
8669
|
-
returned.</p>
|
|
8543
|
+
<p>The <code>SpotifyConnectDevice</code> object is returned if a match is found; otherwise, an exception is
|
|
8544
|
+
raised to indicate an unknown device which would be returned anyway by Spotify Web API.</p>
|
|
8670
8545
|
|
|
8671
8546
|
<p>A Spotify Connect Zeroconf Disconnect (e.g. <code>resetUsers</code>) will be issued if the <code>activateDevice</code>
|
|
8672
8547
|
argument is True, AND the device is not a dynamic device. This will temporarily remove the device
|
|
@@ -8677,9 +8552,9 @@ call is issued.</p>
|
|
|
8677
8552
|
<summary>Sample Code</summary></p>
|
|
8678
8553
|
|
|
8679
8554
|
<div class="pdoc-code codehilite">
|
|
8680
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8681
|
-
<span class="kn">from</span>
|
|
8682
|
-
<span class="kn">from</span>
|
|
8555
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8556
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8557
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.zeroconfapi</span><span class="w"> </span><span class="kn">import</span> <span class="n">ZeroconfConnect</span><span class="p">,</span> <span class="n">ZeroconfResponse</span>
|
|
8683
8558
|
|
|
8684
8559
|
<span class="k">try</span><span class="p">:</span>
|
|
8685
8560
|
|
|
@@ -8762,9 +8637,10 @@ call is issued.</p>
|
|
|
8762
8637
|
<h6 id="arguments">Arguments:</h6>
|
|
8763
8638
|
|
|
8764
8639
|
<ul>
|
|
8765
|
-
<li><strong>refresh (bool):</strong> True (default) to return real-time information
|
|
8766
|
-
|
|
8767
|
-
<li><strong>sortResult (bool):</strong>
|
|
8640
|
+
<li><strong>refresh (bool):</strong> True (default) to return real-time information about devices and update the cache;
|
|
8641
|
+
otherwise, False to just return the cached value.</li>
|
|
8642
|
+
<li><strong>sortResult (bool):</strong> DEPRECATED - no longer used, as the collection is always sorted by default.
|
|
8643
|
+
True to sort the items by name; otherwise, False to leave the items in the same order they
|
|
8768
8644
|
were returned in by the Spotify Web API. <br />
|
|
8769
8645
|
Default: True</li>
|
|
8770
8646
|
</ul>
|
|
@@ -8772,8 +8648,9 @@ Default: True</li>
|
|
|
8772
8648
|
<h6 id="returns">Returns:</h6>
|
|
8773
8649
|
|
|
8774
8650
|
<blockquote>
|
|
8775
|
-
<p>A <code>SpotifyConnectDevices</code> object that contain
|
|
8776
|
-
as well as
|
|
8651
|
+
<p>A <code>SpotifyConnectDevices</code> object that contain Spotify Connect devices that are registered
|
|
8652
|
+
with Zeroconf on the local network, as well as dynamic devices that are only known to the
|
|
8653
|
+
Spotify Web API.</p>
|
|
8777
8654
|
</blockquote>
|
|
8778
8655
|
|
|
8779
8656
|
<h6 id="raises">Raises:</h6>
|
|
@@ -8781,35 +8658,25 @@ Default: True</li>
|
|
|
8781
8658
|
<ul>
|
|
8782
8659
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8783
8660
|
and the response contains error information.</li>
|
|
8784
|
-
<li><strong>
|
|
8785
|
-
<li><strong>SpotifApiError:</strong> If the method fails for any other reason.</li>
|
|
8661
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8786
8662
|
</ul>
|
|
8787
8663
|
|
|
8788
|
-
<p>
|
|
8789
|
-
|
|
8790
|
-
just the devices known to a specific user).</p>
|
|
8664
|
+
<p>The current list of devices is copied from the Zeroconf Directory task master device list, which
|
|
8665
|
+
contains a real-time update of Spotify Connect Zeroconf devices.</p>
|
|
8791
8666
|
|
|
8792
|
-
<p>
|
|
8793
|
-
|
|
8794
|
-
information about the device. It will try to reach the device by its direct HostIpAddress
|
|
8795
|
-
first; if that fails, then it will try to reach the device by its Server alias; if that
|
|
8796
|
-
fails, then it will log a warning that the device could not be reached and ignore it.</p>
|
|
8667
|
+
<p>If the <code>refresh</code> argument is true, a real-time query of the Spotify Web API is also performed
|
|
8668
|
+
to retrieve the active player (from playerState) as well as player dynamic devices.</p>
|
|
8797
8669
|
|
|
8798
|
-
<p>
|
|
8799
|
-
Dynamic devices are Spotify Connect devices that are not found in Zeroconf discovery
|
|
8670
|
+
<p>Dynamic devices are Spotify Connect devices that are not found in the Zeroconf discovery
|
|
8800
8671
|
process, but still exist in the player device list. These are usually Spotify Connect
|
|
8801
8672
|
web or mobile players with temporary device id's.</p>
|
|
8802
8673
|
|
|
8803
|
-
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
8804
|
-
<code>refresh</code> argument (with False value) to retrieve the cached value and avoid
|
|
8805
|
-
the spotify web api request. This results in better performance.</p>
|
|
8806
|
-
|
|
8807
8674
|
<p><details>
|
|
8808
8675
|
<summary>Sample Code</summary></p>
|
|
8809
8676
|
|
|
8810
8677
|
<div class="pdoc-code codehilite">
|
|
8811
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8812
|
-
<span class="kn">from</span>
|
|
8678
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8679
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8813
8680
|
|
|
8814
8681
|
<span class="k">try</span><span class="p">:</span>
|
|
8815
8682
|
|
|
@@ -8908,15 +8775,15 @@ is required to correctly read the currently playing context.</li>
|
|
|
8908
8775
|
<ul>
|
|
8909
8776
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
8910
8777
|
and the response contains error information.</li>
|
|
8911
|
-
<li><strong>
|
|
8778
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
8912
8779
|
</ul>
|
|
8913
8780
|
|
|
8914
8781
|
<p><details>
|
|
8915
8782
|
<summary>Sample Code</summary></p>
|
|
8916
8783
|
|
|
8917
8784
|
<div class="pdoc-code codehilite">
|
|
8918
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8919
|
-
<span class="kn">from</span>
|
|
8785
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8786
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8920
8787
|
|
|
8921
8788
|
<span class="k">try</span><span class="p">:</span>
|
|
8922
8789
|
|
|
@@ -8955,8 +8822,8 @@ and the response contains error information.</li>
|
|
|
8955
8822
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
8956
8823
|
|
|
8957
8824
|
<div class="pdoc-code codehilite">
|
|
8958
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
8959
|
-
<span class="kn">from</span>
|
|
8825
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8826
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8960
8827
|
|
|
8961
8828
|
<span class="k">try</span><span class="p">:</span>
|
|
8962
8829
|
|
|
@@ -9037,15 +8904,15 @@ is required to correctly read the currently playing context.</li>
|
|
|
9037
8904
|
<ul>
|
|
9038
8905
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9039
8906
|
and the response contains error information.</li>
|
|
9040
|
-
<li><strong>
|
|
8907
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9041
8908
|
</ul>
|
|
9042
8909
|
|
|
9043
8910
|
<p><details>
|
|
9044
8911
|
<summary>Sample Code</summary></p>
|
|
9045
8912
|
|
|
9046
8913
|
<div class="pdoc-code codehilite">
|
|
9047
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9048
|
-
<span class="kn">from</span>
|
|
8914
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
8915
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9049
8916
|
|
|
9050
8917
|
<span class="k">try</span><span class="p">:</span>
|
|
9051
8918
|
|
|
@@ -9129,15 +8996,15 @@ Default: True</li>
|
|
|
9129
8996
|
<ul>
|
|
9130
8997
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9131
8998
|
and the response contains error information.</li>
|
|
9132
|
-
<li><strong>
|
|
8999
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9133
9000
|
</ul>
|
|
9134
9001
|
|
|
9135
9002
|
<p><details>
|
|
9136
9003
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
9137
9004
|
|
|
9138
9005
|
<div class="pdoc-code codehilite">
|
|
9139
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9140
|
-
<span class="kn">from</span>
|
|
9006
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9007
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9141
9008
|
|
|
9142
9009
|
<span class="k">try</span><span class="p">:</span>
|
|
9143
9010
|
|
|
@@ -9196,8 +9063,8 @@ and the response contains error information.</li>
|
|
|
9196
9063
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
9197
9064
|
|
|
9198
9065
|
<div class="pdoc-code codehilite">
|
|
9199
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9200
|
-
<span class="kn">from</span>
|
|
9066
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9067
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9201
9068
|
|
|
9202
9069
|
<span class="k">try</span><span class="p">:</span>
|
|
9203
9070
|
|
|
@@ -9276,15 +9143,15 @@ Example: <code>ES</code></li>
|
|
|
9276
9143
|
<ul>
|
|
9277
9144
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9278
9145
|
and the response contains error information.</li>
|
|
9279
|
-
<li><strong>
|
|
9146
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9280
9147
|
</ul>
|
|
9281
9148
|
|
|
9282
9149
|
<p><details>
|
|
9283
9150
|
<summary>Sample Code</summary></p>
|
|
9284
9151
|
|
|
9285
9152
|
<div class="pdoc-code codehilite">
|
|
9286
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9287
|
-
<span class="kn">from</span>
|
|
9153
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9154
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9288
9155
|
|
|
9289
9156
|
<span class="k">try</span><span class="p">:</span>
|
|
9290
9157
|
|
|
@@ -9359,15 +9226,15 @@ Example: <code>7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHI
|
|
|
9359
9226
|
<ul>
|
|
9360
9227
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9361
9228
|
and the response contains error information.</li>
|
|
9362
|
-
<li><strong>
|
|
9229
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9363
9230
|
</ul>
|
|
9364
9231
|
|
|
9365
9232
|
<p><details>
|
|
9366
9233
|
<summary>Sample Code</summary></p>
|
|
9367
9234
|
|
|
9368
9235
|
<div class="pdoc-code codehilite">
|
|
9369
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9370
|
-
<span class="kn">from</span>
|
|
9236
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9237
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9371
9238
|
|
|
9372
9239
|
<span class="k">try</span><span class="p">:</span>
|
|
9373
9240
|
|
|
@@ -9536,7 +9403,7 @@ Range: <code>0</code> - <code>1</code> </li>
|
|
|
9536
9403
|
<ul>
|
|
9537
9404
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9538
9405
|
and the response contains error information.</li>
|
|
9539
|
-
<li><strong>
|
|
9406
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9540
9407
|
</ul>
|
|
9541
9408
|
|
|
9542
9409
|
<p>Recommendations are generated based on the available information for a given seed entity and matched
|
|
@@ -9555,8 +9422,8 @@ list of tracks will be returned together with pool size details. </p>
|
|
|
9555
9422
|
<summary>Sample Code - Wind Down</summary></p>
|
|
9556
9423
|
|
|
9557
9424
|
<div class="pdoc-code codehilite">
|
|
9558
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9559
|
-
<span class="kn">from</span>
|
|
9425
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9426
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9560
9427
|
|
|
9561
9428
|
<span class="k">try</span><span class="p">:</span>
|
|
9562
9429
|
|
|
@@ -9603,8 +9470,8 @@ list of tracks will be returned together with pool size details. </p>
|
|
|
9603
9470
|
<summary>Sample Code - I Wanna Rock!</summary></p>
|
|
9604
9471
|
|
|
9605
9472
|
<div class="pdoc-code codehilite">
|
|
9606
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9607
|
-
<span class="kn">from</span>
|
|
9473
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9474
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9608
9475
|
|
|
9609
9476
|
<span class="k">try</span><span class="p">:</span>
|
|
9610
9477
|
|
|
@@ -9713,7 +9580,7 @@ update the cache; otherwise, False to just return the cached value.</li>
|
|
|
9713
9580
|
<ul>
|
|
9714
9581
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9715
9582
|
and the response contains error information.</li>
|
|
9716
|
-
<li><strong>
|
|
9583
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9717
9584
|
</ul>
|
|
9718
9585
|
|
|
9719
9586
|
<p>The <code><a href="#SpotifyClient.ConfigurationCache">ConfigurationCache</a></code> is updated with the results of this method. Use the
|
|
@@ -9724,8 +9591,8 @@ the spotify web api request. This results in better performance.</p>
|
|
|
9724
9591
|
<summary>Sample Code</summary></p>
|
|
9725
9592
|
|
|
9726
9593
|
<div class="pdoc-code codehilite">
|
|
9727
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9728
|
-
<span class="kn">from</span>
|
|
9594
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9595
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9729
9596
|
|
|
9730
9597
|
<span class="k">try</span><span class="p">:</span>
|
|
9731
9598
|
|
|
@@ -9804,15 +9671,15 @@ Example: <code>smedjan</code></li>
|
|
|
9804
9671
|
<ul>
|
|
9805
9672
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9806
9673
|
and the response contains error information.</li>
|
|
9807
|
-
<li><strong>
|
|
9674
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9808
9675
|
</ul>
|
|
9809
9676
|
|
|
9810
9677
|
<p><details>
|
|
9811
9678
|
<summary>Sample Code</summary></p>
|
|
9812
9679
|
|
|
9813
9680
|
<div class="pdoc-code codehilite">
|
|
9814
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9815
|
-
<span class="kn">from</span>
|
|
9681
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9682
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9816
9683
|
|
|
9817
9684
|
<span class="k">try</span><span class="p">:</span>
|
|
9818
9685
|
|
|
@@ -9896,15 +9763,15 @@ Default: True</li>
|
|
|
9896
9763
|
<ul>
|
|
9897
9764
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
9898
9765
|
and the response contains error information.</li>
|
|
9899
|
-
<li><strong>
|
|
9766
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
9900
9767
|
</ul>
|
|
9901
9768
|
|
|
9902
9769
|
<p><details>
|
|
9903
9770
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
9904
9771
|
|
|
9905
9772
|
<div class="pdoc-code codehilite">
|
|
9906
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9907
|
-
<span class="kn">from</span>
|
|
9773
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9774
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9908
9775
|
|
|
9909
9776
|
<span class="k">try</span><span class="p">:</span>
|
|
9910
9777
|
|
|
@@ -9964,8 +9831,8 @@ and the response contains error information.</li>
|
|
|
9964
9831
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
9965
9832
|
|
|
9966
9833
|
<div class="pdoc-code codehilite">
|
|
9967
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
9968
|
-
<span class="kn">from</span>
|
|
9834
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9835
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9969
9836
|
|
|
9970
9837
|
<span class="k">try</span><span class="p">:</span>
|
|
9971
9838
|
|
|
@@ -10062,15 +9929,15 @@ Default: True</li>
|
|
|
10062
9929
|
<ul>
|
|
10063
9930
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10064
9931
|
and the response contains error information.</li>
|
|
10065
|
-
<li><strong>
|
|
9932
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10066
9933
|
</ul>
|
|
10067
9934
|
|
|
10068
9935
|
<p><details>
|
|
10069
9936
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
10070
9937
|
|
|
10071
9938
|
<div class="pdoc-code codehilite">
|
|
10072
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10073
|
-
<span class="kn">from</span>
|
|
9939
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
9940
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10074
9941
|
|
|
10075
9942
|
<span class="k">try</span><span class="p">:</span>
|
|
10076
9943
|
|
|
@@ -10130,8 +9997,8 @@ and the response contains error information.</li>
|
|
|
10130
9997
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
10131
9998
|
|
|
10132
9999
|
<div class="pdoc-code codehilite">
|
|
10133
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10134
|
-
<span class="kn">from</span>
|
|
10000
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10001
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10135
10002
|
|
|
10136
10003
|
<span class="k">try</span><span class="p">:</span>
|
|
10137
10004
|
|
|
@@ -10216,15 +10083,15 @@ Example: <code>ES</code></li>
|
|
|
10216
10083
|
<ul>
|
|
10217
10084
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10218
10085
|
and the response contains error information.</li>
|
|
10219
|
-
<li><strong>
|
|
10086
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10220
10087
|
</ul>
|
|
10221
10088
|
|
|
10222
10089
|
<p><details>
|
|
10223
10090
|
<summary>Sample Code</summary></p>
|
|
10224
10091
|
|
|
10225
10092
|
<div class="pdoc-code codehilite">
|
|
10226
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10227
|
-
<span class="kn">from</span>
|
|
10093
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10094
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10228
10095
|
|
|
10229
10096
|
<span class="k">try</span><span class="p">:</span>
|
|
10230
10097
|
|
|
@@ -10255,8 +10122,8 @@ and the response contains error information.</li>
|
|
|
10255
10122
|
<p><summary>Sample Code - NowPlaying</summary></p>
|
|
10256
10123
|
|
|
10257
10124
|
<div class="pdoc-code codehilite">
|
|
10258
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10259
|
-
<span class="kn">from</span>
|
|
10125
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10126
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10260
10127
|
|
|
10261
10128
|
<span class="k">try</span><span class="p">:</span>
|
|
10262
10129
|
|
|
@@ -10354,7 +10221,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
10354
10221
|
<ul>
|
|
10355
10222
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10356
10223
|
and the response contains error information.</li>
|
|
10357
|
-
<li><strong>
|
|
10224
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10358
10225
|
</ul>
|
|
10359
10226
|
|
|
10360
10227
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -10365,8 +10232,8 @@ and the response contains error information.</li>
|
|
|
10365
10232
|
<summary>Sample Code</summary></p>
|
|
10366
10233
|
|
|
10367
10234
|
<div class="pdoc-code codehilite">
|
|
10368
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10369
|
-
<span class="kn">from</span>
|
|
10235
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10236
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10370
10237
|
|
|
10371
10238
|
<span class="k">try</span><span class="p">:</span>
|
|
10372
10239
|
|
|
@@ -10450,7 +10317,8 @@ Example: <code>Web Player (Chrome)</code> </li>
|
|
|
10450
10317
|
This delay will give the spotify web api time to process the change before
|
|
10451
10318
|
another command is issued. <br />
|
|
10452
10319
|
Default is 0.50; value range is 0 - 10.</li>
|
|
10453
|
-
<li><strong>resolveDeviceId (bool):</strong>
|
|
10320
|
+
<li><strong>resolveDeviceId (bool):</strong> DEPRECATED - device id resolution is now automatic.
|
|
10321
|
+
True to resolve the supplied <code>deviceId</code> value; otherwise, False not resolve the <code>deviceId</code>
|
|
10454
10322
|
value as it has already been resolved. <br />
|
|
10455
10323
|
Default is True. </li>
|
|
10456
10324
|
</ul>
|
|
@@ -10460,7 +10328,7 @@ Default is True. </li>
|
|
|
10460
10328
|
<ul>
|
|
10461
10329
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10462
10330
|
and the response contains error information.</li>
|
|
10463
|
-
<li><strong>
|
|
10331
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10464
10332
|
</ul>
|
|
10465
10333
|
|
|
10466
10334
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -10471,8 +10339,8 @@ and the response contains error information.</li>
|
|
|
10471
10339
|
<summary>Sample Code - Play Album</summary></p>
|
|
10472
10340
|
|
|
10473
10341
|
<div class="pdoc-code codehilite">
|
|
10474
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10475
|
-
<span class="kn">from</span>
|
|
10342
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10343
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10476
10344
|
|
|
10477
10345
|
<span class="k">try</span><span class="p">:</span>
|
|
10478
10346
|
|
|
@@ -10540,8 +10408,8 @@ and the response contains error information.</li>
|
|
|
10540
10408
|
<summary>Sample Code - Play Artist</summary></p>
|
|
10541
10409
|
|
|
10542
10410
|
<div class="pdoc-code codehilite">
|
|
10543
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10544
|
-
<span class="kn">from</span>
|
|
10411
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10412
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10545
10413
|
|
|
10546
10414
|
<span class="k">try</span><span class="p">:</span>
|
|
10547
10415
|
|
|
@@ -10592,8 +10460,8 @@ and the response contains error information.</li>
|
|
|
10592
10460
|
<summary>Sample Code - Play Playlist</summary></p>
|
|
10593
10461
|
|
|
10594
10462
|
<div class="pdoc-code codehilite">
|
|
10595
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10596
|
-
<span class="kn">from</span>
|
|
10463
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10464
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10597
10465
|
|
|
10598
10466
|
<span class="k">try</span><span class="p">:</span>
|
|
10599
10467
|
|
|
@@ -10685,7 +10553,8 @@ Example: <code>Web Player (Chrome)</code> </li>
|
|
|
10685
10553
|
This delay will give the spotify web api time to process the change before
|
|
10686
10554
|
another command is issued. <br />
|
|
10687
10555
|
Default is 0.50; value range is 0 - 10.</li>
|
|
10688
|
-
<li><strong>resolveDeviceId (bool):</strong>
|
|
10556
|
+
<li><strong>resolveDeviceId (bool):</strong> DEPRECATED - device id resolution is now automatic.
|
|
10557
|
+
True to resolve the supplied <code>deviceId</code> value; otherwise, False not resolve the <code>deviceId</code>
|
|
10689
10558
|
value as it has already been resolved. <br />
|
|
10690
10559
|
Default is True. </li>
|
|
10691
10560
|
<li><strong>limitTotal (int):</strong> The maximum number of items to retrieve from favorites. <br />
|
|
@@ -10697,7 +10566,7 @@ Default is 200; value range is 1 - 750. </li>
|
|
|
10697
10566
|
<ul>
|
|
10698
10567
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10699
10568
|
and the response contains error information.</li>
|
|
10700
|
-
<li><strong>
|
|
10569
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10701
10570
|
</ul>
|
|
10702
10571
|
|
|
10703
10572
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -10714,8 +10583,8 @@ number of tracks allowed for the request.</p>
|
|
|
10714
10583
|
<summary>Sample Code</summary></p>
|
|
10715
10584
|
|
|
10716
10585
|
<div class="pdoc-code codehilite">
|
|
10717
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10718
|
-
<span class="kn">from</span>
|
|
10586
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10587
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10719
10588
|
|
|
10720
10589
|
<span class="k">try</span><span class="p">:</span>
|
|
10721
10590
|
|
|
@@ -10791,7 +10660,8 @@ Example: <code>Web Player (Chrome)</code> </li>
|
|
|
10791
10660
|
This delay will give the spotify web api time to process the change before
|
|
10792
10661
|
another command is issued. <br />
|
|
10793
10662
|
Default is 0.50; value range is 0 - 10.</li>
|
|
10794
|
-
<li><strong>resolveDeviceId (bool):</strong>
|
|
10663
|
+
<li><strong>resolveDeviceId (bool):</strong> DEPRECATED - device id resolution is now automatic.
|
|
10664
|
+
True to resolve the supplied <code>deviceId</code> value; otherwise, False not resolve the <code>deviceId</code>
|
|
10795
10665
|
value as it has already been resolved. <br />
|
|
10796
10666
|
Default is True. </li>
|
|
10797
10667
|
</ul>
|
|
@@ -10801,7 +10671,7 @@ Default is True. </li>
|
|
|
10801
10671
|
<ul>
|
|
10802
10672
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10803
10673
|
and the response contains error information.</li>
|
|
10804
|
-
<li><strong>
|
|
10674
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10805
10675
|
</ul>
|
|
10806
10676
|
|
|
10807
10677
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -10812,8 +10682,8 @@ and the response contains error information.</li>
|
|
|
10812
10682
|
<summary>Sample Code</summary></p>
|
|
10813
10683
|
|
|
10814
10684
|
<div class="pdoc-code codehilite">
|
|
10815
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10816
|
-
<span class="kn">from</span>
|
|
10685
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10686
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10817
10687
|
|
|
10818
10688
|
<span class="k">try</span><span class="p">:</span>
|
|
10819
10689
|
|
|
@@ -10904,7 +10774,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
10904
10774
|
<ul>
|
|
10905
10775
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
10906
10776
|
and the response contains error information.</li>
|
|
10907
|
-
<li><strong>
|
|
10777
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
10908
10778
|
</ul>
|
|
10909
10779
|
|
|
10910
10780
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -10915,8 +10785,8 @@ and the response contains error information.</li>
|
|
|
10915
10785
|
<summary>Sample Code</summary></p>
|
|
10916
10786
|
|
|
10917
10787
|
<div class="pdoc-code codehilite">
|
|
10918
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
10919
|
-
<span class="kn">from</span>
|
|
10788
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10789
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10920
10790
|
|
|
10921
10791
|
<span class="k">try</span><span class="p">:</span>
|
|
10922
10792
|
|
|
@@ -10999,7 +10869,7 @@ Example = <code>10000</code> to seek ahead by 10 seconds. </li>
|
|
|
10999
10869
|
<ul>
|
|
11000
10870
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11001
10871
|
and the response contains error information.</li>
|
|
11002
|
-
<li><strong>
|
|
10872
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11003
10873
|
</ul>
|
|
11004
10874
|
|
|
11005
10875
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11019,8 +10889,8 @@ argument was added to this API to support "skip" seeking. </p>
|
|
|
11019
10889
|
<summary>Sample Code</summary></p>
|
|
11020
10890
|
|
|
11021
10891
|
<div class="pdoc-code codehilite">
|
|
11022
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11023
|
-
<span class="kn">from</span>
|
|
10892
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10893
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11024
10894
|
|
|
11025
10895
|
<span class="k">try</span><span class="p">:</span>
|
|
11026
10896
|
|
|
@@ -11062,8 +10932,8 @@ argument was added to this API to support "skip" seeking. </p>
|
|
|
11062
10932
|
<summary>Sample Code - Relative Positioning</summary></p>
|
|
11063
10933
|
|
|
11064
10934
|
<div class="pdoc-code codehilite">
|
|
11065
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11066
|
-
<span class="kn">from</span>
|
|
10935
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
10936
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11067
10937
|
|
|
11068
10938
|
<span class="k">try</span><span class="p">:</span>
|
|
11069
10939
|
|
|
@@ -11147,7 +11017,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
11147
11017
|
<ul>
|
|
11148
11018
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11149
11019
|
and the response contains error information.</li>
|
|
11150
|
-
<li><strong>
|
|
11020
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11151
11021
|
</ul>
|
|
11152
11022
|
|
|
11153
11023
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11158,8 +11028,8 @@ and the response contains error information.</li>
|
|
|
11158
11028
|
<summary>Sample Code</summary></p>
|
|
11159
11029
|
|
|
11160
11030
|
<div class="pdoc-code codehilite">
|
|
11161
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11162
|
-
<span class="kn">from</span>
|
|
11031
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11032
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11163
11033
|
|
|
11164
11034
|
<span class="k">try</span><span class="p">:</span>
|
|
11165
11035
|
|
|
@@ -11232,7 +11102,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
11232
11102
|
<ul>
|
|
11233
11103
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11234
11104
|
and the response contains error information.</li>
|
|
11235
|
-
<li><strong>
|
|
11105
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11236
11106
|
</ul>
|
|
11237
11107
|
|
|
11238
11108
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11243,8 +11113,8 @@ and the response contains error information.</li>
|
|
|
11243
11113
|
<summary>Sample Code</summary></p>
|
|
11244
11114
|
|
|
11245
11115
|
<div class="pdoc-code codehilite">
|
|
11246
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11247
|
-
<span class="kn">from</span>
|
|
11116
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11117
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11248
11118
|
|
|
11249
11119
|
<span class="k">try</span><span class="p">:</span>
|
|
11250
11120
|
|
|
@@ -11324,7 +11194,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
11324
11194
|
<ul>
|
|
11325
11195
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11326
11196
|
and the response contains error information.</li>
|
|
11327
|
-
<li><strong>
|
|
11197
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11328
11198
|
</ul>
|
|
11329
11199
|
|
|
11330
11200
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11335,8 +11205,8 @@ and the response contains error information.</li>
|
|
|
11335
11205
|
<summary>Sample Code</summary></p>
|
|
11336
11206
|
|
|
11337
11207
|
<div class="pdoc-code codehilite">
|
|
11338
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11339
|
-
<span class="kn">from</span>
|
|
11208
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11209
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11340
11210
|
|
|
11341
11211
|
<span class="k">try</span><span class="p">:</span>
|
|
11342
11212
|
|
|
@@ -11429,7 +11299,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
11429
11299
|
<ul>
|
|
11430
11300
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11431
11301
|
and the response contains error information.</li>
|
|
11432
|
-
<li><strong>
|
|
11302
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11433
11303
|
</ul>
|
|
11434
11304
|
|
|
11435
11305
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11440,8 +11310,8 @@ and the response contains error information.</li>
|
|
|
11440
11310
|
<summary>Sample Code</summary></p>
|
|
11441
11311
|
|
|
11442
11312
|
<div class="pdoc-code codehilite">
|
|
11443
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11444
|
-
<span class="kn">from</span>
|
|
11313
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11314
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11445
11315
|
|
|
11446
11316
|
<span class="k">try</span><span class="p">:</span>
|
|
11447
11317
|
|
|
@@ -11524,7 +11394,7 @@ Default is 0.50; value range is 0 - 10.</li>
|
|
|
11524
11394
|
<ul>
|
|
11525
11395
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11526
11396
|
and the response contains error information.</li>
|
|
11527
|
-
<li><strong>
|
|
11397
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11528
11398
|
</ul>
|
|
11529
11399
|
|
|
11530
11400
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11535,8 +11405,8 @@ and the response contains error information.</li>
|
|
|
11535
11405
|
<summary>Sample Code</summary></p>
|
|
11536
11406
|
|
|
11537
11407
|
<div class="pdoc-code codehilite">
|
|
11538
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11539
|
-
<span class="kn">from</span>
|
|
11408
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11409
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11540
11410
|
|
|
11541
11411
|
<span class="k">try</span><span class="p">:</span>
|
|
11542
11412
|
|
|
@@ -11617,7 +11487,7 @@ Default is True. </li>
|
|
|
11617
11487
|
<ul>
|
|
11618
11488
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11619
11489
|
and the response contains error information.</li>
|
|
11620
|
-
<li><strong>
|
|
11490
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11621
11491
|
</ul>
|
|
11622
11492
|
|
|
11623
11493
|
<p>This API only works for users who have Spotify Premium. </p>
|
|
@@ -11628,8 +11498,8 @@ and the response contains error information.</li>
|
|
|
11628
11498
|
<summary>Sample Code</summary></p>
|
|
11629
11499
|
|
|
11630
11500
|
<div class="pdoc-code codehilite">
|
|
11631
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11632
|
-
<span class="kn">from</span>
|
|
11501
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11502
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11633
11503
|
|
|
11634
11504
|
<span class="k">try</span><span class="p">:</span>
|
|
11635
11505
|
|
|
@@ -11672,103 +11542,6 @@ and the response contains error information.</li>
|
|
|
11672
11542
|
</code></pre>
|
|
11673
11543
|
</div>
|
|
11674
11544
|
|
|
11675
|
-
<p></details></p>
|
|
11676
|
-
</div>
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
</div>
|
|
11680
|
-
<div id="SpotifyClient.PlayerVerifyDeviceDefault" class="classattr">
|
|
11681
|
-
<div class="attr function">
|
|
11682
|
-
|
|
11683
|
-
<span class="def">def</span>
|
|
11684
|
-
<span class="name">PlayerVerifyDeviceDefault</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="bp">self</span>,</span><span class="param"> <span class="n">defaultDeviceId</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span>,</span><span class="param"> <span class="n">play</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>,</span><span class="param"> <span class="n">delay</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.5</span></span><span class="return-annotation">) -> <span class="n"><a href="models/playerplaystate.html#PlayerPlayState">spotifywebapipython.models.playerplaystate.PlayerPlayState</a></span>:</span></span>
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
</div>
|
|
11688
|
-
<a class="headerlink" href="#SpotifyClient.PlayerVerifyDeviceDefault"></a>
|
|
11689
|
-
|
|
11690
|
-
<div class="docstring"><p>Checks to see if there is an active Spotify Connect device, and if not to make one active.</p>
|
|
11691
|
-
|
|
11692
|
-
<p>If no active device was found, then it will activate the device specified by the defaultDeviceId argument
|
|
11693
|
-
and optionally start play on the device.</p>
|
|
11694
|
-
|
|
11695
|
-
<p>This method requires the <code>user-read-playback-state</code> and <code>user-modify-playback-state</code> scope.</p>
|
|
11696
|
-
|
|
11697
|
-
<h6 id="arguments">Arguments:</h6>
|
|
11698
|
-
|
|
11699
|
-
<ul>
|
|
11700
|
-
<li><strong>defaultDeviceId (str):</strong> The id of the device on which playback should be started/transferred if there is
|
|
11701
|
-
currently no active device. <br />
|
|
11702
|
-
Example: <code>0d1841b0976bae2a3a310dd74c0f3df354899bc8</code> </li>
|
|
11703
|
-
<li><strong>play (bool):</strong> The transfer method: <br />
|
|
11704
|
-
<ul>
|
|
11705
|
-
<li><code>True</code> - ensure playback happens on new device. </li>
|
|
11706
|
-
<li><code>False</code> - keep the current playback state. <br />
|
|
11707
|
-
Default: <code>False</code> </li>
|
|
11708
|
-
</ul></li>
|
|
11709
|
-
<li><strong>delay (float):</strong> Time delay (in seconds) to wait AFTER issuing the command to the player. <br />
|
|
11710
|
-
This delay will give the spotify web api time to process the change before
|
|
11711
|
-
another command is issued. <br />
|
|
11712
|
-
Default is 0.50; value range is 0 - 10.</li>
|
|
11713
|
-
</ul>
|
|
11714
|
-
|
|
11715
|
-
<h6 id="returns">Returns:</h6>
|
|
11716
|
-
|
|
11717
|
-
<blockquote>
|
|
11718
|
-
<p>A <code>PlayerPlayState</code> object that contains player state details as well as
|
|
11719
|
-
currently playing content.</p>
|
|
11720
|
-
</blockquote>
|
|
11721
|
-
|
|
11722
|
-
<h6 id="raises">Raises:</h6>
|
|
11723
|
-
|
|
11724
|
-
<ul>
|
|
11725
|
-
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11726
|
-
and the response contains error information.</li>
|
|
11727
|
-
<li><strong>SpotifApiError:</strong> If the method fails for any other reason.</li>
|
|
11728
|
-
</ul>
|
|
11729
|
-
|
|
11730
|
-
<p><details>
|
|
11731
|
-
<summary>Sample Code</summary></p>
|
|
11732
|
-
|
|
11733
|
-
<div class="pdoc-code codehilite">
|
|
11734
|
-
<pre><span></span><code><span class="kn">from</span> <span class="nn">spotifywebapipython</span> <span class="kn">import</span> <span class="o">*</span>
|
|
11735
|
-
<span class="kn">from</span> <span class="nn">spotifywebapipython.models</span> <span class="kn">import</span> <span class="o">*</span>
|
|
11736
|
-
|
|
11737
|
-
<span class="k">try</span><span class="p">:</span>
|
|
11738
|
-
|
|
11739
|
-
<span class="c1"># this sample requires an authorization token, as it requires security scope to accesses user data.</span>
|
|
11740
|
-
|
|
11741
|
-
<span class="n">CLIENT_ID</span><span class="p">:</span><span class="nb">str</span> <span class="o">=</span> <span class="s1">'your_client_id'</span>
|
|
11742
|
-
<span class="n">SPOTIFY_SCOPES</span><span class="p">:</span><span class="nb">list</span> <span class="o">=</span> \
|
|
11743
|
-
<span class="p">[</span>
|
|
11744
|
-
<span class="s1">'user-modify-playback-state'</span><span class="p">,</span>
|
|
11745
|
-
<span class="s1">'user-read-email'</span><span class="p">,</span>
|
|
11746
|
-
<span class="s1">'user-read-playback-state'</span>
|
|
11747
|
-
<span class="p">]</span>
|
|
11748
|
-
|
|
11749
|
-
<span class="c1"># create new spotify client instance.</span>
|
|
11750
|
-
<span class="n">spotify</span><span class="p">:</span><span class="n">SpotifyClient</span> <span class="o">=</span> <span class="n">SpotifyClient</span><span class="p">()</span>
|
|
11751
|
-
|
|
11752
|
-
<span class="c1"># generate a spotify authorization code with PKCE access token (with scope, private and public data use).</span>
|
|
11753
|
-
<span class="n">spotify</span><span class="o">.</span><span class="n">SetAuthTokenAuthorizationCodePKCE</span><span class="p">(</span><span class="n">CLIENT_ID</span><span class="p">,</span> <span class="n">SPOTIFY_SCOPES</span><span class="p">)</span>
|
|
11754
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">Auth Token:</span><span class="se">\n</span><span class="s1"> Type="</span><span class="si">%s</span><span class="s1">"</span><span class="se">\n</span><span class="s1"> Scope="</span><span class="si">%s</span><span class="s1">"'</span> <span class="o">%</span> <span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">AuthToken</span><span class="o">.</span><span class="n">AuthorizationType</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">AuthToken</span><span class="o">.</span><span class="n">Scope</span><span class="p">)))</span>
|
|
11755
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">User:</span><span class="se">\n</span><span class="s1"> DisplayName="</span><span class="si">%s</span><span class="s1">"</span><span class="se">\n</span><span class="s1"> EMail="</span><span class="si">%s</span><span class="s1">"'</span> <span class="o">%</span> <span class="p">(</span><span class="n">spotify</span><span class="o">.</span><span class="n">UserProfile</span><span class="o">.</span><span class="n">DisplayName</span><span class="p">,</span> <span class="n">spotify</span><span class="o">.</span><span class="n">UserProfile</span><span class="o">.</span><span class="n">EMail</span><span class="p">))</span>
|
|
11756
|
-
|
|
11757
|
-
<span class="c1"># verify that Spotify Connect has a default player active.</span>
|
|
11758
|
-
<span class="n">defaultDeviceId</span><span class="p">:</span><span class="nb">str</span> <span class="o">=</span> <span class="s1">'236427c8c0d510caa323f84cb42bc03eec090750'</span>
|
|
11759
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">'</span><span class="se">\n</span><span class="s1">Verifying Spotify Connect player is active; default device if not:</span><span class="se">\n</span><span class="s1">- ID: </span><span class="si">%s</span><span class="s1"> ...'</span> <span class="o">%</span> <span class="p">(</span><span class="n">defaultDeviceId</span><span class="p">))</span>
|
|
11760
|
-
<span class="n">playerState</span><span class="p">:</span><span class="n">PlayerPlayState</span> <span class="o">=</span> <span class="n">spotify</span><span class="o">.</span><span class="n">PlayerVerifyDeviceDefault</span><span class="p">(</span><span class="n">defaultDeviceId</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
|
|
11761
|
-
|
|
11762
|
-
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">playerState</span><span class="p">))</span>
|
|
11763
|
-
<span class="nb">print</span><span class="p">(</span><span class="s1">''</span><span class="p">)</span>
|
|
11764
|
-
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">playerState</span><span class="o">.</span><span class="n">Item</span><span class="p">))</span>
|
|
11765
|
-
|
|
11766
|
-
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
11767
|
-
|
|
11768
|
-
<span class="nb">print</span><span class="p">(</span><span class="s2">"** Exception: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">ex</span><span class="p">))</span>
|
|
11769
|
-
</code></pre>
|
|
11770
|
-
</div>
|
|
11771
|
-
|
|
11772
11545
|
<p></details></p>
|
|
11773
11546
|
</div>
|
|
11774
11547
|
|
|
@@ -11802,7 +11575,7 @@ If null, the currently playing track album uri id value is used.</li>
|
|
|
11802
11575
|
<ul>
|
|
11803
11576
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11804
11577
|
and the response contains error information.</li>
|
|
11805
|
-
<li><strong>
|
|
11578
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11806
11579
|
</ul>
|
|
11807
11580
|
|
|
11808
11581
|
<p>No error will be raised if an album id in the list does not exist in the
|
|
@@ -11815,8 +11588,8 @@ in the Spotify music catalog.</p>
|
|
|
11815
11588
|
<summary>Sample Code</summary></p>
|
|
11816
11589
|
|
|
11817
11590
|
<div class="pdoc-code codehilite">
|
|
11818
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11819
|
-
<span class="kn">from</span>
|
|
11591
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11592
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11820
11593
|
|
|
11821
11594
|
<span class="k">try</span><span class="p">:</span>
|
|
11822
11595
|
|
|
@@ -11889,7 +11662,7 @@ If null, the currently playing audiobook uri id value is used.</li>
|
|
|
11889
11662
|
<ul>
|
|
11890
11663
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11891
11664
|
and the response contains error information.</li>
|
|
11892
|
-
<li><strong>
|
|
11665
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11893
11666
|
</ul>
|
|
11894
11667
|
|
|
11895
11668
|
<p>No error will be raised if a audiobook id in the list does not exist in the
|
|
@@ -11902,8 +11675,8 @@ in the Spotify music catalog.</p>
|
|
|
11902
11675
|
<summary>Sample Code</summary></p>
|
|
11903
11676
|
|
|
11904
11677
|
<div class="pdoc-code codehilite">
|
|
11905
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11906
|
-
<span class="kn">from</span>
|
|
11678
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11679
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11907
11680
|
|
|
11908
11681
|
<span class="k">try</span><span class="p">:</span>
|
|
11909
11682
|
|
|
@@ -11976,7 +11749,7 @@ If null, the currently playing episode uri id value is used.</li>
|
|
|
11976
11749
|
<ul>
|
|
11977
11750
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
11978
11751
|
and the response contains error information.</li>
|
|
11979
|
-
<li><strong>
|
|
11752
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
11980
11753
|
</ul>
|
|
11981
11754
|
|
|
11982
11755
|
<p>No error will be raised if a episode id in the list does not exist in the
|
|
@@ -11989,8 +11762,8 @@ in the Spotify music catalog.</p>
|
|
|
11989
11762
|
<summary>Sample Code</summary></p>
|
|
11990
11763
|
|
|
11991
11764
|
<div class="pdoc-code codehilite">
|
|
11992
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
11993
|
-
<span class="kn">from</span>
|
|
11765
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11766
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11994
11767
|
|
|
11995
11768
|
<span class="k">try</span><span class="p">:</span>
|
|
11996
11769
|
|
|
@@ -12061,7 +11834,7 @@ If null, the currently playing playlist uri id value is used.</li>
|
|
|
12061
11834
|
<ul>
|
|
12062
11835
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12063
11836
|
and the response contains error information.</li>
|
|
12064
|
-
<li><strong>
|
|
11837
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12065
11838
|
</ul>
|
|
12066
11839
|
|
|
12067
11840
|
<p>There is no Spotify Web API endpoint for deleting a playlist. The notion of deleting a playlist is
|
|
@@ -12078,8 +11851,8 @@ previously unfollowed.</p>
|
|
|
12078
11851
|
<summary>Sample Code</summary></p>
|
|
12079
11852
|
|
|
12080
11853
|
<div class="pdoc-code codehilite">
|
|
12081
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12082
|
-
<span class="kn">from</span>
|
|
11854
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11855
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12083
11856
|
|
|
12084
11857
|
<span class="k">try</span><span class="p">:</span>
|
|
12085
11858
|
|
|
@@ -12163,7 +11936,7 @@ Default is null.</li>
|
|
|
12163
11936
|
<ul>
|
|
12164
11937
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12165
11938
|
and the response contains error information.</li>
|
|
12166
|
-
<li><strong>
|
|
11939
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12167
11940
|
</ul>
|
|
12168
11941
|
|
|
12169
11942
|
<p>The <code>snapshotId</code> argument value will be returned if no items were removed; otherwise, a
|
|
@@ -12173,8 +11946,8 @@ new snapshot id value will be returned.</p>
|
|
|
12173
11946
|
<summary>Sample Code</summary></p>
|
|
12174
11947
|
|
|
12175
11948
|
<div class="pdoc-code codehilite">
|
|
12176
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12177
|
-
<span class="kn">from</span>
|
|
11949
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
11950
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12178
11951
|
|
|
12179
11952
|
<span class="k">try</span><span class="p">:</span>
|
|
12180
11953
|
|
|
@@ -12261,7 +12034,7 @@ If null, the currently playing show uri id value is used.</li>
|
|
|
12261
12034
|
<ul>
|
|
12262
12035
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12263
12036
|
and the response contains error information.</li>
|
|
12264
|
-
<li><strong>
|
|
12037
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12265
12038
|
</ul>
|
|
12266
12039
|
|
|
12267
12040
|
<p>No error will be raised if a show id in the list does not exist in the
|
|
@@ -12274,8 +12047,8 @@ in the Spotify music catalog.</p>
|
|
|
12274
12047
|
<summary>Sample Code</summary></p>
|
|
12275
12048
|
|
|
12276
12049
|
<div class="pdoc-code codehilite">
|
|
12277
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12278
|
-
<span class="kn">from</span>
|
|
12050
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12051
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12279
12052
|
|
|
12280
12053
|
<span class="k">try</span><span class="p">:</span>
|
|
12281
12054
|
|
|
@@ -12348,7 +12121,7 @@ If null, the currently playing track uri id value is used.</li>
|
|
|
12348
12121
|
<ul>
|
|
12349
12122
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12350
12123
|
and the response contains error information.</li>
|
|
12351
|
-
<li><strong>
|
|
12124
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12352
12125
|
</ul>
|
|
12353
12126
|
|
|
12354
12127
|
<p>No error will be raised if a track id in the list does not exist in the
|
|
@@ -12361,8 +12134,8 @@ in the Spotify music catalog.</p>
|
|
|
12361
12134
|
<summary>Sample Code</summary></p>
|
|
12362
12135
|
|
|
12363
12136
|
<div class="pdoc-code codehilite">
|
|
12364
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12365
|
-
<span class="kn">from</span>
|
|
12137
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12138
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12366
12139
|
|
|
12367
12140
|
<span class="k">try</span><span class="p">:</span>
|
|
12368
12141
|
|
|
@@ -12450,7 +12223,7 @@ Default is null.</li>
|
|
|
12450
12223
|
<ul>
|
|
12451
12224
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12452
12225
|
and the response contains error information.</li>
|
|
12453
|
-
<li><strong>
|
|
12226
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12454
12227
|
</ul>
|
|
12455
12228
|
|
|
12456
12229
|
<p>The <code>rangeStart</code> and <code>insertBefore</code> arguments are one-offset values; the underlying Spotify
|
|
@@ -12466,8 +12239,8 @@ new snapshot id value will be returned.</p>
|
|
|
12466
12239
|
<summary>Sample Code</summary></p>
|
|
12467
12240
|
|
|
12468
12241
|
<div class="pdoc-code codehilite">
|
|
12469
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12470
|
-
<span class="kn">from</span>
|
|
12242
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12243
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12471
12244
|
|
|
12472
12245
|
<span class="k">try</span><span class="p">:</span>
|
|
12473
12246
|
|
|
@@ -12566,15 +12339,15 @@ A maximum of 100 items can be specified in one request.</li>
|
|
|
12566
12339
|
<ul>
|
|
12567
12340
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12568
12341
|
and the response contains error information.</li>
|
|
12569
|
-
<li><strong>
|
|
12342
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12570
12343
|
</ul>
|
|
12571
12344
|
|
|
12572
12345
|
<p><details>
|
|
12573
12346
|
<summary>Sample Code</summary></p>
|
|
12574
12347
|
|
|
12575
12348
|
<div class="pdoc-code codehilite">
|
|
12576
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12577
|
-
<span class="kn">from</span>
|
|
12349
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12350
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12578
12351
|
|
|
12579
12352
|
<span class="k">try</span><span class="p">:</span>
|
|
12580
12353
|
|
|
@@ -12645,7 +12418,7 @@ If null, the currently playing track album uri id value is used.</li>
|
|
|
12645
12418
|
<ul>
|
|
12646
12419
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12647
12420
|
and the response contains error information.</li>
|
|
12648
|
-
<li><strong>
|
|
12421
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12649
12422
|
</ul>
|
|
12650
12423
|
|
|
12651
12424
|
<p>No error will be raised if an album id in the list already exists in the
|
|
@@ -12658,8 +12431,8 @@ in the Spotify music catalog.</p>
|
|
|
12658
12431
|
<summary>Sample Code</summary></p>
|
|
12659
12432
|
|
|
12660
12433
|
<div class="pdoc-code codehilite">
|
|
12661
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12662
|
-
<span class="kn">from</span>
|
|
12434
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12435
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12663
12436
|
|
|
12664
12437
|
<span class="k">try</span><span class="p">:</span>
|
|
12665
12438
|
|
|
@@ -12732,7 +12505,7 @@ If null, the currently playing audiobook uri id value is used.</li>
|
|
|
12732
12505
|
<ul>
|
|
12733
12506
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12734
12507
|
and the response contains error information.</li>
|
|
12735
|
-
<li><strong>
|
|
12508
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12736
12509
|
</ul>
|
|
12737
12510
|
|
|
12738
12511
|
<p>No error will be raised if an audiobook id in the list already exists in the
|
|
@@ -12745,8 +12518,8 @@ in the Spotify music catalog.</p>
|
|
|
12745
12518
|
<summary>Sample Code</summary></p>
|
|
12746
12519
|
|
|
12747
12520
|
<div class="pdoc-code codehilite">
|
|
12748
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12749
|
-
<span class="kn">from</span>
|
|
12521
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12522
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12750
12523
|
|
|
12751
12524
|
<span class="k">try</span><span class="p">:</span>
|
|
12752
12525
|
|
|
@@ -12819,7 +12592,7 @@ If null, the currently playing episode uri id value is used.</li>
|
|
|
12819
12592
|
<ul>
|
|
12820
12593
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12821
12594
|
and the response contains error information.</li>
|
|
12822
|
-
<li><strong>
|
|
12595
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12823
12596
|
</ul>
|
|
12824
12597
|
|
|
12825
12598
|
<p>No error will be raised if an episode id in the list already exists in the
|
|
@@ -12832,8 +12605,8 @@ in the Spotify music catalog.</p>
|
|
|
12832
12605
|
<summary>Sample Code</summary></p>
|
|
12833
12606
|
|
|
12834
12607
|
<div class="pdoc-code codehilite">
|
|
12835
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12836
|
-
<span class="kn">from</span>
|
|
12608
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12609
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12837
12610
|
|
|
12838
12611
|
<span class="k">try</span><span class="p">:</span>
|
|
12839
12612
|
|
|
@@ -12906,7 +12679,7 @@ If null, the currently playing show uri id value is used.</li>
|
|
|
12906
12679
|
<ul>
|
|
12907
12680
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12908
12681
|
and the response contains error information.</li>
|
|
12909
|
-
<li><strong>
|
|
12682
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12910
12683
|
</ul>
|
|
12911
12684
|
|
|
12912
12685
|
<p>No error will be raised if an show id in the list already exists in the
|
|
@@ -12919,8 +12692,8 @@ in the Spotify music catalog.</p>
|
|
|
12919
12692
|
<summary>Sample Code</summary></p>
|
|
12920
12693
|
|
|
12921
12694
|
<div class="pdoc-code codehilite">
|
|
12922
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
12923
|
-
<span class="kn">from</span>
|
|
12695
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12696
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12924
12697
|
|
|
12925
12698
|
<span class="k">try</span><span class="p">:</span>
|
|
12926
12699
|
|
|
@@ -12993,7 +12766,7 @@ If null, the currently playing track uri id value is used.</li>
|
|
|
12993
12766
|
<ul>
|
|
12994
12767
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
12995
12768
|
and the response contains error information.</li>
|
|
12996
|
-
<li><strong>
|
|
12769
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
12997
12770
|
</ul>
|
|
12998
12771
|
|
|
12999
12772
|
<p>No error will be raised if a track id in the list already exists in the
|
|
@@ -13006,8 +12779,8 @@ in the Spotify music catalog.</p>
|
|
|
13006
12779
|
<summary>Sample Code</summary></p>
|
|
13007
12780
|
|
|
13008
12781
|
<div class="pdoc-code codehilite">
|
|
13009
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13010
|
-
<span class="kn">from</span>
|
|
12782
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12783
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13011
12784
|
|
|
13012
12785
|
<span class="k">try</span><span class="p">:</span>
|
|
13013
12786
|
|
|
@@ -13112,7 +12885,7 @@ Default: None (disabled)</li>
|
|
|
13112
12885
|
<ul>
|
|
13113
12886
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
13114
12887
|
and the response contains error information.</li>
|
|
13115
|
-
<li><strong>
|
|
12888
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
13116
12889
|
</ul>
|
|
13117
12890
|
|
|
13118
12891
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -13122,8 +12895,8 @@ be returned with a search.</p>
|
|
|
13122
12895
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
13123
12896
|
|
|
13124
12897
|
<div class="pdoc-code codehilite">
|
|
13125
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13126
|
-
<span class="kn">from</span>
|
|
12898
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12899
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13127
12900
|
|
|
13128
12901
|
<span class="k">try</span><span class="p">:</span>
|
|
13129
12902
|
|
|
@@ -13195,8 +12968,8 @@ be returned with a search.</p>
|
|
|
13195
12968
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
13196
12969
|
|
|
13197
12970
|
<div class="pdoc-code codehilite">
|
|
13198
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13199
|
-
<span class="kn">from</span>
|
|
12971
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
12972
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13200
12973
|
|
|
13201
12974
|
<span class="k">try</span><span class="p">:</span>
|
|
13202
12975
|
|
|
@@ -13299,7 +13072,7 @@ Default: None (disabled)</li>
|
|
|
13299
13072
|
<ul>
|
|
13300
13073
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
13301
13074
|
and the response contains error information.</li>
|
|
13302
|
-
<li><strong>
|
|
13075
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
13303
13076
|
</ul>
|
|
13304
13077
|
|
|
13305
13078
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -13309,8 +13082,8 @@ be returned with a search.</p>
|
|
|
13309
13082
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
13310
13083
|
|
|
13311
13084
|
<div class="pdoc-code codehilite">
|
|
13312
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13313
|
-
<span class="kn">from</span>
|
|
13085
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13086
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13314
13087
|
|
|
13315
13088
|
<span class="k">try</span><span class="p">:</span>
|
|
13316
13089
|
|
|
@@ -13381,8 +13154,8 @@ be returned with a search.</p>
|
|
|
13381
13154
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
13382
13155
|
|
|
13383
13156
|
<div class="pdoc-code codehilite">
|
|
13384
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13385
|
-
<span class="kn">from</span>
|
|
13157
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13158
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13386
13159
|
|
|
13387
13160
|
<span class="k">try</span><span class="p">:</span>
|
|
13388
13161
|
|
|
@@ -13485,7 +13258,7 @@ Default: None (disabled)</li>
|
|
|
13485
13258
|
<ul>
|
|
13486
13259
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
13487
13260
|
and the response contains error information.</li>
|
|
13488
|
-
<li><strong>
|
|
13261
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
13489
13262
|
</ul>
|
|
13490
13263
|
|
|
13491
13264
|
<p>Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.</p>
|
|
@@ -13497,8 +13270,8 @@ be returned with a search.</p>
|
|
|
13497
13270
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
13498
13271
|
|
|
13499
13272
|
<div class="pdoc-code codehilite">
|
|
13500
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13501
|
-
<span class="kn">from</span>
|
|
13273
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13274
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13502
13275
|
|
|
13503
13276
|
<span class="k">try</span><span class="p">:</span>
|
|
13504
13277
|
|
|
@@ -13576,8 +13349,8 @@ be returned with a search.</p>
|
|
|
13576
13349
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
13577
13350
|
|
|
13578
13351
|
<div class="pdoc-code codehilite">
|
|
13579
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13580
|
-
<span class="kn">from</span>
|
|
13352
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13353
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13581
13354
|
|
|
13582
13355
|
<span class="k">try</span><span class="p">:</span>
|
|
13583
13356
|
|
|
@@ -13687,7 +13460,7 @@ Default: None (disabled)</li>
|
|
|
13687
13460
|
<ul>
|
|
13688
13461
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
13689
13462
|
and the response contains error information.</li>
|
|
13690
|
-
<li><strong>
|
|
13463
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
13691
13464
|
</ul>
|
|
13692
13465
|
|
|
13693
13466
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -13697,8 +13470,8 @@ be returned with a search.</p>
|
|
|
13697
13470
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
13698
13471
|
|
|
13699
13472
|
<div class="pdoc-code codehilite">
|
|
13700
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13701
|
-
<span class="kn">from</span>
|
|
13473
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13474
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13702
13475
|
|
|
13703
13476
|
<span class="k">try</span><span class="p">:</span>
|
|
13704
13477
|
|
|
@@ -13776,8 +13549,8 @@ be returned with a search.</p>
|
|
|
13776
13549
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
13777
13550
|
|
|
13778
13551
|
<div class="pdoc-code codehilite">
|
|
13779
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13780
|
-
<span class="kn">from</span>
|
|
13552
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13553
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13781
13554
|
|
|
13782
13555
|
<span class="k">try</span><span class="p">:</span>
|
|
13783
13556
|
|
|
@@ -13887,7 +13660,7 @@ Default: None (disabled)</li>
|
|
|
13887
13660
|
<ul>
|
|
13888
13661
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
13889
13662
|
and the response contains error information.</li>
|
|
13890
|
-
<li><strong>
|
|
13663
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
13891
13664
|
</ul>
|
|
13892
13665
|
|
|
13893
13666
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -13897,8 +13670,8 @@ be returned with a search.</p>
|
|
|
13897
13670
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
13898
13671
|
|
|
13899
13672
|
<div class="pdoc-code codehilite">
|
|
13900
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13901
|
-
<span class="kn">from</span>
|
|
13673
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13674
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13902
13675
|
|
|
13903
13676
|
<span class="k">try</span><span class="p">:</span>
|
|
13904
13677
|
|
|
@@ -13976,8 +13749,8 @@ be returned with a search.</p>
|
|
|
13976
13749
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
13977
13750
|
|
|
13978
13751
|
<div class="pdoc-code codehilite">
|
|
13979
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
13980
|
-
<span class="kn">from</span>
|
|
13752
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13753
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13981
13754
|
|
|
13982
13755
|
<span class="k">try</span><span class="p">:</span>
|
|
13983
13756
|
|
|
@@ -14087,7 +13860,7 @@ Default: None (disabled)</li>
|
|
|
14087
13860
|
<ul>
|
|
14088
13861
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
14089
13862
|
and the response contains error information.</li>
|
|
14090
|
-
<li><strong>
|
|
13863
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
14091
13864
|
</ul>
|
|
14092
13865
|
|
|
14093
13866
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -14097,8 +13870,8 @@ be returned with a search.</p>
|
|
|
14097
13870
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
14098
13871
|
|
|
14099
13872
|
<div class="pdoc-code codehilite">
|
|
14100
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14101
|
-
<span class="kn">from</span>
|
|
13873
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13874
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14102
13875
|
|
|
14103
13876
|
<span class="k">try</span><span class="p">:</span>
|
|
14104
13877
|
|
|
@@ -14178,8 +13951,8 @@ be returned with a search.</p>
|
|
|
14178
13951
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
14179
13952
|
|
|
14180
13953
|
<div class="pdoc-code codehilite">
|
|
14181
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14182
|
-
<span class="kn">from</span>
|
|
13954
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
13955
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14183
13956
|
|
|
14184
13957
|
<span class="k">try</span><span class="p">:</span>
|
|
14185
13958
|
|
|
@@ -14291,7 +14064,7 @@ Default: None (disabled)</li>
|
|
|
14291
14064
|
<ul>
|
|
14292
14065
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
14293
14066
|
and the response contains error information.</li>
|
|
14294
|
-
<li><strong>
|
|
14067
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
14295
14068
|
</ul>
|
|
14296
14069
|
|
|
14297
14070
|
<p>Note that Spotify Web API automatically limits you to 1,000 max entries per type that can
|
|
@@ -14301,8 +14074,8 @@ be returned with a search.</p>
|
|
|
14301
14074
|
<summary>Sample Code - Manual Paging</summary></p>
|
|
14302
14075
|
|
|
14303
14076
|
<div class="pdoc-code codehilite">
|
|
14304
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14305
|
-
<span class="kn">from</span>
|
|
14077
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14078
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14306
14079
|
|
|
14307
14080
|
<span class="k">try</span><span class="p">:</span>
|
|
14308
14081
|
|
|
@@ -14373,8 +14146,8 @@ be returned with a search.</p>
|
|
|
14373
14146
|
<summary>Sample Code - Auto Paging</summary></p>
|
|
14374
14147
|
|
|
14375
14148
|
<div class="pdoc-code codehilite">
|
|
14376
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14377
|
-
<span class="kn">from</span>
|
|
14149
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14150
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14378
14151
|
|
|
14379
14152
|
<span class="k">try</span><span class="p">:</span>
|
|
14380
14153
|
|
|
@@ -14459,7 +14232,7 @@ Default value is '/'.</li>
|
|
|
14459
14232
|
<h6 id="raises">Raises:</h6>
|
|
14460
14233
|
|
|
14461
14234
|
<ul>
|
|
14462
|
-
<li><strong>
|
|
14235
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any reason.</li>
|
|
14463
14236
|
</ul>
|
|
14464
14237
|
|
|
14465
14238
|
<p>The authorization code flow is suitable for long-running applications (e.g. web and mobile
|
|
@@ -14536,7 +14309,7 @@ Default value is '/'.</li>
|
|
|
14536
14309
|
<h6 id="raises">Raises:</h6>
|
|
14537
14310
|
|
|
14538
14311
|
<ul>
|
|
14539
|
-
<li><strong>
|
|
14312
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any reason.</li>
|
|
14540
14313
|
</ul>
|
|
14541
14314
|
|
|
14542
14315
|
<p>The authorization code with PKCE is the recommended authorization type if you are
|
|
@@ -14627,7 +14400,7 @@ Default: <code>Shared</code> </li>
|
|
|
14627
14400
|
<h6 id="raises">Raises:</h6>
|
|
14628
14401
|
|
|
14629
14402
|
<ul>
|
|
14630
|
-
<li><strong>
|
|
14403
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any reason. </li>
|
|
14631
14404
|
</ul>
|
|
14632
14405
|
|
|
14633
14406
|
<p>Make sure you have the <code>tokenUpdater</code> argument supplied on the class constructor so that
|
|
@@ -14679,7 +14452,7 @@ If null, the currently playing track artist uri id value is used.</li>
|
|
|
14679
14452
|
<ul>
|
|
14680
14453
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
14681
14454
|
and the response contains error information.</li>
|
|
14682
|
-
<li><strong>
|
|
14455
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
14683
14456
|
</ul>
|
|
14684
14457
|
|
|
14685
14458
|
<p>No exception is raised if a specified artist id is not being followed.</p>
|
|
@@ -14688,8 +14461,8 @@ and the response contains error information.</li>
|
|
|
14688
14461
|
<summary>Sample Code</summary></p>
|
|
14689
14462
|
|
|
14690
14463
|
<div class="pdoc-code codehilite">
|
|
14691
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14692
|
-
<span class="kn">from</span>
|
|
14464
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14465
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14693
14466
|
|
|
14694
14467
|
<span class="k">try</span><span class="p">:</span>
|
|
14695
14468
|
|
|
@@ -14761,15 +14534,15 @@ If null, the currently playing playlist uri id value is used.</li>
|
|
|
14761
14534
|
<ul>
|
|
14762
14535
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
14763
14536
|
and the response contains error information.</li>
|
|
14764
|
-
<li><strong>
|
|
14537
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
14765
14538
|
</ul>
|
|
14766
14539
|
|
|
14767
14540
|
<p><details>
|
|
14768
14541
|
<summary>Sample Code</summary></p>
|
|
14769
14542
|
|
|
14770
14543
|
<div class="pdoc-code codehilite">
|
|
14771
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14772
|
-
<span class="kn">from</span>
|
|
14544
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14545
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14773
14546
|
|
|
14774
14547
|
<span class="k">try</span><span class="p">:</span>
|
|
14775
14548
|
|
|
@@ -14844,7 +14617,7 @@ Example: <code>smedjan</code></li>
|
|
|
14844
14617
|
<ul>
|
|
14845
14618
|
<li><strong>SpotifyWebApiError:</strong> If the Spotify Web API request was for a non-authorization service
|
|
14846
14619
|
and the response contains error information.</li>
|
|
14847
|
-
<li><strong>
|
|
14620
|
+
<li><strong>SpotifyApiError:</strong> If the method fails for any other reason.</li>
|
|
14848
14621
|
</ul>
|
|
14849
14622
|
|
|
14850
14623
|
<p>No exception is raised if a specified user id is not being followed.</p>
|
|
@@ -14853,8 +14626,8 @@ and the response contains error information.</li>
|
|
|
14853
14626
|
<summary>Sample Code</summary></p>
|
|
14854
14627
|
|
|
14855
14628
|
<div class="pdoc-code codehilite">
|
|
14856
|
-
<pre><span></span><code><span class="kn">from</span>
|
|
14857
|
-
<span class="kn">from</span>
|
|
14629
|
+
<pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14630
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">spotifywebapipython.models</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
|
|
14858
14631
|
|
|
14859
14632
|
<span class="k">try</span><span class="p">:</span>
|
|
14860
14633
|
|