spotifywebapiPython 1.0.30__py3-none-any.whl → 1.0.32__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.

Files changed (50) hide show
  1. {spotifywebapiPython-1.0.30.dist-info → spotifywebapiPython-1.0.32.dist-info}/METADATA +1 -1
  2. {spotifywebapiPython-1.0.30.dist-info → spotifywebapiPython-1.0.32.dist-info}/RECORD +50 -50
  3. spotifywebapipython/const.py +1 -1
  4. spotifywebapipython/docs/__init__.html +15 -2
  5. spotifywebapipython/docs/index.html +2 -2
  6. spotifywebapipython/docs/search.js +1 -1
  7. spotifywebapipython/docs/spotifywebapiPython/const.html +3 -3
  8. spotifywebapipython/docs/spotifywebapiPython/saappmessages.html +2 -2
  9. spotifywebapipython/docs/spotifywebapiPython/sautils.html +2 -2
  10. spotifywebapipython/docs/spotifywebapiPython/spotifyapierror.html +2 -2
  11. spotifywebapipython/docs/spotifywebapiPython/spotifyapimessage.html +2 -2
  12. spotifywebapipython/docs/spotifywebapiPython/spotifyauthtoken.html +2 -2
  13. spotifywebapipython/docs/spotifywebapiPython/spotifyclient.html +53 -53
  14. spotifywebapipython/docs/spotifywebapiPython/spotifydiscovery.html +2 -2
  15. spotifywebapipython/docs/spotifywebapiPython/spotifywebapiauthenticationerror.html +2 -2
  16. spotifywebapipython/docs/spotifywebapiPython/spotifywebapierror.html +2 -2
  17. spotifywebapipython/models/album.py +8 -6
  18. spotifywebapipython/models/albumpagesaved.py +4 -3
  19. spotifywebapipython/models/albumpagesimplified.py +4 -3
  20. spotifywebapipython/models/albumsimplified.py +9 -7
  21. spotifywebapipython/models/artist.py +8 -6
  22. spotifywebapipython/models/artistpage.py +4 -3
  23. spotifywebapipython/models/audiobookpagesimplified.py +4 -3
  24. spotifywebapipython/models/audiobooksimplified.py +18 -14
  25. spotifywebapipython/models/category.py +4 -3
  26. spotifywebapipython/models/categorypage.py +4 -3
  27. spotifywebapipython/models/chapterpagesimplified.py +4 -3
  28. spotifywebapipython/models/chaptersimplified.py +6 -5
  29. spotifywebapipython/models/episodepagesaved.py +4 -3
  30. spotifywebapipython/models/episodepagesimplified.py +4 -3
  31. spotifywebapipython/models/episodesimplified.py +5 -4
  32. spotifywebapipython/models/playerqueueinfo.py +13 -10
  33. spotifywebapipython/models/playhistorypage.py +4 -3
  34. spotifywebapipython/models/playlistpage.py +4 -3
  35. spotifywebapipython/models/playlistpagesimplified.py +4 -3
  36. spotifywebapipython/models/playlistsimplified.py +4 -3
  37. spotifywebapipython/models/showpagesaved.py +4 -3
  38. spotifywebapipython/models/showpagesimplified.py +4 -3
  39. spotifywebapipython/models/showsimplified.py +10 -8
  40. spotifywebapipython/models/trackpage.py +4 -3
  41. spotifywebapipython/models/trackpagesaved.py +4 -3
  42. spotifywebapipython/models/trackpagesimplified.py +4 -3
  43. spotifywebapipython/models/trackrecommendations.py +8 -6
  44. spotifywebapipython/models/tracksimplified.py +5 -4
  45. spotifywebapipython/models/userprofilesimplified.py +4 -3
  46. spotifywebapipython/oauthcli/authclient.py +1 -1
  47. spotifywebapipython/spotifyclient.py +54 -72
  48. {spotifywebapiPython-1.0.30.dist-info → spotifywebapiPython-1.0.32.dist-info}/LICENSE +0 -0
  49. {spotifywebapiPython-1.0.30.dist-info → spotifywebapiPython-1.0.32.dist-info}/WHEEL +0 -0
  50. {spotifywebapiPython-1.0.30.dist-info → spotifywebapiPython-1.0.32.dist-info}/top_level.txt +0 -0
@@ -2349,7 +2349,6 @@ class SpotifyClient:
2349
2349
  # are we auto-paging? if so, then use max limit.
2350
2350
  if limitTotal > 0:
2351
2351
  limit = 50
2352
- #limit = 2 # TEST TODO
2353
2352
  if limit > limitTotal:
2354
2353
  limit = limitTotal
2355
2354
  result = AlbumPageSaved()
@@ -2504,7 +2503,6 @@ class SpotifyClient:
2504
2503
  # are we auto-paging? if so, then use max limit.
2505
2504
  if limitTotal > 0:
2506
2505
  limit = 50
2507
- #limit = 2 # TEST TODO
2508
2506
  if limit > limitTotal:
2509
2507
  limit = limitTotal
2510
2508
  result = AlbumPageSimplified()
@@ -2648,9 +2646,10 @@ class SpotifyClient:
2648
2646
  self.MakeRequest('GET', msg)
2649
2647
 
2650
2648
  # process results.
2651
- items = msg.ResponseData.get('albums',[])
2652
- for item in items:
2653
- result.append(Album(root=item))
2649
+ items = msg.ResponseData.get('albums',None)
2650
+ if items is not None:
2651
+ for item in items:
2652
+ result.append(Album(root=item))
2654
2653
 
2655
2654
  # trace.
2656
2655
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Album]'), result)
@@ -2755,7 +2754,6 @@ class SpotifyClient:
2755
2754
  # are we auto-paging? if so, then use max limit.
2756
2755
  if limitTotal > 0:
2757
2756
  limit = 50
2758
- #limit = 2 # TEST TODO
2759
2757
  if limit > limitTotal:
2760
2758
  limit = limitTotal
2761
2759
  result = TrackPageSimplified()
@@ -2985,7 +2983,6 @@ class SpotifyClient:
2985
2983
  # are we auto-paging? if so, then use max limit.
2986
2984
  if limitTotal > 0:
2987
2985
  limit = 50
2988
- #limit = 5 # TEST TODO
2989
2986
  if limit > limitTotal:
2990
2987
  limit = limitTotal
2991
2988
  result = AlbumPageSimplified()
@@ -3109,9 +3106,10 @@ class SpotifyClient:
3109
3106
  self.MakeRequest('GET', msg)
3110
3107
 
3111
3108
  # process results.
3112
- items = msg.ResponseData.get('artists',[])
3113
- for item in items:
3114
- result.append(Artist(root=item))
3109
+ items = msg.ResponseData.get('artists',None)
3110
+ if items is not None:
3111
+ for item in items:
3112
+ result.append(Artist(root=item))
3115
3113
 
3116
3114
  # trace.
3117
3115
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Artist]'), result)
@@ -3183,9 +3181,10 @@ class SpotifyClient:
3183
3181
  self.MakeRequest('GET', msg)
3184
3182
 
3185
3183
  # process results.
3186
- items = msg.ResponseData.get('artists',[])
3187
- for item in items:
3188
- result.append(Artist(root=item))
3184
+ items = msg.ResponseData.get('artists',None)
3185
+ if items is not None:
3186
+ for item in items:
3187
+ result.append(Artist(root=item))
3189
3188
 
3190
3189
  # trace.
3191
3190
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Artist]'), result)
@@ -3272,7 +3271,6 @@ class SpotifyClient:
3272
3271
  # are we auto-paging? if so, then use max limit.
3273
3272
  if limitTotal > 0:
3274
3273
  limit = 50
3275
- #limit = 1 # TEST TODO
3276
3274
  if limit > limitTotal:
3277
3275
  limit = limitTotal
3278
3276
  result = ArtistPage()
@@ -3419,9 +3417,10 @@ class SpotifyClient:
3419
3417
  self.MakeRequest('GET', msg)
3420
3418
 
3421
3419
  # process results.
3422
- items = msg.ResponseData.get('tracks',[])
3423
- for item in items:
3424
- result.append(Track(root=item))
3420
+ items = msg.ResponseData.get('tracks',None)
3421
+ if items is not None:
3422
+ for item in items:
3423
+ result.append(Track(root=item))
3425
3424
 
3426
3425
  # trace.
3427
3426
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Track]'), result)
@@ -3616,7 +3615,6 @@ class SpotifyClient:
3616
3615
  # are we auto-paging? if so, then use max limit.
3617
3616
  if limitTotal > 0:
3618
3617
  limit = 50
3619
- #limit = 2 # TEST TODO
3620
3618
  if limit > limitTotal:
3621
3619
  limit = limitTotal
3622
3620
  result = ChapterPageSimplified()
@@ -3763,7 +3761,6 @@ class SpotifyClient:
3763
3761
  # are we auto-paging? if so, then use max limit.
3764
3762
  if limitTotal > 0:
3765
3763
  limit = 50
3766
- #limit = 2 # TEST TODO
3767
3764
  if limit > limitTotal:
3768
3765
  limit = limitTotal
3769
3766
  result = AudiobookPageSimplified()
@@ -3908,9 +3905,10 @@ class SpotifyClient:
3908
3905
  self.MakeRequest('GET', msg)
3909
3906
 
3910
3907
  # process results.
3911
- items = msg.ResponseData.get('audiobooks',[])
3912
- for item in items:
3913
- result.append(AudiobookSimplified(root=item))
3908
+ items = msg.ResponseData.get('audiobooks',None)
3909
+ if items is not None:
3910
+ for item in items:
3911
+ result.append(AudiobookSimplified(root=item))
3914
3912
 
3915
3913
  # trace.
3916
3914
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[AudiobookSimplified]'), result)
@@ -4136,7 +4134,6 @@ class SpotifyClient:
4136
4134
  # are we auto-paging? if so, then use max limit.
4137
4135
  if limitTotal > 0:
4138
4136
  limit = 50
4139
- #limit = 2 # TEST TODO
4140
4137
  if limit > limitTotal:
4141
4138
  limit = limitTotal
4142
4139
  result = CategoryPage()
@@ -4357,6 +4354,9 @@ class SpotifyClient:
4357
4354
  and the response contains error information.
4358
4355
  SpotifApiError:
4359
4356
  If the method fails for any other reason.
4357
+
4358
+ The following are special undocumented category ID's that I have found:
4359
+ - 0JQ5DAt0tbjZptfcdMSKl3: Made For You
4360
4360
 
4361
4361
  <details>
4362
4362
  <summary>Sample Code - Manual Paging</summary>
@@ -4370,6 +4370,12 @@ class SpotifyClient:
4370
4370
  .. include:: ../docs/include/samplecode/SpotifyClient/GetCategoryPlaylists_AutoPaging.py
4371
4371
  ```
4372
4372
  </details>
4373
+ <details>
4374
+ <summary>Sample Code - Made For You Playlists</summary>
4375
+ ```python
4376
+ .. include:: ../docs/include/samplecode/SpotifyClient/GetCategoryPlaylists_MadeForYou.py
4377
+ ```
4378
+ </details>
4373
4379
  """
4374
4380
  apiMethodName:str = 'GetCategoryPlaylists'
4375
4381
  apiMethodParms:SIMethodParmListContext = None
@@ -4398,7 +4404,6 @@ class SpotifyClient:
4398
4404
  # are we auto-paging? if so, then use max limit.
4399
4405
  if limitTotal > 0:
4400
4406
  limit = 50
4401
- #limit = 2 # TEST TODO
4402
4407
  if limit > limitTotal:
4403
4408
  limit = limitTotal
4404
4409
  result = PlaylistPageSimplified()
@@ -4641,9 +4646,10 @@ class SpotifyClient:
4641
4646
  self.MakeRequest('GET', msg)
4642
4647
 
4643
4648
  # process results.
4644
- items = msg.ResponseData.get('chapters',[])
4645
- for item in items:
4646
- result.append(Chapter(root=item))
4649
+ items = msg.ResponseData.get('chapters',None)
4650
+ if items is not None:
4651
+ for item in items:
4652
+ result.append(Chapter(root=item))
4647
4653
 
4648
4654
  # trace.
4649
4655
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Chapter]'), result)
@@ -4824,7 +4830,6 @@ class SpotifyClient:
4824
4830
  # are we auto-paging? if so, then use max limit.
4825
4831
  if limitTotal > 0:
4826
4832
  limit = 50
4827
- #limit = 1 # TEST TODO
4828
4833
  if limit > limitTotal:
4829
4834
  limit = limitTotal
4830
4835
  result = EpisodePageSaved()
@@ -4969,9 +4974,10 @@ class SpotifyClient:
4969
4974
  self.MakeRequest('GET', msg)
4970
4975
 
4971
4976
  # process results.
4972
- items = msg.ResponseData.get('episodes',[])
4973
- for item in items:
4974
- result.append(Episode(root=item))
4977
+ items = msg.ResponseData.get('episodes',None)
4978
+ if items is not None:
4979
+ for item in items:
4980
+ result.append(Episode(root=item))
4975
4981
 
4976
4982
  # trace.
4977
4983
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Episode]'), result)
@@ -5092,7 +5098,6 @@ class SpotifyClient:
5092
5098
  # are we auto-paging? if so, then use max limit.
5093
5099
  if limitTotal > 0:
5094
5100
  limit = 50
5095
- #limit = 2 # TEST TODO
5096
5101
  if limit > limitTotal:
5097
5102
  limit = limitTotal
5098
5103
  result = PlaylistPageSimplified()
@@ -5520,9 +5525,10 @@ class SpotifyClient:
5520
5525
  self.MakeRequest('GET', msg)
5521
5526
 
5522
5527
  # process results.
5523
- items = msg.ResponseData.get('devices',[])
5524
- for item in items:
5525
- result.append(Device(root=item))
5528
+ items = msg.ResponseData.get('devices',None)
5529
+ if items is not None:
5530
+ for item in items:
5531
+ result.append(Device(root=item))
5526
5532
 
5527
5533
  # sort items on Name property, ascending order.
5528
5534
  if len(result) > 0:
@@ -5892,7 +5898,6 @@ class SpotifyClient:
5892
5898
  # are we auto-paging? if so, then use max limit.
5893
5899
  if limitTotal > 0:
5894
5900
  limit = 50
5895
- #limit = 40 # TEST TODO
5896
5901
  if limit > limitTotal:
5897
5902
  limit = limitTotal
5898
5903
  result = PlayHistoryPage()
@@ -6260,7 +6265,6 @@ class SpotifyClient:
6260
6265
  # are we auto-paging? if so, then use max limit.
6261
6266
  if limitTotal > 0:
6262
6267
  limit = 50
6263
- #limit = 2 # TEST TODO
6264
6268
  if limit > limitTotal:
6265
6269
  limit = limitTotal
6266
6270
  result = PlaylistPage()
@@ -6411,7 +6415,6 @@ class SpotifyClient:
6411
6415
  # are we auto-paging? if so, then use max limit.
6412
6416
  if limitTotal > 0:
6413
6417
  limit = 50
6414
- #limit = 2 # TEST TODO
6415
6418
  if limit > limitTotal:
6416
6419
  limit = limitTotal
6417
6420
  result = PlaylistPageSimplified()
@@ -6560,7 +6563,6 @@ class SpotifyClient:
6560
6563
  # are we auto-paging? if so, then use max limit.
6561
6564
  if limitTotal > 0:
6562
6565
  limit = 50
6563
- #limit = 2 # TEST TODO
6564
6566
  if limit > limitTotal:
6565
6567
  limit = limitTotal
6566
6568
  result = PlaylistPageSimplified()
@@ -6736,7 +6738,7 @@ class SpotifyClient:
6736
6738
  Args:
6737
6739
  showId (str):
6738
6740
  The Spotify ID for the show.
6739
- Example: `38bS44xjbVVZ3No3ByF1dJ`
6741
+ Example: `6kAsbP8pxwaU2kPibKTuHE`
6740
6742
  limit (int):
6741
6743
  The maximum number of items to return in a page of items.
6742
6744
  Default: 20, Range: 1 to 50.
@@ -6807,7 +6809,6 @@ class SpotifyClient:
6807
6809
  # are we auto-paging? if so, then use max limit.
6808
6810
  if limitTotal > 0:
6809
6811
  limit = 50
6810
- #limit = 2 # TEST TODO
6811
6812
  if limit > limitTotal:
6812
6813
  limit = limitTotal
6813
6814
  result = EpisodePageSimplified()
@@ -6954,7 +6955,6 @@ class SpotifyClient:
6954
6955
  # are we auto-paging? if so, then use max limit.
6955
6956
  if limitTotal > 0:
6956
6957
  limit = 50
6957
- #limit = 2 # TEST TODO
6958
6958
  if limit > limitTotal:
6959
6959
  limit = limitTotal
6960
6960
  result = ShowPageSaved()
@@ -7099,9 +7099,10 @@ class SpotifyClient:
7099
7099
  self.MakeRequest('GET', msg)
7100
7100
 
7101
7101
  # process results.
7102
- items = msg.ResponseData.get('shows',[])
7103
- for item in items:
7104
- result.append(ShowSimplified(root=item))
7102
+ items = msg.ResponseData.get('shows',None)
7103
+ if items is not None:
7104
+ for item in items:
7105
+ result.append(ShowSimplified(root=item))
7105
7106
 
7106
7107
  # trace.
7107
7108
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[ShowSimplified]'), result)
@@ -7330,7 +7331,6 @@ class SpotifyClient:
7330
7331
  # are we auto-paging? if so, then use max limit.
7331
7332
  if limitTotal > 0:
7332
7333
  limit = 50
7333
- #limit = 2 # TEST TODO
7334
7334
  if limit > limitTotal:
7335
7335
  limit = limitTotal
7336
7336
  result = TrackPageSaved()
@@ -7475,9 +7475,10 @@ class SpotifyClient:
7475
7475
  self.MakeRequest('GET', msg)
7476
7476
 
7477
7477
  # process results.
7478
- items = msg.ResponseData.get('tracks',[])
7479
- for item in items:
7480
- result.append(Track(root=item))
7478
+ items = msg.ResponseData.get('tracks',None)
7479
+ if items is not None:
7480
+ for item in items:
7481
+ result.append(Track(root=item))
7481
7482
 
7482
7483
  # trace.
7483
7484
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[Track]'), result)
@@ -7549,9 +7550,10 @@ class SpotifyClient:
7549
7550
  self.MakeRequest('GET', msg)
7550
7551
 
7551
7552
  # process results.
7552
- items = msg.ResponseData.get('audio_features',[])
7553
- for item in items:
7554
- result.append(AudioFeatures(root=item))
7553
+ items = msg.ResponseData.get('audio_features',None)
7554
+ if items is not None:
7555
+ for item in items:
7556
+ result.append(AudioFeatures(root=item))
7555
7557
 
7556
7558
  # trace.
7557
7559
  _logsi.LogArray(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, 'list[AudioFeatures]'), result)
@@ -8242,7 +8244,6 @@ class SpotifyClient:
8242
8244
  # are we auto-paging? if so, then use max limit.
8243
8245
  if limitTotal > 0:
8244
8246
  limit = 50
8245
- #limit = 20 # TEST TODO
8246
8247
  if limit > limitTotal:
8247
8248
  limit = limitTotal
8248
8249
  result = ArtistPage()
@@ -8397,7 +8398,6 @@ class SpotifyClient:
8397
8398
  # are we auto-paging? if so, then use max limit.
8398
8399
  if limitTotal > 0:
8399
8400
  limit = 50
8400
- #limit = 10 # TEST TODO
8401
8401
  if limit > limitTotal:
8402
8402
  limit = limitTotal
8403
8403
  result = TrackPage()
@@ -11499,7 +11499,6 @@ class SpotifyClient:
11499
11499
  market:str=None,
11500
11500
  includeExternal:str=None,
11501
11501
  limitTotal:int=None,
11502
- spotifyOwnedOnly:bool=False
11503
11502
  ) -> SearchResponse:
11504
11503
  """
11505
11504
  Get Spotify catalog information about Playlists that match a keyword string.
@@ -11544,10 +11543,6 @@ class SpotifyClient:
11544
11543
  and paging is automatically used to retrieve all available items up to the
11545
11544
  maximum number specified.
11546
11545
  Default: None (disabled)
11547
- spotifyOwnedOnly (bool):
11548
- True to return only found items that are owned by spotify (e.g. content generated for you by the spotify AI engine);
11549
- otherwise, False to return all found items.
11550
- Default is False.
11551
11546
 
11552
11547
  Returns:
11553
11548
  A `SearchResponse` object that contains the search results.
@@ -11574,12 +11569,6 @@ class SpotifyClient:
11574
11569
  .. include:: ../docs/include/samplecode/SpotifyClient/SearchPlaylists_AutoPaging.py
11575
11570
  ```
11576
11571
  </details>
11577
- <details>
11578
- <summary>Sample Code - Spotify Generated, Daily Mix</summary>
11579
- ```python
11580
- .. include:: ../docs/include/samplecode/SpotifyClient/SearchPlaylists_Spotify_DailyMix.py
11581
- ```
11582
- </details>
11583
11572
  """
11584
11573
  apiMethodName:str = 'SearchPlaylists'
11585
11574
  apiMethodParms:SIMethodParmListContext = None
@@ -11597,7 +11586,6 @@ class SpotifyClient:
11597
11586
  apiMethodParms.AppendKeyValue("market", market)
11598
11587
  apiMethodParms.AppendKeyValue("includeExternal", includeExternal)
11599
11588
  apiMethodParms.AppendKeyValue("limitTotal", limitTotal)
11600
- apiMethodParms.AppendKeyValue("spotifyOwnedOnly", spotifyOwnedOnly)
11601
11589
  _logsi.LogMethodParmList(SILevel.Verbose, "Searching Spotify catalog for %s information" % criteriaType, apiMethodParms)
11602
11590
 
11603
11591
  # validations.
@@ -11671,12 +11659,6 @@ class SpotifyClient:
11671
11659
  # update result object with final paging details.
11672
11660
  result.Total = pageObj.Total
11673
11661
 
11674
- # was request for spotify owned items only?
11675
- if spotifyOwnedOnly:
11676
- _logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
11677
- _logsi.LogVerbose("Filtering results for Spotify owned content")
11678
- result._Items = result.GetSpotifyOwnedItems()
11679
-
11680
11662
  # do not sort, as spotify uses intelligent AI to return results in its order.
11681
11663
 
11682
11664
  # trace.