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.
- {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/LICENSE +1 -1
- {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/METADATA +7 -6
- spotifywebapiPython-1.0.147.dist-info/RECORD +117 -0
- spotifywebapipython/__init__.py +2 -0
- spotifywebapipython/const.py +19 -1
- spotifywebapipython/docs/__init__.html +799 -3
- spotifywebapipython/docs/index.html +21 -3
- spotifywebapipython/docs/search.js +1 -1
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/const.html +72 -4
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/saappmessages.html +77 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/sautils.html +63 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyapierror.html +3 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyapimessage.html +20 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyauthtoken.html +39 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifyclient.html +2553 -364
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifydiscovery.html +85 -52
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifywebapiauthenticationerror.html +3 -3
- spotifywebapipython/docs/{spotifywebapiPython → spotifywebapipython}/spotifywebapierror.html +3 -3
- spotifywebapipython/models/__init__.py +8 -0
- spotifywebapipython/models/albumpagesaved.py +2 -1
- spotifywebapipython/models/albumpagesimplified.py +2 -1
- spotifywebapipython/models/albumsimplified.py +4 -5
- spotifywebapipython/models/artist.py +4 -5
- spotifywebapipython/models/artistinfo.py +282 -0
- spotifywebapipython/models/artistinfotourevent.py +127 -0
- spotifywebapipython/models/artistpage.py +2 -1
- spotifywebapipython/models/artistsimplified.py +4 -0
- spotifywebapipython/models/audiobookpagesimplified.py +2 -1
- spotifywebapipython/models/audiobooksimplified.py +4 -5
- spotifywebapipython/models/category.py +16 -0
- spotifywebapipython/models/categorypage.py +2 -1
- spotifywebapipython/models/chapterpagesimplified.py +2 -1
- spotifywebapipython/models/chaptersimplified.py +6 -7
- spotifywebapipython/models/context.py +1 -3
- spotifywebapipython/models/device.py +85 -2
- spotifywebapipython/models/episodepagesaved.py +2 -1
- spotifywebapipython/models/episodepagesimplified.py +2 -1
- spotifywebapipython/models/episodesaved.py +2 -2
- spotifywebapipython/models/episodesimplified.py +5 -6
- spotifywebapipython/models/imageobject.py +98 -0
- spotifywebapipython/models/pageobject.py +29 -4
- spotifywebapipython/models/playeractions.py +33 -11
- spotifywebapipython/models/playerplaystate.py +128 -13
- spotifywebapipython/models/playerqueueinfo.py +61 -4
- spotifywebapipython/models/playhistorypage.py +2 -1
- spotifywebapipython/models/playlist.py +6 -3
- spotifywebapipython/models/playlistpage.py +2 -1
- spotifywebapipython/models/playlistpagesimplified.py +2 -1
- spotifywebapipython/models/playlistsimplified.py +49 -7
- spotifywebapipython/models/playlisttrack.py +1 -0
- spotifywebapipython/models/playlisttracksummary.py +3 -1
- spotifywebapipython/models/searchresponse.py +1 -1
- spotifywebapipython/models/showpagesaved.py +2 -1
- spotifywebapipython/models/showpagesimplified.py +2 -1
- spotifywebapipython/models/showsaved.py +2 -2
- spotifywebapipython/models/showsimplified.py +8 -5
- spotifywebapipython/models/spotifyconnectdevice.py +188 -0
- spotifywebapipython/models/spotifyconnectdevices.py +628 -0
- spotifywebapipython/models/track.py +2 -1
- spotifywebapipython/models/trackpage.py +42 -1
- spotifywebapipython/models/trackpagesaved.py +2 -1
- spotifywebapipython/models/trackpagesimplified.py +2 -1
- spotifywebapipython/models/trackrecommendations.py +5 -5
- spotifywebapipython/models/tracksimplified.py +10 -3
- spotifywebapipython/models/userprofile.py +25 -1
- spotifywebapipython/models/userprofilesimplified.py +4 -5
- spotifywebapipython/models/zeroconfdiscoveryresult.py +599 -0
- spotifywebapipython/models/zeroconfproperty.py +93 -0
- spotifywebapipython/oauthcli/authclient.py +119 -19
- spotifywebapipython/saappmessages.py +21 -1
- spotifywebapipython/sautils.py +88 -1
- spotifywebapipython/spotifyapimessage.py +18 -1
- spotifywebapipython/spotifyauthtoken.py +26 -0
- spotifywebapipython/spotifyclient.py +4311 -525
- spotifywebapipython/spotifyconnectdeviceeventargs.py +67 -0
- spotifywebapipython/spotifydiscovery.py +326 -136
- spotifywebapipython/zeroconfapi/__init__.py +23 -0
- spotifywebapipython/zeroconfapi/authenticationtypes.py +38 -0
- spotifywebapipython/zeroconfapi/blobbuilder.py +370 -0
- spotifywebapipython/zeroconfapi/credentials.py +37 -0
- spotifywebapipython/zeroconfapi/cryptodiffiehellman.py +89 -0
- spotifywebapipython/zeroconfapi/helpers.py +64 -0
- spotifywebapipython/zeroconfapi/spotifyzeroconfapierror.py +108 -0
- spotifywebapipython/zeroconfapi/zeroconfconnect.py +1315 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfo.py +619 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py +105 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py +90 -0
- spotifywebapipython/zeroconfapi/zeroconfresponse.py +141 -0
- spotifywebapiPython-1.0.35.dist-info/RECORD +0 -98
- {spotifywebapiPython-1.0.35.dist-info → spotifywebapiPython-1.0.147.dist-info}/WHEEL +0 -0
- {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
|
-
|
|
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
|
|
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',
|
|
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',
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
136
|
-
otherwise, null.
|
|
135
|
+
Returns the highest resolution order image from the `Images` list, if images
|
|
136
|
+
are defined; otherwise, null.
|
|
137
137
|
"""
|
|
138
|
-
|
|
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,
|