spotifywebapiPython 1.0.282__py3-none-any.whl → 1.0.284__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.
Files changed (23) hide show
  1. spotifywebapipython/const.py +1 -1
  2. spotifywebapipython/docs/__init__.html +15 -2
  3. spotifywebapipython/docs/index.html +2 -2
  4. spotifywebapipython/docs/search.js +1 -1
  5. spotifywebapipython/docs/spotifywebapipython/const.html +3 -3
  6. spotifywebapipython/docs/spotifywebapipython/saappmessages.html +2 -2
  7. spotifywebapipython/docs/spotifywebapipython/sautils.html +2 -2
  8. spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html +2 -2
  9. spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html +2 -2
  10. spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html +2 -2
  11. spotifywebapipython/docs/spotifywebapipython/spotifyclient.html +11 -3
  12. spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +2 -2
  13. spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html +2 -2
  14. spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html +2 -2
  15. spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
  16. spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
  17. spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html +2 -2
  18. spotifywebapipython/spotifyclient.py +75 -92
  19. {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.284.dist-info}/METADATA +1 -1
  20. {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.284.dist-info}/RECORD +23 -23
  21. {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.284.dist-info}/LICENSE +0 -0
  22. {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.284.dist-info}/WHEEL +0 -0
  23. {spotifywebapipython-1.0.282.dist-info → spotifywebapipython-1.0.284.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 self._ConfigurationData_RLock:
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 self._ConfigurationData_RLock:
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: raise # pass handled exceptions on thru
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: raise # pass handled exceptions on thru
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: raise # pass handled exceptions on thru
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: raise # pass handled exceptions on thru
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: raise # pass handled exceptions on thru
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
@@ -6568,10 +6554,12 @@ class SpotifyClient:
6568
6554
  for item in pageObj.Items:
6569
6555
  # for some reason, Spotify returns duplicates so we have to check before we add.
6570
6556
  if not result.ContainsId(item.Id):
6571
- result.Items.append(item)
6572
- result.Limit = result.ItemsCount
6573
- if result.ItemsCount >= limitTotal:
6574
- break
6557
+ # also ensure item contains basic details; if not, then discard it.
6558
+ if (item.Id is not None) and (item.Uri is not None):
6559
+ result.Items.append(item)
6560
+ result.Limit = result.ItemsCount
6561
+ if result.ItemsCount >= limitTotal:
6562
+ break
6575
6563
 
6576
6564
  # anymore pages to process? if not, then exit the loop.
6577
6565
  if not self._CheckForNextPageWithOffset(pageObj, result.ItemsCount, limit, limitTotal, urlParms):
@@ -6591,7 +6579,10 @@ class SpotifyClient:
6591
6579
  return result, resultMessage
6592
6580
 
6593
6581
  except SpotifyApiError: raise # pass handled exceptions on thru
6594
- except SpotifyWebApiError: raise # pass handled exceptions on thru
6582
+ except SpotifyWebApiError as ex:
6583
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
6584
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
6585
+ raise # pass handled exceptions on thru
6595
6586
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
6596
6587
  except Exception as ex:
6597
6588
 
@@ -7554,11 +7545,6 @@ class SpotifyClient:
7554
7545
  # an elevated authorization access token for the Spotify Web API endpoint call.
7555
7546
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
7556
7547
 
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
7548
  # validations.
7563
7549
  if limit is None:
7564
7550
  limit = 20
@@ -7642,7 +7628,10 @@ class SpotifyClient:
7642
7628
  return result, resultMessage
7643
7629
 
7644
7630
  except SpotifyApiError: raise # pass handled exceptions on thru
7645
- except SpotifyWebApiError: raise # pass handled exceptions on thru
7631
+ except SpotifyWebApiError as ex:
7632
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
7633
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
7634
+ raise # pass handled exceptions on thru
7646
7635
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
7647
7636
  except Exception as ex:
7648
7637
 
@@ -7710,11 +7699,6 @@ class SpotifyClient:
7710
7699
  # an elevated authorization access token for the Spotify Web API endpoint call.
7711
7700
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
7712
7701
 
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
7702
  # validations.
7719
7703
  if (refresh is None):
7720
7704
  refresh = True
@@ -7745,7 +7729,10 @@ class SpotifyClient:
7745
7729
  return result
7746
7730
 
7747
7731
  except SpotifyApiError: raise # pass handled exceptions on thru
7748
- except SpotifyWebApiError: raise # pass handled exceptions on thru
7732
+ except SpotifyWebApiError as ex:
7733
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
7734
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
7735
+ raise # pass handled exceptions on thru
7749
7736
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
7750
7737
  except Exception as ex:
7751
7738
 
@@ -8121,11 +8108,6 @@ class SpotifyClient:
8121
8108
  # an elevated authorization access token for the Spotify Web API endpoint call.
8122
8109
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
8123
8110
 
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
8111
  # validations.
8130
8112
  if (refresh is None):
8131
8113
  refresh = True
@@ -8156,7 +8138,10 @@ class SpotifyClient:
8156
8138
  return result
8157
8139
 
8158
8140
  except SpotifyApiError: raise # pass handled exceptions on thru
8159
- except SpotifyWebApiError: raise # pass handled exceptions on thru
8141
+ except SpotifyWebApiError as ex:
8142
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
8143
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
8144
+ raise # pass handled exceptions on thru
8160
8145
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
8161
8146
  except Exception as ex:
8162
8147
 
@@ -10152,11 +10137,6 @@ class SpotifyClient:
10152
10137
  # an elevated authorization access token for the Spotify Web API endpoint call.
10153
10138
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
10154
10139
 
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
10140
  # validations.
10161
10141
  if limit is None:
10162
10142
  limit = 20
@@ -10232,7 +10212,10 @@ class SpotifyClient:
10232
10212
  return result
10233
10213
 
10234
10214
  except SpotifyApiError: raise # pass handled exceptions on thru
10235
- except SpotifyWebApiError: raise # pass handled exceptions on thru
10215
+ except SpotifyWebApiError as ex:
10216
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
10217
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
10218
+ raise # pass handled exceptions on thru
10236
10219
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
10237
10220
  except Exception as ex:
10238
10221
 
@@ -11445,11 +11428,6 @@ class SpotifyClient:
11445
11428
  # an elevated authorization access token for the Spotify Web API endpoint call.
11446
11429
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
11447
11430
 
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
11431
  # if trackId not specified, then return currently playing track id value.
11454
11432
  if (trackId is None) or (len(trackId.strip()) == 0):
11455
11433
  uri = self.GetPlayerNowPlayingUri(SpotifyMediaTypes.TRACK.value)
@@ -11471,7 +11449,10 @@ class SpotifyClient:
11471
11449
  return result
11472
11450
 
11473
11451
  except SpotifyApiError: raise # pass handled exceptions on thru
11474
- except SpotifyWebApiError: raise # pass handled exceptions on thru
11452
+ except SpotifyWebApiError as ex:
11453
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
11454
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
11455
+ raise # pass handled exceptions on thru
11475
11456
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
11476
11457
  except Exception as ex:
11477
11458
 
@@ -11822,6 +11803,14 @@ class SpotifyClient:
11822
11803
  ids:list[str],
11823
11804
  ) -> list[AudioFeatures]:
11824
11805
  """
11806
+ <span class="deprecated">
11807
+ DEPRECATED - api endpoint no longer supported by Spotify as of 2024/11/27 for unauthorized Spotify Developer Applications.
11808
+ The api endpoint IS still supported by Spotify for authorized Spotify Developer Applications.
11809
+ More information about the deprecated functionality can be found on the
11810
+ <a href="https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api" target="_blank">Spotify Developer Forum Blog</a>
11811
+ page.
11812
+ </span>
11813
+
11825
11814
  Get audio features for multiple tracks based on their Spotify IDs.
11826
11815
 
11827
11816
  Args:
@@ -11868,11 +11857,6 @@ class SpotifyClient:
11868
11857
  # an elevated authorization access token for the Spotify Web API endpoint call.
11869
11858
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
11870
11859
 
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
11860
  # execute spotify web api request.
11877
11861
  msg:SpotifyApiMessage = SpotifyApiMessage(apiMethodName, '/audio-features')
11878
11862
  msg.RequestHeaders[self.AuthToken.HeaderKey] = accessTokenHeaderValue or self.AuthToken.HeaderValue
@@ -11890,7 +11874,10 @@ class SpotifyClient:
11890
11874
  return result
11891
11875
 
11892
11876
  except SpotifyApiError: raise # pass handled exceptions on thru
11893
- except SpotifyWebApiError: raise # pass handled exceptions on thru
11877
+ except SpotifyWebApiError as ex:
11878
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
11879
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
11880
+ raise # pass handled exceptions on thru
11894
11881
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
11895
11882
  except Exception as ex:
11896
11883
 
@@ -12176,11 +12163,6 @@ class SpotifyClient:
12176
12163
  # an elevated authorization access token for the Spotify Web API endpoint call.
12177
12164
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
12178
12165
 
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
12166
  # ensure market was either supplied or implied; default if neither.
12185
12167
  market = self._ValidateMarket(market)
12186
12168
 
@@ -12311,7 +12293,10 @@ class SpotifyClient:
12311
12293
  return result
12312
12294
 
12313
12295
  except SpotifyApiError: raise # pass handled exceptions on thru
12314
- except SpotifyWebApiError: raise # pass handled exceptions on thru
12296
+ except SpotifyWebApiError as ex:
12297
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
12298
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20241127 % apiMethodName)
12299
+ raise # pass handled exceptions on thru
12315
12300
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
12316
12301
  except Exception as ex:
12317
12302
 
@@ -12516,11 +12501,6 @@ class SpotifyClient:
12516
12501
  # an elevated authorization access token for the Spotify Web API endpoint call.
12517
12502
  accessTokenHeaderValue:str = self._GetSpotifyWebPlayerTokenHeaderValue()
12518
12503
 
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
12504
  # execute spotify web api request.
12525
12505
  msg:SpotifyApiMessage = SpotifyApiMessage(apiMethodName, '/users/{id}'.format(id=userId))
12526
12506
  msg.RequestHeaders[self.AuthToken.HeaderKey] = self.AuthToken.HeaderValue
@@ -12534,7 +12514,10 @@ class SpotifyClient:
12534
12514
  return result
12535
12515
 
12536
12516
  except SpotifyApiError: raise # pass handled exceptions on thru
12537
- except SpotifyWebApiError: raise # pass handled exceptions on thru
12517
+ except SpotifyWebApiError as ex:
12518
+ if (ex.Status == 404) and (accessTokenHeaderValue is None):
12519
+ raise SpotifyApiError(SAAppMessages.MSG_SPOTIFY_DEPRECATED_ENDPOINT_20260211 % apiMethodName)
12520
+ raise # pass handled exceptions on thru
12538
12521
  except SpotifyWebApiAuthenticationError: raise # pass handled exceptions on thru
12539
12522
  except Exception as ex:
12540
12523
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spotifywebapipython
3
- Version: 1.0.282
3
+ Version: 1.0.284
4
4
  Summary: Spotify Web API Python3 Library
5
5
  Author: Todd Lucas
6
6
  Author-email: <thlucas@yahoo.com>
@@ -1,36 +1,36 @@
1
1
  spotifywebapipython/__init__.py,sha256=ka7F2AsT-UU7KSYKBnfgl5Trojcep5aQspLutg8D-2k,1306
2
- spotifywebapipython/const.py,sha256=Ojdhql071-swTk703H9mLcEyWGZT-K9SiIhyJrShvGQ,4100
2
+ spotifywebapipython/const.py,sha256=zPF9dM02gWSInMVWBK-7IFXmOAkXRyVUq5079LicDB4,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=Hnun--Wl9wcj2WRvTiOwh-XQN2MA1WhvAr3OaGg9cgk,904318
8
+ spotifywebapipython/spotifyclient.py,sha256=cQpaZ2M34jREG3UEe32Zl-jpp4jVngwV9Pc845pNpW8,902712
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=uzEAfwl3pPKJsGfFhSMeOjk6w8y8DS14dEGXlISfe7M,194122
15
+ spotifywebapipython/docs/__init__.html,sha256=MyISBE8EmR3YoQCB3va835BEtuq8-NneG7dr6WWyjGs,195598
16
16
  spotifywebapipython/docs/codecopy.js,sha256=ryuoZwLIL03YitjjFzn49UO5ta7-OBos6LNA3qHhFzs,3120
17
- spotifywebapipython/docs/index.html,sha256=hvHAnCH5BcywSYk4isssS-EuVRJSqwHWcW2jAcQvQ0I,48779
18
- spotifywebapipython/docs/search.js,sha256=84YxUEgDnZnl4loJ9G53PP3zgzHs7E-UBaCFZT8_p6g,9167238
17
+ spotifywebapipython/docs/index.html,sha256=quPnvCbhZq1dFBsq3opEdx1zFwAk7HJrm6W8vQeDQHM,48779
18
+ spotifywebapipython/docs/search.js,sha256=A11CzP67mL8jImsKyekxeOihNeuVFGnId4_ofc6IW-c,9171567
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=PfPWcfOwrjH17zFv2X3w4dcpv1bT0vi8FdsGcYjAUdE,60537
22
- spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=NVjzW0YtXFFyUsTsxi1F7peLQLFVt2v65W9t7oHQpg8,62358
23
- spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=-D9gnDAzLwX0szdc3778Mzgdkh0boS-FBela1OIiZSI,62031
24
- spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=KwxdaqaLqY1iNtSWXiCgS5su9-TpDTuLhmYhrh85FOs,48054
25
- spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=uqgTHvBb_DPjzP5Gfu3mwMcVSRK3E9ibbuVd0w3YUeA,59210
26
- spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=hBYI7v6HcnWTTWdEoaTAkfudj_3zt3-JXUqyjk-TbbY,59256
27
- spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=qmRfRqyPzab9cqQUEtZnPVklJqcWan0rxu2TT2llyFE,1667821
28
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=00zOIv7Z1EC6TmFdD4gjc9yrbreXm4j_d2tLHHHAbVw,57662
29
- spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=wSylTgIpoQnwm7mvAFJk36DCOhYALRY5-oNPeINur9M,51532
30
- spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=8u41ykptgHdSRQZUqt1yE8O55N1_1YkrOtt0hQJQokk,52401
31
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=n-5940XCCnMr-1U_vhux3NbQnElDVMBY1fcU9h61CHw,52174
32
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=1w52609Ve2T_Q_zDQJxJXsd_UFUO57wunV5kWnmR7-o,50592
33
- spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=1x4Tk_IrcfODApu-FzCU5Ydtg-GyGA9TG0vYhdi_L1c,62204
21
+ spotifywebapipython/docs/spotifywebapipython/const.html,sha256=jqi6lDKLvNUSq_yNdOPrwtuinM3yOC6UsAjg99Mp6ls,60537
22
+ spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=jLcUa4O6p7gIJRf1q3FS769UQbr6T9VlsiFv6Y_cNHU,62358
23
+ spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=5UaToYiQfx5lyiMmXK1Ew7xU-5lpEBul4r9_FwiEKRU,62031
24
+ spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=SEVotKHlOquMBIe6idxQzCBnLZW7VC5Rk_F1UNf1MoE,48054
25
+ spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=IEQE9A3T8k7mi00VgJqwjI6Vc5IMX-pZhGiwuMHRsbY,59210
26
+ spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=uJAQlICNnXKjwzJ_IUfwk1CIMrh-JE4IyDTlMqrhbwY,59256
27
+ spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=mhWBbVwAo9jCBeS3mPXX8AJ3qsxpvh_w5fjiQ-UVJdM,1668314
28
+ spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=NFupfgFDh5E8kmg3uzlzrKw81AFFGNmWFvDKWukpZQo,57662
29
+ spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=cqLOeXZ3UQG0RhyVM1B0N6LUWGwhUJnj_vCaUV8dNY0,51532
30
+ spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=NKpdPlRDHwHsRi6up8Pl1__xTEX0MamsJOJPajjBaFE,52401
31
+ spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=2yOKQcE0h8kfUdLwHlBizimc14_K-3IqI0vD-Xwftb0,52174
32
+ spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=QZMzNtcIopjkGE0hRV82eZN8LwRVUElBxLJhUHztOG0,50592
33
+ spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=TgtOJr-rICwt8XVTjGZmrvJbkRdjYYtgYy9NlOTFS6U,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.282.dist-info/LICENSE,sha256=KGcc9g0zwqNLcWnSn_ezv1UtKyhMENFhvtixpxUPNsE,1177
141
- spotifywebapipython-1.0.282.dist-info/METADATA,sha256=xsOeXo3mR4BQITUaJnpy2XugbwOS_QTa0O-mhSBcshY,11644
142
- spotifywebapipython-1.0.282.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
143
- spotifywebapipython-1.0.282.dist-info/top_level.txt,sha256=jTBLFlijKTesYh2dteAz4vb17qjaqWKeDjpnnwTcrjs,20
144
- spotifywebapipython-1.0.282.dist-info/RECORD,,
140
+ spotifywebapipython-1.0.284.dist-info/LICENSE,sha256=KGcc9g0zwqNLcWnSn_ezv1UtKyhMENFhvtixpxUPNsE,1177
141
+ spotifywebapipython-1.0.284.dist-info/METADATA,sha256=D3HJYWLkNQJ2qFblyMp55fBGNaoMq0TRuUNhZ6G0xts,11644
142
+ spotifywebapipython-1.0.284.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
143
+ spotifywebapipython-1.0.284.dist-info/top_level.txt,sha256=jTBLFlijKTesYh2dteAz4vb17qjaqWKeDjpnnwTcrjs,20
144
+ spotifywebapipython-1.0.284.dist-info/RECORD,,