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
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
|
|
3
|
+
# our package imports.
|
|
4
|
+
from ..sautils import export
|
|
5
|
+
from .artistinfotourevent import ArtistInfoTourEvent
|
|
6
|
+
|
|
7
|
+
@export
|
|
8
|
+
class ArtistInfo:
|
|
9
|
+
"""
|
|
10
|
+
Artist Information About object.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id:str, name:str, typeValue:str, uri:str, imageUrlDefault:str) -> None:
|
|
14
|
+
"""
|
|
15
|
+
Initializes a new instance of the class.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
id (str):
|
|
19
|
+
The Spotify ID for the artist.
|
|
20
|
+
name (str):
|
|
21
|
+
The name of the artist.
|
|
22
|
+
typeValue (str):
|
|
23
|
+
The object type.
|
|
24
|
+
uri (str):
|
|
25
|
+
The Spotify URI for the artist.
|
|
26
|
+
imageUrlDefault (str):
|
|
27
|
+
Image url of the artist, if defined
|
|
28
|
+
"""
|
|
29
|
+
self._AboutUrlFacebook:str = None
|
|
30
|
+
self._AboutUrlInstagram:str = None
|
|
31
|
+
self._AboutUrlTwitter:str = None
|
|
32
|
+
self._AboutUrlWikipedia:str = None
|
|
33
|
+
self._Bio:str = None
|
|
34
|
+
self._BioHtml:str = None
|
|
35
|
+
self._Id:int = id
|
|
36
|
+
self._ImageUrl:str = None
|
|
37
|
+
self._ImageUrlDefault:str = imageUrlDefault
|
|
38
|
+
self._MonthlyListeners:int = None
|
|
39
|
+
self._Name:str = name
|
|
40
|
+
self._TourEvents:list[ArtistInfoTourEvent] = []
|
|
41
|
+
self._Type:str = typeValue
|
|
42
|
+
self._Uri:str = uri
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __repr__(self) -> str:
|
|
46
|
+
return self.ToString()
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def __str__(self) -> str:
|
|
50
|
+
return self.ToString()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def AboutUrlFacebook(self) -> str:
|
|
55
|
+
"""
|
|
56
|
+
URL link to artist Facebook page, if supplied; otherwise, null.
|
|
57
|
+
"""
|
|
58
|
+
return self._AboutUrlFacebook
|
|
59
|
+
|
|
60
|
+
@AboutUrlFacebook.setter
|
|
61
|
+
def AboutUrlFacebook(self, value:str):
|
|
62
|
+
"""
|
|
63
|
+
Sets the AboutUrlFacebook property value.
|
|
64
|
+
"""
|
|
65
|
+
if isinstance(value, str):
|
|
66
|
+
self._AboutUrlFacebook = value
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def AboutUrlInstagram(self) -> str:
|
|
71
|
+
"""
|
|
72
|
+
URL link to artist Instagram page, if supplied; otherwise, null.
|
|
73
|
+
"""
|
|
74
|
+
return self._AboutUrlInstagram
|
|
75
|
+
|
|
76
|
+
@AboutUrlInstagram.setter
|
|
77
|
+
def AboutUrlInstagram(self, value:str):
|
|
78
|
+
"""
|
|
79
|
+
Sets the AboutUrlInstagram property value.
|
|
80
|
+
"""
|
|
81
|
+
if isinstance(value, str):
|
|
82
|
+
self._AboutUrlInstagram = value
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def AboutUrlTwitter(self) -> str:
|
|
87
|
+
"""
|
|
88
|
+
URL link to artist Twitter page, if supplied; otherwise, null.
|
|
89
|
+
"""
|
|
90
|
+
return self._AboutUrlTwitter
|
|
91
|
+
|
|
92
|
+
@AboutUrlTwitter.setter
|
|
93
|
+
def AboutUrlTwitter(self, value:str):
|
|
94
|
+
"""
|
|
95
|
+
Sets the AboutUrlTwitter property value.
|
|
96
|
+
"""
|
|
97
|
+
if isinstance(value, str):
|
|
98
|
+
self._AboutUrlTwitter = value
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def AboutUrlWikipedia(self) -> str:
|
|
103
|
+
"""
|
|
104
|
+
URL link to artist Wikipedia page, if supplied; otherwise, null.
|
|
105
|
+
"""
|
|
106
|
+
return self._AboutUrlWikipedia
|
|
107
|
+
|
|
108
|
+
@AboutUrlWikipedia.setter
|
|
109
|
+
def AboutUrlWikipedia(self, value:str):
|
|
110
|
+
"""
|
|
111
|
+
Sets the AboutUrlWikipedia property value.
|
|
112
|
+
"""
|
|
113
|
+
if isinstance(value, str):
|
|
114
|
+
self._AboutUrlWikipedia = value
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def Bio(self) -> str:
|
|
119
|
+
"""
|
|
120
|
+
Biography text, in plain-text format.
|
|
121
|
+
"""
|
|
122
|
+
return self._Bio
|
|
123
|
+
|
|
124
|
+
@Bio.setter
|
|
125
|
+
def Bio(self, value:str):
|
|
126
|
+
"""
|
|
127
|
+
Sets the Bio property value.
|
|
128
|
+
"""
|
|
129
|
+
if isinstance(value, str):
|
|
130
|
+
self._Bio = value
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def BioHtml(self) -> str:
|
|
135
|
+
"""
|
|
136
|
+
Biography text, in html format.
|
|
137
|
+
"""
|
|
138
|
+
return self._BioHtml
|
|
139
|
+
|
|
140
|
+
@BioHtml.setter
|
|
141
|
+
def BioHtml(self, value:str):
|
|
142
|
+
"""
|
|
143
|
+
Sets the BioHtml property value.
|
|
144
|
+
"""
|
|
145
|
+
if isinstance(value, str):
|
|
146
|
+
self._BioHtml = value
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def Id(self) -> str:
|
|
151
|
+
"""
|
|
152
|
+
The Spotify ID for the artist.
|
|
153
|
+
"""
|
|
154
|
+
return self._Id
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def ImageUrl(self) -> str:
|
|
159
|
+
"""
|
|
160
|
+
Image url of the artist, if defined; otheriwse, the `ImageUrlDefault` url value.
|
|
161
|
+
"""
|
|
162
|
+
if (self._ImageUrl is not None) and (len(self._ImageUrl.strip()) > 0):
|
|
163
|
+
return self._ImageUrl
|
|
164
|
+
return self._ImageUrlDefault
|
|
165
|
+
|
|
166
|
+
@ImageUrl.setter
|
|
167
|
+
def ImageUrl(self, value:str):
|
|
168
|
+
"""
|
|
169
|
+
Sets the ImageUrl property value.
|
|
170
|
+
"""
|
|
171
|
+
if isinstance(value, str):
|
|
172
|
+
self._ImageUrl = value
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def ImageUrlDefault(self) -> str:
|
|
177
|
+
"""
|
|
178
|
+
Default Image url of the artist, if defined; otherwise, null.
|
|
179
|
+
"""
|
|
180
|
+
return self._ImageUrlDefault
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def MonthlyListeners(self) -> int:
|
|
185
|
+
"""
|
|
186
|
+
Monthly Listeners text.
|
|
187
|
+
"""
|
|
188
|
+
return self._MonthlyListeners
|
|
189
|
+
|
|
190
|
+
@MonthlyListeners.setter
|
|
191
|
+
def MonthlyListeners(self, value:int):
|
|
192
|
+
"""
|
|
193
|
+
Sets the MonthlyListeners property value.
|
|
194
|
+
"""
|
|
195
|
+
if isinstance(value, int):
|
|
196
|
+
self._MonthlyListeners = value
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def Name(self) -> str:
|
|
201
|
+
"""
|
|
202
|
+
The name of the artist.
|
|
203
|
+
"""
|
|
204
|
+
return self._Name
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def TourEvents(self) -> list[ArtistInfoTourEvent]:
|
|
209
|
+
"""
|
|
210
|
+
An array of `ArtistInfoTourEvent` objects, if the artist has any upcoming tour
|
|
211
|
+
dates on file; otherwise, an empty list.
|
|
212
|
+
"""
|
|
213
|
+
return self._TourEvents
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
@property
|
|
217
|
+
def Type(self) -> str:
|
|
218
|
+
"""
|
|
219
|
+
The object type: `artist`.
|
|
220
|
+
"""
|
|
221
|
+
return self._Type
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def Uri(self) -> str:
|
|
226
|
+
"""
|
|
227
|
+
The Spotify URI for the artist.
|
|
228
|
+
"""
|
|
229
|
+
return self._Uri
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def ToDictionary(self) -> dict:
|
|
233
|
+
"""
|
|
234
|
+
Returns a dictionary representation of the class.
|
|
235
|
+
"""
|
|
236
|
+
result:dict = \
|
|
237
|
+
{
|
|
238
|
+
'about_url_facebook': self._AboutUrlFacebook,
|
|
239
|
+
'about_url_instagram': self._AboutUrlInstagram,
|
|
240
|
+
'about_url_twitter': self._AboutUrlTwitter,
|
|
241
|
+
'about_url_wikipedia': self._AboutUrlWikipedia,
|
|
242
|
+
'bio': self._Bio,
|
|
243
|
+
'bio_html': self._BioHtml,
|
|
244
|
+
'id': self._Id,
|
|
245
|
+
'image_url': self._ImageUrl,
|
|
246
|
+
'image_url_default': self._ImageUrlDefault,
|
|
247
|
+
'name': self._Name,
|
|
248
|
+
'monthly_listeners': self._MonthlyListeners,
|
|
249
|
+
'tour_events': [ item.ToDictionary() for item in self._TourEvents ],
|
|
250
|
+
'type': self._Type,
|
|
251
|
+
'uri': self._Uri,
|
|
252
|
+
}
|
|
253
|
+
return result
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def ToString(self, includeTitle:bool=True) -> str:
|
|
257
|
+
"""
|
|
258
|
+
Returns a displayable string representation of the class.
|
|
259
|
+
|
|
260
|
+
Args:
|
|
261
|
+
includeTitle (str):
|
|
262
|
+
True to include the class name title prefix.
|
|
263
|
+
"""
|
|
264
|
+
msg:str = ''
|
|
265
|
+
if includeTitle:
|
|
266
|
+
msg = 'ArtistInfo:'
|
|
267
|
+
|
|
268
|
+
if self._Name is not None: msg = '%s\n Name="%s"' % (msg, str(self._Name))
|
|
269
|
+
if self._Uri is not None: msg = '%s\n Uri="%s"' % (msg, str(self._Uri))
|
|
270
|
+
if self._AboutUrlFacebook is not None: msg = '%s\n AboutUrlFacebook="%s"' % (msg, str(self._AboutUrlFacebook))
|
|
271
|
+
if self._AboutUrlInstagram is not None: msg = '%s\n AboutUrlInstagram="%s"' % (msg, str(self._AboutUrlInstagram))
|
|
272
|
+
if self._AboutUrlTwitter is not None: msg = '%s\n AboutUrlTwitter="%s"' % (msg, str(self._AboutUrlTwitter))
|
|
273
|
+
if self._AboutUrlWikipedia is not None: msg = '%s\n AboutUrlWikipedia="%s"' % (msg, str(self._AboutUrlWikipedia))
|
|
274
|
+
if self._Bio is not None: msg = '%s\n Bio="%s"' % (msg, str(self._Bio))
|
|
275
|
+
if self._BioHtml is not None: msg = '%s\n BioHtml="%s"' % (msg, str(self._BioHtml))
|
|
276
|
+
if self._Id is not None: msg = '%s\n Id="%s"' % (msg, str(self._Id))
|
|
277
|
+
if self._ImageUrl is not None: msg = '%s\n ImageUrl="%s"' % (msg, str(self._ImageUrl))
|
|
278
|
+
if self._ImageUrlDefault is not None: msg = '%s\n ImageUrlDefault="%s"' % (msg, str(self._ImageUrlDefault))
|
|
279
|
+
if self._MonthlyListeners is not None: msg = '%s\n MonthlyListeners="%s"' % (msg, str(self._MonthlyListeners))
|
|
280
|
+
msg = '%s\n TourEvents Count="%d"' % (msg, len(self._TourEvents))
|
|
281
|
+
if self._Type is not None: msg = '%s\n Type="%s"' % (msg, str(self._Type))
|
|
282
|
+
return msg
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
|
|
4
|
+
# our package imports.
|
|
5
|
+
from ..sautils import export
|
|
6
|
+
|
|
7
|
+
@export
|
|
8
|
+
class ArtistInfoTourEvent:
|
|
9
|
+
"""
|
|
10
|
+
Artist Information Tour object.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self) -> None:
|
|
14
|
+
"""
|
|
15
|
+
Initializes a new instance of the class.
|
|
16
|
+
"""
|
|
17
|
+
self._EventDateTime:str = None
|
|
18
|
+
self._Href:str = None
|
|
19
|
+
self._Title:str = None
|
|
20
|
+
self._VenueName:str = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def __repr__(self) -> str:
|
|
24
|
+
return self.ToString()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def __str__(self) -> str:
|
|
28
|
+
return self.ToString()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def EventDateTime(self) -> datetime:
|
|
33
|
+
"""
|
|
34
|
+
Date and time the tour event starts in the local timezone of the
|
|
35
|
+
venue location, if supplied; otherwise, null.
|
|
36
|
+
"""
|
|
37
|
+
return self._EventDateTime
|
|
38
|
+
|
|
39
|
+
@EventDateTime.setter
|
|
40
|
+
def EventDateTime(self, value:datetime):
|
|
41
|
+
"""
|
|
42
|
+
Sets the EventDateTime property value.
|
|
43
|
+
"""
|
|
44
|
+
if value is None or isinstance(value, datetime):
|
|
45
|
+
self._EventDateTime = value
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def Href(self) -> str:
|
|
50
|
+
"""
|
|
51
|
+
Link to the concert information, if supplied; otherwise, null.
|
|
52
|
+
"""
|
|
53
|
+
return self._Href
|
|
54
|
+
|
|
55
|
+
@Href.setter
|
|
56
|
+
def Href(self, value:str):
|
|
57
|
+
"""
|
|
58
|
+
Sets the Href property value.
|
|
59
|
+
"""
|
|
60
|
+
if isinstance(value, str):
|
|
61
|
+
self._Href = value
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def Title(self) -> str:
|
|
66
|
+
"""
|
|
67
|
+
Title given to the event by the promoter, if supplied; otherwise, null.
|
|
68
|
+
"""
|
|
69
|
+
return self._Title
|
|
70
|
+
|
|
71
|
+
@Title.setter
|
|
72
|
+
def Title(self, value:str):
|
|
73
|
+
"""
|
|
74
|
+
Sets the Title property value.
|
|
75
|
+
"""
|
|
76
|
+
if isinstance(value, str):
|
|
77
|
+
self._Title = value
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def VenueName(self) -> str:
|
|
82
|
+
"""
|
|
83
|
+
The venue name of where the event will take place, if supplied; otherwise, null.
|
|
84
|
+
"""
|
|
85
|
+
return self._VenueName
|
|
86
|
+
|
|
87
|
+
@VenueName.setter
|
|
88
|
+
def VenueName(self, value:str):
|
|
89
|
+
"""
|
|
90
|
+
Sets the VenueName property value.
|
|
91
|
+
"""
|
|
92
|
+
if isinstance(value, str):
|
|
93
|
+
self._VenueName = value
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def ToDictionary(self) -> dict:
|
|
97
|
+
"""
|
|
98
|
+
Returns a dictionary representation of the class.
|
|
99
|
+
"""
|
|
100
|
+
result:dict = \
|
|
101
|
+
{
|
|
102
|
+
'title': self._Title,
|
|
103
|
+
'venue_name': self._VenueName,
|
|
104
|
+
'href': self._Href,
|
|
105
|
+
}
|
|
106
|
+
if self._EventDateTime is not None:
|
|
107
|
+
result['event_datetime'] = self._EventDateTime.isoformat()
|
|
108
|
+
return result
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def ToString(self, includeTitle:bool=True) -> str:
|
|
112
|
+
"""
|
|
113
|
+
Returns a displayable string representation of the class.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
includeTitle (str):
|
|
117
|
+
True to include the class name title prefix.
|
|
118
|
+
"""
|
|
119
|
+
msg:str = ''
|
|
120
|
+
if includeTitle:
|
|
121
|
+
msg = 'ArtistInfoTourEvent:'
|
|
122
|
+
|
|
123
|
+
if self._EventDateTime is not None: msg = '%s\n EventDateTime="%s"' % (msg, self._EventDateTime.isoformat())
|
|
124
|
+
if self._Title is not None: msg = '%s\n Title="%s"' % (msg, str(self._Title))
|
|
125
|
+
if self._VenueName is not None: msg = '%s\n VenueName="%s"' % (msg, str(self._VenueName))
|
|
126
|
+
if self._Href is not None: msg = '%s\n Href="%s"' % (msg, str(self._Href))
|
|
127
|
+
return msg
|
|
@@ -90,6 +90,8 @@ class ArtistSimplified:
|
|
|
90
90
|
def Id(self) -> str:
|
|
91
91
|
"""
|
|
92
92
|
The Spotify ID for the artist.
|
|
93
|
+
|
|
94
|
+
Example: `2CIMQHirSU0MQqyYHq0eOx`
|
|
93
95
|
"""
|
|
94
96
|
return self._Id
|
|
95
97
|
|
|
@@ -114,6 +116,8 @@ class ArtistSimplified:
|
|
|
114
116
|
def Uri(self) -> str:
|
|
115
117
|
"""
|
|
116
118
|
The Spotify URI for the artist.
|
|
119
|
+
|
|
120
|
+
Example: `spotify:artist:2CIMQHirSU0MQqyYHq0eOx`
|
|
117
121
|
"""
|
|
118
122
|
return self._Uri
|
|
119
123
|
|
|
@@ -38,7 +38,8 @@ class AudiobookPageSimplified(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(AudiobookSimplified(root=item))
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def __repr__(self) -> str:
|
|
@@ -218,12 +218,10 @@ class AudiobookSimplified:
|
|
|
218
218
|
@property
|
|
219
219
|
def ImageUrl(self) -> str:
|
|
220
220
|
"""
|
|
221
|
-
|
|
222
|
-
otherwise, null.
|
|
221
|
+
Returns the highest resolution order image from the `Images` list, if images
|
|
222
|
+
are defined; otherwise, null.
|
|
223
223
|
"""
|
|
224
|
-
|
|
225
|
-
return self._Images[0].Url
|
|
226
|
-
return None
|
|
224
|
+
return ImageObject.GetImageHighestResolution(self._Images)
|
|
227
225
|
|
|
228
226
|
|
|
229
227
|
@property
|
|
@@ -316,6 +314,7 @@ class AudiobookSimplified:
|
|
|
316
314
|
'href': self._Href,
|
|
317
315
|
'html_description': self._HtmlDescription,
|
|
318
316
|
'id': self._Id,
|
|
317
|
+
'image_url': self.ImageUrl,
|
|
319
318
|
'images': [ item.ToDictionary() for item in self._Images ],
|
|
320
319
|
'languages': [ item for item in self._Languages ],
|
|
321
320
|
'media_type': self._MediaType,
|
|
@@ -115,6 +115,17 @@ class Category:
|
|
|
115
115
|
return self._Name
|
|
116
116
|
|
|
117
117
|
|
|
118
|
+
@property
|
|
119
|
+
def Type(self) -> str:
|
|
120
|
+
"""
|
|
121
|
+
A simulated Spotify type value for the category.
|
|
122
|
+
|
|
123
|
+
This is a helper property - no value with this name is returned from the
|
|
124
|
+
Spotify Web API.
|
|
125
|
+
"""
|
|
126
|
+
return "category"
|
|
127
|
+
|
|
128
|
+
|
|
118
129
|
@property
|
|
119
130
|
def Uri(self) -> str:
|
|
120
131
|
"""
|
|
@@ -134,8 +145,11 @@ class Category:
|
|
|
134
145
|
{
|
|
135
146
|
'href': self._Href,
|
|
136
147
|
'icons': [ item.ToDictionary() for item in self._Icons ],
|
|
148
|
+
'image_url': self.ImageUrl,
|
|
137
149
|
'id': self._Id,
|
|
138
150
|
'name': self._Name,
|
|
151
|
+
'type': self.Type,
|
|
152
|
+
'uri': self.Uri,
|
|
139
153
|
}
|
|
140
154
|
return result
|
|
141
155
|
|
|
@@ -149,4 +163,6 @@ class Category:
|
|
|
149
163
|
if self._Href is not None: msg = '%s\n Href="%s"' % (msg, str(self._Href))
|
|
150
164
|
if self._Id is not None: msg = '%s\n Id="%s"' % (msg, str(self._Id))
|
|
151
165
|
if self._Icons is not None: msg = '%s\n Icons Count=%s' % (msg, str(len(self._Icons)))
|
|
166
|
+
if self._Id is not None: msg = '%s\n Type="%s"' % (msg, str(self.Type))
|
|
167
|
+
if self._Id is not None: msg = '%s\n Uri="%s"' % (msg, str(self.Uri))
|
|
152
168
|
return msg
|
|
@@ -38,7 +38,8 @@ class CategoryPage(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(Category(root=item))
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def __repr__(self) -> str:
|
|
@@ -38,7 +38,8 @@ class ChapterPageSimplified(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(ChapterSimplified(root=item))
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def __repr__(self) -> str:
|
|
@@ -138,7 +138,7 @@ class ChapterSimplified:
|
|
|
138
138
|
@property
|
|
139
139
|
def ChapterNumber(self) -> int:
|
|
140
140
|
"""
|
|
141
|
-
The number of the chapter
|
|
141
|
+
The number of the chapter.
|
|
142
142
|
|
|
143
143
|
Example: `1`
|
|
144
144
|
"""
|
|
@@ -176,7 +176,7 @@ class ChapterSimplified:
|
|
|
176
176
|
@property
|
|
177
177
|
def ExternalUrls(self) -> ExternalUrls:
|
|
178
178
|
"""
|
|
179
|
-
Known external URLs for the
|
|
179
|
+
Known external URLs for the chapter.
|
|
180
180
|
"""
|
|
181
181
|
return self._ExternalUrls
|
|
182
182
|
|
|
@@ -220,12 +220,10 @@ class ChapterSimplified:
|
|
|
220
220
|
@property
|
|
221
221
|
def ImageUrl(self) -> str:
|
|
222
222
|
"""
|
|
223
|
-
|
|
224
|
-
otherwise, null.
|
|
223
|
+
Returns the highest resolution order image from the `Images` list, if images
|
|
224
|
+
are defined; otherwise, null.
|
|
225
225
|
"""
|
|
226
|
-
|
|
227
|
-
return self._Images[0].Url
|
|
228
|
-
return None
|
|
226
|
+
return ImageObject.GetImageHighestResolution(self._Images)
|
|
229
227
|
|
|
230
228
|
|
|
231
229
|
@property
|
|
@@ -339,6 +337,7 @@ class ChapterSimplified:
|
|
|
339
337
|
'href': self._Href,
|
|
340
338
|
'html_description': self._HtmlDescription,
|
|
341
339
|
'id': self._Id,
|
|
340
|
+
'image_url': self.ImageUrl,
|
|
342
341
|
'images': [ item.ToDictionary() for item in self._Images ],
|
|
343
342
|
'is_playable': self._IsPlayable,
|
|
344
343
|
'languages': [ item for item in self._Languages ],
|
|
@@ -60,7 +60,7 @@ class Context:
|
|
|
60
60
|
@property
|
|
61
61
|
def Href(self) -> str:
|
|
62
62
|
"""
|
|
63
|
-
A link to the Web API endpoint providing full details of the
|
|
63
|
+
A link to the Web API endpoint providing full details of the context.
|
|
64
64
|
"""
|
|
65
65
|
return self._Href
|
|
66
66
|
|
|
@@ -69,8 +69,6 @@ class Context:
|
|
|
69
69
|
def Type(self) -> str:
|
|
70
70
|
"""
|
|
71
71
|
Object type, such as `artist`, `playlist`, `album` or `show`.
|
|
72
|
-
|
|
73
|
-
Example: `computer`
|
|
74
72
|
"""
|
|
75
73
|
return self._Type
|
|
76
74
|
|