spotifywebapiPython 1.0.282__py3-none-any.whl → 1.0.283__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.
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +9 -2
- spotifywebapipython/docs/index.html +2 -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 +2 -2
- 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 +11 -3
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html +2 -2
- spotifywebapipython/spotifyclient.py +69 -88
- {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/METADATA +1 -1
- {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/RECORD +23 -23
- {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/LICENSE +0 -0
- {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/WHEEL +0 -0
- {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/top_level.txt +0 -0
|
@@ -111,7 +111,9 @@ class SpotifyClient:
|
|
|
111
111
|
SpotifyWebApiUrlBase = SPOTIFY_WEBAPI_URL_BASE
|
|
112
112
|
""" Url base name used to access tthe Spotify Web API. """
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
_ConfigurationData_RLock:threading.RLock = threading.RLock()
|
|
115
|
+
""" ConfigurationData file thread lock variable. """
|
|
116
|
+
|
|
115
117
|
def __init__(
|
|
116
118
|
self,
|
|
117
119
|
manager:PoolManager=None,
|
|
@@ -224,7 +226,6 @@ class SpotifyClient:
|
|
|
224
226
|
self._AuthClient:AuthClient = None
|
|
225
227
|
self._ConfigurationCache:dict = {}
|
|
226
228
|
self._ConfigurationDataPath:str = None
|
|
227
|
-
self._ConfigurationData_RLock:threading.RLock = threading.RLock()
|
|
228
229
|
self._DefaultDeviceId:str = None
|
|
229
230
|
self._HasSpotifyWebPlayerCredentials:bool = False
|
|
230
231
|
self._IsDisposed:bool = False
|
|
@@ -966,7 +967,7 @@ class SpotifyClient:
|
|
|
966
967
|
_logsi.LogVerbose("Config data storage file path: \"%s\"" % (self._ConfigurationDataPath))
|
|
967
968
|
|
|
968
969
|
# make the following thread-safe, so we don't read / write the config at the same time.
|
|
969
|
-
with
|
|
970
|
+
with SpotifyClient._ConfigurationData_RLock:
|
|
970
971
|
|
|
971
972
|
# does the config data file exist?
|
|
972
973
|
if os.path.exists(self._ConfigurationDataPath):
|
|
@@ -1032,7 +1033,7 @@ class SpotifyClient:
|
|
|
1032
1033
|
_logsi.LogValue(SILevel.Verbose, "Config data storage value (non-dict)", dataValue)
|
|
1033
1034
|
|
|
1034
1035
|
# make the following thread-safe, so we don't read / write the config at the same time.
|
|
1035
|
-
with
|
|
1036
|
+
with SpotifyClient._ConfigurationData_RLock:
|
|
1036
1037
|
|
|
1037
1038
|
dataKeys:dict = {}
|
|
1038
1039
|
|
|
@@ -3928,11 +3929,6 @@ class SpotifyClient:
|
|
|
3928
3929
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
3929
3930
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
3930
3931
|
|
|
3931
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
3932
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
3933
|
-
if (accessTokenHeaderValue is None):
|
|
3934
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
3935
|
-
|
|
3936
3932
|
# validations.
|
|
3937
3933
|
if limit is None:
|
|
3938
3934
|
limit = 20
|
|
@@ -4011,7 +4007,10 @@ class SpotifyClient:
|
|
|
4011
4007
|
return result
|
|
4012
4008
|
|
|
4013
4009
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
4014
|
-
except SpotifyWebApiError
|
|
4010
|
+
except SpotifyWebApiError as ex:
|
|
4011
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
4012
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
4013
|
+
raise # pass handled exceptions on thru
|
|
4015
4014
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
4016
4015
|
except Exception as ex:
|
|
4017
4016
|
|
|
@@ -4971,11 +4970,6 @@ class SpotifyClient:
|
|
|
4971
4970
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
4972
4971
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
4973
4972
|
|
|
4974
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
4975
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
4976
|
-
if (accessTokenHeaderValue is None):
|
|
4977
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
4978
|
-
|
|
4979
4973
|
# validations.
|
|
4980
4974
|
if sortResult is None:
|
|
4981
4975
|
sortResult = True
|
|
@@ -5009,7 +5003,10 @@ class SpotifyClient:
|
|
|
5009
5003
|
return result
|
|
5010
5004
|
|
|
5011
5005
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
5012
|
-
except SpotifyWebApiError
|
|
5006
|
+
except SpotifyWebApiError as ex:
|
|
5007
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
5008
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
5009
|
+
raise # pass handled exceptions on thru
|
|
5013
5010
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
5014
5011
|
except Exception as ex:
|
|
5015
5012
|
|
|
@@ -5346,11 +5343,6 @@ class SpotifyClient:
|
|
|
5346
5343
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
5347
5344
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
5348
5345
|
|
|
5349
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
5350
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
5351
|
-
if (accessTokenHeaderValue is None):
|
|
5352
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
5353
|
-
|
|
5354
5346
|
# validations.
|
|
5355
5347
|
if sortResult is None:
|
|
5356
5348
|
sortResult = True
|
|
@@ -5393,7 +5385,10 @@ class SpotifyClient:
|
|
|
5393
5385
|
return result
|
|
5394
5386
|
|
|
5395
5387
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
5396
|
-
except SpotifyWebApiError
|
|
5388
|
+
except SpotifyWebApiError as ex:
|
|
5389
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
5390
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
5391
|
+
raise # pass handled exceptions on thru
|
|
5397
5392
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
5398
5393
|
except Exception as ex:
|
|
5399
5394
|
|
|
@@ -6041,11 +6036,6 @@ class SpotifyClient:
|
|
|
6041
6036
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
6042
6037
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
6043
6038
|
|
|
6044
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
6045
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
6046
|
-
if (accessTokenHeaderValue is None):
|
|
6047
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
6048
|
-
|
|
6049
6039
|
# validations.
|
|
6050
6040
|
if (refresh is None):
|
|
6051
6041
|
refresh = True
|
|
@@ -6086,7 +6076,10 @@ class SpotifyClient:
|
|
|
6086
6076
|
return result
|
|
6087
6077
|
|
|
6088
6078
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
6089
|
-
except SpotifyWebApiError
|
|
6079
|
+
except SpotifyWebApiError as ex:
|
|
6080
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
6081
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
6082
|
+
raise # pass handled exceptions on thru
|
|
6090
6083
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
6091
6084
|
except Exception as ex:
|
|
6092
6085
|
|
|
@@ -6197,11 +6190,6 @@ class SpotifyClient:
|
|
|
6197
6190
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
6198
6191
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
6199
6192
|
|
|
6200
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
6201
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
6202
|
-
if (accessTokenHeaderValue is None):
|
|
6203
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
6204
|
-
|
|
6205
6193
|
# validations.
|
|
6206
6194
|
if limit is None:
|
|
6207
6195
|
limit = 20
|
|
@@ -6282,7 +6270,10 @@ class SpotifyClient:
|
|
|
6282
6270
|
return result
|
|
6283
6271
|
|
|
6284
6272
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
6285
|
-
except SpotifyWebApiError
|
|
6273
|
+
except SpotifyWebApiError as ex:
|
|
6274
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
6275
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
6276
|
+
raise # pass handled exceptions on thru
|
|
6286
6277
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
6287
6278
|
except Exception as ex:
|
|
6288
6279
|
|
|
@@ -6504,11 +6495,6 @@ class SpotifyClient:
|
|
|
6504
6495
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
6505
6496
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
6506
6497
|
|
|
6507
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
6508
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
6509
|
-
if (accessTokenHeaderValue is None):
|
|
6510
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
6511
|
-
|
|
6512
6498
|
# validations.
|
|
6513
6499
|
if limit is None:
|
|
6514
6500
|
limit = 20
|
|
@@ -6591,7 +6577,10 @@ class SpotifyClient:
|
|
|
6591
6577
|
return result, resultMessage
|
|
6592
6578
|
|
|
6593
6579
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
6594
|
-
except SpotifyWebApiError
|
|
6580
|
+
except SpotifyWebApiError as ex:
|
|
6581
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
6582
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
6583
|
+
raise # pass handled exceptions on thru
|
|
6595
6584
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
6596
6585
|
except Exception as ex:
|
|
6597
6586
|
|
|
@@ -7554,11 +7543,6 @@ class SpotifyClient:
|
|
|
7554
7543
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
7555
7544
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
7556
7545
|
|
|
7557
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
7558
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
7559
|
-
if (accessTokenHeaderValue is None):
|
|
7560
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
7561
|
-
|
|
7562
7546
|
# validations.
|
|
7563
7547
|
if limit is None:
|
|
7564
7548
|
limit = 20
|
|
@@ -7642,7 +7626,10 @@ class SpotifyClient:
|
|
|
7642
7626
|
return result, resultMessage
|
|
7643
7627
|
|
|
7644
7628
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
7645
|
-
except SpotifyWebApiError
|
|
7629
|
+
except SpotifyWebApiError as ex:
|
|
7630
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
7631
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
7632
|
+
raise # pass handled exceptions on thru
|
|
7646
7633
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
7647
7634
|
except Exception as ex:
|
|
7648
7635
|
|
|
@@ -7710,11 +7697,6 @@ class SpotifyClient:
|
|
|
7710
7697
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
7711
7698
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
7712
7699
|
|
|
7713
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
7714
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
7715
|
-
if (accessTokenHeaderValue is None):
|
|
7716
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
7717
|
-
|
|
7718
7700
|
# validations.
|
|
7719
7701
|
if (refresh is None):
|
|
7720
7702
|
refresh = True
|
|
@@ -7745,7 +7727,10 @@ class SpotifyClient:
|
|
|
7745
7727
|
return result
|
|
7746
7728
|
|
|
7747
7729
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
7748
|
-
except SpotifyWebApiError
|
|
7730
|
+
except SpotifyWebApiError as ex:
|
|
7731
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
7732
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
7733
|
+
raise # pass handled exceptions on thru
|
|
7749
7734
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
7750
7735
|
except Exception as ex:
|
|
7751
7736
|
|
|
@@ -8121,11 +8106,6 @@ class SpotifyClient:
|
|
|
8121
8106
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
8122
8107
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
8123
8108
|
|
|
8124
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
8125
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
8126
|
-
if (accessTokenHeaderValue is None):
|
|
8127
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
8128
|
-
|
|
8129
8109
|
# validations.
|
|
8130
8110
|
if (refresh is None):
|
|
8131
8111
|
refresh = True
|
|
@@ -8156,7 +8136,10 @@ class SpotifyClient:
|
|
|
8156
8136
|
return result
|
|
8157
8137
|
|
|
8158
8138
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
8159
|
-
except SpotifyWebApiError
|
|
8139
|
+
except SpotifyWebApiError as ex:
|
|
8140
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
8141
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
8142
|
+
raise # pass handled exceptions on thru
|
|
8160
8143
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
8161
8144
|
except Exception as ex:
|
|
8162
8145
|
|
|
@@ -10152,11 +10135,6 @@ class SpotifyClient:
|
|
|
10152
10135
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
10153
10136
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
10154
10137
|
|
|
10155
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
10156
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
10157
|
-
if (accessTokenHeaderValue is None):
|
|
10158
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
10159
|
-
|
|
10160
10138
|
# validations.
|
|
10161
10139
|
if limit is None:
|
|
10162
10140
|
limit = 20
|
|
@@ -10232,7 +10210,10 @@ class SpotifyClient:
|
|
|
10232
10210
|
return result
|
|
10233
10211
|
|
|
10234
10212
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
10235
|
-
except SpotifyWebApiError
|
|
10213
|
+
except SpotifyWebApiError as ex:
|
|
10214
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
10215
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
10216
|
+
raise # pass handled exceptions on thru
|
|
10236
10217
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
10237
10218
|
except Exception as ex:
|
|
10238
10219
|
|
|
@@ -11445,11 +11426,6 @@ class SpotifyClient:
|
|
|
11445
11426
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
11446
11427
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
11447
11428
|
|
|
11448
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
11449
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
11450
|
-
if (accessTokenHeaderValue is None):
|
|
11451
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
11452
|
-
|
|
11453
11429
|
# if trackId not specified, then return currently playing track id value.
|
|
11454
11430
|
if (trackId is None) or (len(trackId.strip()) == 0):
|
|
11455
11431
|
uri = self.GetPlayerNowPlayingUri(SpotifyMediaTypes.TRACK.value)
|
|
@@ -11471,7 +11447,10 @@ class SpotifyClient:
|
|
|
11471
11447
|
return result
|
|
11472
11448
|
|
|
11473
11449
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
11474
|
-
except SpotifyWebApiError
|
|
11450
|
+
except SpotifyWebApiError as ex:
|
|
11451
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
11452
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
11453
|
+
raise # pass handled exceptions on thru
|
|
11475
11454
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
11476
11455
|
except Exception as ex:
|
|
11477
11456
|
|
|
@@ -11822,6 +11801,14 @@ class SpotifyClient:
|
|
|
11822
11801
|
ids:list[str],
|
|
11823
11802
|
) -> list[AudioFeatures]:
|
|
11824
11803
|
"""
|
|
11804
|
+
<span class="deprecated">
|
|
11805
|
+
DEPRECATED - api endpoint no longer supported by Spotify as of 2024/11/27 for unauthorized Spotify Developer Applications.
|
|
11806
|
+
The api endpoint IS still supported by Spotify for authorized Spotify Developer Applications.
|
|
11807
|
+
More information about the deprecated functionality can be found on the
|
|
11808
|
+
<a href="https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api" target="_blank">Spotify Developer Forum Blog</a>
|
|
11809
|
+
page.
|
|
11810
|
+
</span>
|
|
11811
|
+
|
|
11825
11812
|
Get audio features for multiple tracks based on their Spotify IDs.
|
|
11826
11813
|
|
|
11827
11814
|
Args:
|
|
@@ -11868,11 +11855,6 @@ class SpotifyClient:
|
|
|
11868
11855
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
11869
11856
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
11870
11857
|
|
|
11871
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
11872
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
11873
|
-
if (accessTokenHeaderValue is None):
|
|
11874
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
11875
|
-
|
|
11876
11858
|
# execute spotify web api request.
|
|
11877
11859
|
msg:SpotifyApiMessage = SpotifyApiMessage(apiMethodName, '/audio-features')
|
|
11878
11860
|
msg.RequestHeaders[self.AuthToken.HeaderKey] = accessTokenHeaderValue or self.AuthToken.HeaderValue
|
|
@@ -11890,7 +11872,10 @@ class SpotifyClient:
|
|
|
11890
11872
|
return result
|
|
11891
11873
|
|
|
11892
11874
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
11893
|
-
except SpotifyWebApiError
|
|
11875
|
+
except SpotifyWebApiError as ex:
|
|
11876
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
11877
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
11878
|
+
raise # pass handled exceptions on thru
|
|
11894
11879
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
11895
11880
|
except Exception as ex:
|
|
11896
11881
|
|
|
@@ -12176,11 +12161,6 @@ class SpotifyClient:
|
|
|
12176
12161
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
12177
12162
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
12178
12163
|
|
|
12179
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
12180
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2024/11/27.
|
|
12181
|
-
if (accessTokenHeaderValue is None):
|
|
12182
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
12183
|
-
|
|
12184
12164
|
# ensure market was either supplied or implied; default if neither.
|
|
12185
12165
|
market = self._ValidateMarket(market)
|
|
12186
12166
|
|
|
@@ -12311,7 +12291,10 @@ class SpotifyClient:
|
|
|
12311
12291
|
return result
|
|
12312
12292
|
|
|
12313
12293
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
12314
|
-
except SpotifyWebApiError
|
|
12294
|
+
except SpotifyWebApiError as ex:
|
|
12295
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
12296
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
|
|
12297
|
+
raise # pass handled exceptions on thru
|
|
12315
12298
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
12316
12299
|
except Exception as ex:
|
|
12317
12300
|
|
|
@@ -12516,11 +12499,6 @@ class SpotifyClient:
|
|
|
12516
12499
|
# an elevated authorization access token for the Spotify Web API endpoint call.
|
|
12517
12500
|
accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
|
|
12518
12501
|
|
|
12519
|
-
# if spotify web player credentials not configured then we are done; the Spotify Web API
|
|
12520
|
-
# endpoint is no longer supported by unauthorized Spotify Developer Applications as of 2026/02/11.
|
|
12521
|
-
if (accessTokenHeaderValue is None):
|
|
12522
|
-
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
12523
|
-
|
|
12524
12502
|
# execute spotify web api request.
|
|
12525
12503
|
msg:SpotifyApiMessage = SpotifyApiMessage(apiMethodName, '/users/{id}'.format(id=userId))
|
|
12526
12504
|
msg.RequestHeaders[self.AuthToken.HeaderKey] = self.AuthToken.HeaderValue
|
|
@@ -12534,7 +12512,10 @@ class SpotifyClient:
|
|
|
12534
12512
|
return result
|
|
12535
12513
|
|
|
12536
12514
|
except SpotifyApiError: raise # pass handled exceptions on thru
|
|
12537
|
-
except SpotifyWebApiError
|
|
12515
|
+
except SpotifyWebApiError as ex:
|
|
12516
|
+
if (ex.Status == 404) and (accessTokenHeaderValue is None):
|
|
12517
|
+
raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
|
|
12518
|
+
raise # pass handled exceptions on thru
|
|
12538
12519
|
except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
|
|
12539
12520
|
except Exception as ex:
|
|
12540
12521
|
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
spotifywebapipython/__init__.py,sha256=ka7F2AsT-UU7KSYKBnfgl5Trojcep5aQspLutg8D-2k,1306
|
|
2
|
-
spotifywebapipython/const.py,sha256=
|
|
2
|
+
spotifywebapipython/const.py,sha256=iS__kJz6QaHecRQQ5mUxTSZRDVUnSgf0AqTxqAweAKY,4100
|
|
3
3
|
spotifywebapipython/saappmessages.py,sha256=mVprjpd5CdD8kYeAkLzRvMvIQPmaYtH4UCP5my3QhSk,5065
|
|
4
4
|
spotifywebapipython/sautils.py,sha256=LZF3UvxaBK35WIg1hO37nbW8j1y-M-oOxRbi1dPR39w,8746
|
|
5
5
|
spotifywebapipython/spotifyapierror.py,sha256=23_CYlxWN0BceYYCLpBpunl55vEwPr_wFf34l74xzeA,1855
|
|
6
6
|
spotifywebapipython/spotifyapimessage.py,sha256=wCnW8jYMLS3x9kjyXPgXXZqaf1HeMTTXzU8u_Dm5pfA,8447
|
|
7
7
|
spotifywebapipython/spotifyauthtoken.py,sha256=iVg2Pa5mfMqYe4qgc5H8td6JzJlaDqk4vMEhH5LmtfI,9289
|
|
8
|
-
spotifywebapipython/spotifyclient.py,sha256=
|
|
8
|
+
spotifywebapipython/spotifyclient.py,sha256=NzIiPh31G6xoDFqPFUsiX8yvfgf9Et3kuA7WMCEoIBg,902517
|
|
9
9
|
spotifywebapipython/spotifydiscovery.py,sha256=cyysxl8PQj9yGHVbaqhSF3SStlrp-NvfGAudM-dDmg0,20290
|
|
10
10
|
spotifywebapipython/spotifymediatypes.py,sha256=hMjkxhbfTtks0_P8BKmY7qg3EmB2zhH3RT0DbEpb_2s,1628
|
|
11
11
|
spotifywebapipython/spotifytypeprefixes.py,sha256=3yfpxKF7jF694qBuo-PbKYvm70YwwdBoGj9enOpWsAg,1375
|
|
12
12
|
spotifywebapipython/spotifywebapiauthenticationerror.py,sha256=5A0MKvYo3Ypv0ZeSSfLHuFLwzoUUu044bBoUgMfNXNw,3940
|
|
13
13
|
spotifywebapipython/spotifywebapierror.py,sha256=5cga9213J_nFQ0UX4vSn3dpyinASKTRiH0wAR4nLjvs,3147
|
|
14
14
|
spotifywebapipython/spotifywebplayertoken.py,sha256=axj1j1lM7COiiZfpElkJRdnk4AmE6bAQcjKshUIz1Nk,35813
|
|
15
|
-
spotifywebapipython/docs/__init__.html,sha256=
|
|
15
|
+
spotifywebapipython/docs/__init__.html,sha256=O8Svi6kT92ghsiT_kSp6J0Z1OvV2x1snZHuorcwy6Ns,195365
|
|
16
16
|
spotifywebapipython/docs/codecopy.js,sha256=ryuoZwLIL03YitjjFzn49UO5ta7-OBos6LNA3qHhFzs,3120
|
|
17
|
-
spotifywebapipython/docs/index.html,sha256=
|
|
18
|
-
spotifywebapipython/docs/search.js,sha256=
|
|
17
|
+
spotifywebapipython/docs/index.html,sha256=av18zDeDp-kwEL19UyHRSRX5JzNQV08YyUZ3NypVzac,48779
|
|
18
|
+
spotifywebapipython/docs/search.js,sha256=OUi4MT9MXTVP17OwHcTf55NXp_PBW3VJAdPIPDB0uIc,9171272
|
|
19
19
|
spotifywebapipython/docs/spotifywebapipython.ico,sha256=YImj39fqqSPSuB2-sMDlUYDd6YwRfQeJRtq4FjwWglg,16410
|
|
20
20
|
spotifywebapipython/docs/spotifywebapipython_OLD.ico,sha256=YIv5LjcD4bTIJQSOr8jjwbWaeB3QkElRwkTOePiGbZo,14904
|
|
21
|
-
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=
|
|
22
|
-
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=
|
|
23
|
-
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256
|
|
24
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=
|
|
25
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=
|
|
26
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256
|
|
27
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256
|
|
28
|
-
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=
|
|
29
|
-
spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=
|
|
30
|
-
spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=
|
|
31
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=
|
|
32
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=
|
|
33
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=
|
|
21
|
+
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=eyRO2MpqRG-NA9-QILFEgYmgQLzDlQV8aalsUn3EPBY,60537
|
|
22
|
+
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=OdPVS5aHlrighXby_NU8UUW4zcqHQ6LYyBDpt2RlAxc,62358
|
|
23
|
+
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=IDWCheGK_ZmCHazC-kwTYi0rX4bX1kYOToLgkMg4TKY,62031
|
|
24
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=avS5Sm0FYqi6cUmze4J-Sm6p4L9di0KOSD7AWqGGgn4,48054
|
|
25
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=ptiu_0M9BL_OCDapDKQTbr43oWR9mcThg0S-3vEMxek,59210
|
|
26
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=-nDHDW_jdnvgGu5umO4Iy2WO2n8GQa0S2BVAj7REKHI,59256
|
|
27
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=-7q9twxnuUN7c600KUPWVLGG5h1UnO38U5Fsefl2A3A,1668314
|
|
28
|
+
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=tGuVCvrGah0266rxj1PCZJs0sozNr3ekSsuDZ8qzUgc,57662
|
|
29
|
+
spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=ykxpwCif4kD8EsWhpFhC00MLdemeQAWJHjwQ9_UPW98,51532
|
|
30
|
+
spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=onIWzfeee8wO29FEgu6DrP1RW_-uHzD7vdc6CtxMwEc,52401
|
|
31
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=l2UlouP3ABtc109a_dq9Y4tlyLW9aIBpC3dpg1Lqt5A,52174
|
|
32
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=a_9xN1WE4WDhwNURLtTm-nc7cbcax264bIUeBEWG8A4,50592
|
|
33
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=PEyyRZCV2HYM5gJnET_JHWT0VglSBPRsjPBdo-Bgtfk,62204
|
|
34
34
|
spotifywebapipython/models/__init__.py,sha256=RwRQhUX-6EUs8XvStVFpR8EPwoqIAz9K6ref-28qHKI,4423
|
|
35
35
|
spotifywebapipython/models/album.py,sha256=U3Pdw0-EL33LdkeiN31fjZ23rlLk6DNGV8jRmZU7EyQ,5170
|
|
36
36
|
spotifywebapipython/models/albumpagesaved.py,sha256=SBYMhkh5ZsMrRAXl-cm9zsxMDh8gO190ENq6Py2TyGY,2417
|
|
@@ -137,8 +137,8 @@ spotifywebapipython/zeroconfapi/zeroconfgetinfo.py,sha256=APayso_F7lCsdzzrkescgd
|
|
|
137
137
|
spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py,sha256=FZJM23HIPJSfhXIC3-EuS1XhawheoG5maSp7__k4yBo,2932
|
|
138
138
|
spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py,sha256=c5uk8ljsIuBK3w2jahHKQuoWvm245LOjUBitetXx5Mo,2347
|
|
139
139
|
spotifywebapipython/zeroconfapi/zeroconfresponse.py,sha256=mAPIDj5MG53x8peiScrp7OJblwy_o_Sto4wqE0rGujU,6445
|
|
140
|
-
spotifywebapipython-1.0.
|
|
141
|
-
spotifywebapipython-1.0.
|
|
142
|
-
spotifywebapipython-1.0.
|
|
143
|
-
spotifywebapipython-1.0.
|
|
144
|
-
spotifywebapipython-1.0.
|
|
140
|
+
spotifywebapipython-1.0.283.dist-info/LICENSE,sha256=KGcc9g0zwqNLcWnSn_ezv1UtKyhMENFhvtixpxUPNsE,1177
|
|
141
|
+
spotifywebapipython-1.0.283.dist-info/METADATA,sha256=rih1562SfVNUg8xWKfC6vzT6q3QnF7PzwRji220r3sw,11644
|
|
142
|
+
spotifywebapipython-1.0.283.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
143
|
+
spotifywebapipython-1.0.283.dist-info/top_level.txt,sha256=jTBLFlijKTesYh2dteAz4vb17qjaqWKeDjpnnwTcrjs,20
|
|
144
|
+
spotifywebapipython-1.0.283.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.283.dist-info}/top_level.txt
RENAMED
|
File without changes
|