spotifywebapiPython 1.0.35__py3-none-any.whl → 1.0.147__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 (91) hide show
  1. {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/LICENSE +1 -1
  2. {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/METADATA +7 -6
  3. spotifywebapiPython-1.0.147.dist-info/RECORD +117 -0
  4. spotifywebapipython/__init__.py +2 -0
  5. spotifywebapipython/const.py +19 -1
  6. spotifywebapipython/docs/__init__.html +799 -3
  7. spotifywebapipython/docs/index.html +21 -3
  8. spotifywebapipython/docs/search.js +1 -1
  9. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/const.html +72 -4
  10. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/saappmessages.html +77 -3
  11. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/sautils.html +63 -3
  12. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyapierror.html +3 -3
  13. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyapimessage.html +20 -3
  14. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyauthtoken.html +39 -3
  15. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyclient.html +2553 -364
  16. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifydiscovery.html +85 -52
  17. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifywebapiauthenticationerror.html +3 -3
  18. spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifywebapierror.html +3 -3
  19. spotifywebapipython/models/__init__.py +8 -0
  20. spotifywebapipython/models/albumpagesaved.py +2 -1
  21. spotifywebapipython/models/albumpagesimplified.py +2 -1
  22. spotifywebapipython/models/albumsimplified.py +4 -5
  23. spotifywebapipython/models/artist.py +4 -5
  24. spotifywebapipython/models/artistinfo.py +282 -0
  25. spotifywebapipython/models/artistinfotourevent.py +127 -0
  26. spotifywebapipython/models/artistpage.py +2 -1
  27. spotifywebapipython/models/artistsimplified.py +4 -0
  28. spotifywebapipython/models/audiobookpagesimplified.py +2 -1
  29. spotifywebapipython/models/audiobooksimplified.py +4 -5
  30. spotifywebapipython/models/category.py +16 -0
  31. spotifywebapipython/models/categorypage.py +2 -1
  32. spotifywebapipython/models/chapterpagesimplified.py +2 -1
  33. spotifywebapipython/models/chaptersimplified.py +6 -7
  34. spotifywebapipython/models/context.py +1 -3
  35. spotifywebapipython/models/device.py +85 -2
  36. spotifywebapipython/models/episodepagesaved.py +2 -1
  37. spotifywebapipython/models/episodepagesimplified.py +2 -1
  38. spotifywebapipython/models/episodesaved.py +2 -2
  39. spotifywebapipython/models/episodesimplified.py +5 -6
  40. spotifywebapipython/models/imageobject.py +98 -0
  41. spotifywebapipython/models/pageobject.py +29 -4
  42. spotifywebapipython/models/playeractions.py +33 -11
  43. spotifywebapipython/models/playerplaystate.py +128 -13
  44. spotifywebapipython/models/playerqueueinfo.py +61 -4
  45. spotifywebapipython/models/playhistorypage.py +2 -1
  46. spotifywebapipython/models/playlist.py +6 -3
  47. spotifywebapipython/models/playlistpage.py +2 -1
  48. spotifywebapipython/models/playlistpagesimplified.py +2 -1
  49. spotifywebapipython/models/playlistsimplified.py +49 -7
  50. spotifywebapipython/models/playlisttrack.py +1 -0
  51. spotifywebapipython/models/playlisttracksummary.py +3 -1
  52. spotifywebapipython/models/searchresponse.py +1 -1
  53. spotifywebapipython/models/showpagesaved.py +2 -1
  54. spotifywebapipython/models/showpagesimplified.py +2 -1
  55. spotifywebapipython/models/showsaved.py +2 -2
  56. spotifywebapipython/models/showsimplified.py +8 -5
  57. spotifywebapipython/models/spotifyconnectdevice.py +188 -0
  58. spotifywebapipython/models/spotifyconnectdevices.py +628 -0
  59. spotifywebapipython/models/track.py +2 -1
  60. spotifywebapipython/models/trackpage.py +42 -1
  61. spotifywebapipython/models/trackpagesaved.py +2 -1
  62. spotifywebapipython/models/trackpagesimplified.py +2 -1
  63. spotifywebapipython/models/trackrecommendations.py +5 -5
  64. spotifywebapipython/models/tracksimplified.py +10 -3
  65. spotifywebapipython/models/userprofile.py +25 -1
  66. spotifywebapipython/models/userprofilesimplified.py +4 -5
  67. spotifywebapipython/models/zeroconfdiscoveryresult.py +599 -0
  68. spotifywebapipython/models/zeroconfproperty.py +93 -0
  69. spotifywebapipython/oauthcli/authclient.py +119 -19
  70. spotifywebapipython/saappmessages.py +21 -1
  71. spotifywebapipython/sautils.py +88 -1
  72. spotifywebapipython/spotifyapimessage.py +18 -1
  73. spotifywebapipython/spotifyauthtoken.py +26 -0
  74. spotifywebapipython/spotifyclient.py +4311 -525
  75. spotifywebapipython/spotifyconnectdeviceeventargs.py +67 -0
  76. spotifywebapipython/spotifydiscovery.py +326 -136
  77. spotifywebapipython/zeroconfapi/__init__.py +23 -0
  78. spotifywebapipython/zeroconfapi/authenticationtypes.py +38 -0
  79. spotifywebapipython/zeroconfapi/blobbuilder.py +370 -0
  80. spotifywebapipython/zeroconfapi/credentials.py +37 -0
  81. spotifywebapipython/zeroconfapi/cryptodiffiehellman.py +89 -0
  82. spotifywebapipython/zeroconfapi/helpers.py +64 -0
  83. spotifywebapipython/zeroconfapi/spotifyzeroconfapierror.py +108 -0
  84. spotifywebapipython/zeroconfapi/zeroconfconnect.py +1315 -0
  85. spotifywebapipython/zeroconfapi/zeroconfgetinfo.py +619 -0
  86. spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py +105 -0
  87. spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py +90 -0
  88. spotifywebapipython/zeroconfapi/zeroconfresponse.py +141 -0
  89. spotifywebapiPython-1.0.35.dist-info/RECORD +0 -98
  90. {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/WHEEL +0 -0
  91. {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/top_level.txt +0 -0
@@ -38,7 +38,8 @@ class TrackPageSimplified(PageObject):
38
38
  items:list = root.get('items',None)
39
39
  if items is not None:
40
40
  for item in items:
41
- self._Items.append(TrackSimplified(root=item))
41
+ if item is not None:
42
+ self._Items.append(TrackSimplified(root=item))
42
43
 
43
44
 
44
45
  def __repr__(self) -> str:
@@ -8,7 +8,7 @@ from .track import Track
8
8
  @export
9
9
  class TrackRecommendations:
10
10
  """
11
- Spotify Web API SimplifiedTrack object.
11
+ Spotify Web API TrackRecommendations object.
12
12
  """
13
13
 
14
14
  def __init__(self, root:dict=None) -> None:
@@ -30,12 +30,12 @@ class TrackRecommendations:
30
30
  else:
31
31
 
32
32
  # process all collections and objects.
33
- items:list = root.get('seeds',None)
33
+ items:list = root.get('seeds', [])
34
34
  if items is not None:
35
35
  for item in items:
36
36
  self._Seeds.append(RecommendationSeed(root=item))
37
37
 
38
- items:list = root.get('tracks',None)
38
+ items:list = root.get('tracks', [])
39
39
  if items is not None:
40
40
  for item in items:
41
41
  self._Tracks.append(Track(root=item))
@@ -60,8 +60,8 @@ class TrackRecommendations:
60
60
  @property
61
61
  def Tracks(self) -> list[Track]:
62
62
  """
63
- A list of Track objects, ordered according to the parameters supplied.
64
- on the `GetTrackRecommendations` method.
63
+ A list of Track objects, ordered according to the parameters supplied
64
+ to the `GetTrackRecommendations` method.
65
65
  """
66
66
  return self._Tracks
67
67
 
@@ -139,7 +139,7 @@ class TrackSimplified:
139
139
  @property
140
140
  def Explicit(self) -> bool:
141
141
  """
142
- Whether or not the track has explicit lyrics (true = yes it does; false = no it does not OR unknown).
142
+ Whether or not the track has explicit content (true = yes it does; false = no it does not OR unknown).
143
143
  """
144
144
  return self._Explicit
145
145
 
@@ -198,7 +198,7 @@ class TrackSimplified:
198
198
  @property
199
199
  def Name(self) -> str:
200
200
  """
201
- The name of the artist.
201
+ The name of the track.
202
202
  """
203
203
  return self._Name
204
204
 
@@ -224,10 +224,17 @@ class TrackSimplified:
224
224
  @property
225
225
  def PreviewUrl(self) -> str:
226
226
  """
227
+ <span class="deprecated">
228
+ DEPRECATED - property no longer supported by Spotify as of 2024/11/27.
229
+ More information about the deprecated functionality can be found on the
230
+ <a href="https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api" target="_blank">Spotify Developer Forum Blog</a>
231
+ page.
232
+ </span>
233
+
227
234
  A link to a 30 second preview (MP3 format) of the track. Can be null.
228
235
 
229
236
  Important policy note:
230
- - Spotify Audio preview clips can not be a standalone service.
237
+ - Spotify Audio preview clips can not be a standalone service.
231
238
  """
232
239
  return self._PreviewUrl
233
240
 
@@ -110,7 +110,31 @@ class UserProfile(UserProfileSimplified):
110
110
 
111
111
 
112
112
  @property
113
- def Product(self) -> str:
113
+ def IsProductFree(self) -> str:
114
+ """
115
+ Returns true if the user's Spotify subscription level is `free` or `open`;
116
+ otherwise, False.
117
+
118
+ This field is only valid when the current user has granted access to
119
+ the `user-read-private` scope; otherwise, it is set to `unknown`.
120
+ """
121
+ return (self._Product == 'free') or (self._Product == 'opem')
122
+
123
+
124
+ @property
125
+ def IsProductPremium(self) -> bool:
126
+ """
127
+ Returns true if the user's Spotify subscription level is `premium`;
128
+ otherwise, False.
129
+
130
+ This field is only valid when the current user has granted access to
131
+ the `user-read-private` scope; otherwise, it is set to `unknown`.
132
+ """
133
+ return (self._Product == 'premium')
134
+
135
+
136
+ @property
137
+ def Product(self) -> bool:
114
138
  """
115
139
  The user's Spotify subscription level: `premium`, `free`, etc.
116
140
 
@@ -132,12 +132,10 @@ class UserProfileSimplified:
132
132
  @property
133
133
  def ImageUrl(self) -> str:
134
134
  """
135
- Gets the first image url in the `Images` list, if images are defined;
136
- otherwise, null.
135
+ Returns the highest resolution order image from the `Images` list, if images
136
+ are defined; otherwise, null.
137
137
  """
138
- if len(self._Images) > 0:
139
- return self._Images[0].Url
140
- return None
138
+ return ImageObject.GetImageHighestResolution(self._Images)
141
139
 
142
140
 
143
141
  @property
@@ -177,6 +175,7 @@ class UserProfileSimplified:
177
175
  'followers': followers,
178
176
  'href': self._Href,
179
177
  'id': self._Id,
178
+ 'image_url': self.ImageUrl,
180
179
  'images': [ item.ToDictionary() for item in self._Images ],
181
180
  'type': self._Type,
182
181
  'uri': self._Uri,