spotifywebapiPython 1.0.42__py3-none-any.whl → 1.0.44__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.42.dist-info → spotifywebapiPython-1.0.44.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.42.dist-info → spotifywebapiPython-1.0.44.dist-info}/RECORD +33 -26
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +24 -2
- spotifywebapipython/docs/index.html +2 -2
- spotifywebapipython/docs/search.js +1 -1
- spotifywebapipython/docs/spotifywebapiPython/const.html +3 -3
- spotifywebapipython/docs/spotifywebapiPython/saappmessages.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/sautils.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifyapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifyapimessage.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifyauthtoken.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifyclient.html +376 -36
- spotifywebapipython/docs/spotifywebapiPython/spotifydiscovery.html +45 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapiPython/spotifywebapierror.html +2 -2
- spotifywebapipython/models/__init__.py +14 -0
- spotifywebapipython/models/playlist.py +4 -1
- spotifywebapipython/models/playlistsimplified.py +4 -1
- spotifywebapipython/models/playlisttracksummary.py +3 -1
- spotifywebapipython/models/searchresponse.py +1 -1
- spotifywebapipython/models/zeroconfblobbuilder.py +144 -0
- spotifywebapipython/models/zeroconfdiscoveryresult.py +451 -0
- spotifywebapipython/models/zeroconfgetinfo.py +359 -0
- spotifywebapipython/models/zeroconfgetinfoalias.py +96 -0
- spotifywebapipython/models/zeroconfgetinfodrmmediaformat.py +90 -0
- spotifywebapipython/models/zeroconfproperty.py +93 -0
- spotifywebapipython/models/zeroconfresponse.py +108 -0
- spotifywebapipython/spotifyclient.py +484 -32
- spotifywebapipython/spotifydiscovery.py +98 -11
- {spotifywebapiPython-1.0.42.dist-info → spotifywebapiPython-1.0.44.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.42.dist-info → spotifywebapiPython-1.0.44.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.42.dist-info → spotifywebapiPython-1.0.44.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
|
|
3
|
+
# our package imports.
|
|
4
|
+
from ..sautils import export
|
|
5
|
+
|
|
6
|
+
@export
|
|
7
|
+
class ZeroconfResponse:
|
|
8
|
+
"""
|
|
9
|
+
Spotify Web API Zeroconf basic response object.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, root:dict=None) -> None:
|
|
13
|
+
"""
|
|
14
|
+
Initializes a new instance of the class.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
root (dict):
|
|
18
|
+
Spotify Web API JSON response in dictionary format, used to load object
|
|
19
|
+
attributes; otherwise, None to not load attributes.
|
|
20
|
+
"""
|
|
21
|
+
self._SpotifyError:int = None
|
|
22
|
+
self._Status:int = None
|
|
23
|
+
self._StatusString:str = None
|
|
24
|
+
self._ResponseSource:str = None
|
|
25
|
+
|
|
26
|
+
if (root is None):
|
|
27
|
+
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
else:
|
|
31
|
+
|
|
32
|
+
self._ResponseSource = root.get('responseSource', None)
|
|
33
|
+
self._SpotifyError = root.get('spotifyError', None)
|
|
34
|
+
self._Status = root.get('status', None)
|
|
35
|
+
self._StatusString = root.get('statusString', None)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def __repr__(self) -> str:
|
|
39
|
+
return self.ToString()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def __str__(self) -> str:
|
|
43
|
+
return self.ToString()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def ResponseSource(self) -> str:
|
|
48
|
+
"""
|
|
49
|
+
Token type provided by the client (e.g. "accesstoken").
|
|
50
|
+
"""
|
|
51
|
+
return self._ResponseSource
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def SpotifyError(self) -> int:
|
|
56
|
+
"""
|
|
57
|
+
The last error code returned by a Spotify API call or the SpCallbackError() callback (e.g. 0, -119, etc).
|
|
58
|
+
"""
|
|
59
|
+
return self._SpotifyError
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def Status(self) -> int:
|
|
64
|
+
"""
|
|
65
|
+
A code indicating the result of the operation (e.g. 101, 402, etc).
|
|
66
|
+
"""
|
|
67
|
+
return self._Status
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def StatusString(self) -> str:
|
|
72
|
+
"""
|
|
73
|
+
The string describing the status code (e.g. "OK", "ERROR-SPOTIFY-ERROR", etc).
|
|
74
|
+
"""
|
|
75
|
+
return self._StatusString
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def ToDictionary(self) -> dict:
|
|
79
|
+
"""
|
|
80
|
+
Returns a dictionary representation of the class.
|
|
81
|
+
"""
|
|
82
|
+
result:dict = \
|
|
83
|
+
{
|
|
84
|
+
'SpotifyError': self._SpotifyError,
|
|
85
|
+
'Status': self._Status,
|
|
86
|
+
'StatusString': self._StatusString,
|
|
87
|
+
'ResponseSource': self._ResponseSource,
|
|
88
|
+
}
|
|
89
|
+
return result
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def ToString(self, includeTitle:bool=False) -> str:
|
|
93
|
+
"""
|
|
94
|
+
Returns a displayable string representation of the class.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
includeTitle (str):
|
|
98
|
+
True to include the class name title prefix.
|
|
99
|
+
"""
|
|
100
|
+
msg:str = ''
|
|
101
|
+
if includeTitle:
|
|
102
|
+
msg = 'ZeroconfResponse:'
|
|
103
|
+
|
|
104
|
+
if self._SpotifyError is not None: msg = '%s\n SpotifyError="%s"' % (msg, str(self._SpotifyError))
|
|
105
|
+
if self._Status is not None: msg = '%s\n Status="%s"' % (msg, str(self._Status))
|
|
106
|
+
if self._StatusString is not None: msg = '%s\n StatusString="%s"' % (msg, str(self._StatusString))
|
|
107
|
+
if self._ResponseSource is not None: msg = '%s\n ResponseSource="%s"' % (msg, str(self._ResponseSource))
|
|
108
|
+
return msg
|