spotifywebapiPython 1.0.242__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.
- spotifywebapipython/__init__.py +35 -0
- spotifywebapipython/const.py +114 -0
- spotifywebapipython/docs/__init__.html +2156 -0
- spotifywebapipython/docs/codecopy.js +70 -0
- spotifywebapipython/docs/index.html +514 -0
- spotifywebapipython/docs/search.js +46 -0
- spotifywebapipython/docs/spotifywebapipython/const.html +636 -0
- spotifywebapipython/docs/spotifywebapipython/saappmessages.html +540 -0
- spotifywebapipython/docs/spotifywebapipython/sautils.html +620 -0
- spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html +341 -0
- spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html +598 -0
- spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html +612 -0
- spotifywebapipython/docs/spotifywebapipython/spotifyclient.html +16557 -0
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +518 -0
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +421 -0
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +400 -0
- spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html +635 -0
- spotifywebapipython/docs/spotifywebapipython.ico +0 -0
- spotifywebapipython/docs/spotifywebapipython_OLD.ico +0 -0
- spotifywebapipython/models/__init__.py +121 -0
- spotifywebapipython/models/album.py +170 -0
- spotifywebapipython/models/albumpagesaved.py +85 -0
- spotifywebapipython/models/albumpagesimplified.py +88 -0
- spotifywebapipython/models/albumsaved.py +102 -0
- spotifywebapipython/models/albumsimplified.py +308 -0
- spotifywebapipython/models/artist.py +146 -0
- spotifywebapipython/models/artistinfo.py +282 -0
- spotifywebapipython/models/artistinfotourevent.py +127 -0
- spotifywebapipython/models/artistpage.py +70 -0
- spotifywebapipython/models/artistsimplified.py +163 -0
- spotifywebapipython/models/audiobook.py +87 -0
- spotifywebapipython/models/audiobookpagesimplified.py +88 -0
- spotifywebapipython/models/audiobooksimplified.py +362 -0
- spotifywebapipython/models/audiofeatures.py +333 -0
- spotifywebapipython/models/author.py +67 -0
- spotifywebapipython/models/category.py +168 -0
- spotifywebapipython/models/categorypage.py +70 -0
- spotifywebapipython/models/chapter.py +84 -0
- spotifywebapipython/models/chapterpagesimplified.py +88 -0
- spotifywebapipython/models/chaptersimplified.py +387 -0
- spotifywebapipython/models/context.py +113 -0
- spotifywebapipython/models/copyright.py +79 -0
- spotifywebapipython/models/device.py +301 -0
- spotifywebapipython/models/episode.py +84 -0
- spotifywebapipython/models/episodepagesaved.py +85 -0
- spotifywebapipython/models/episodepagesimplified.py +88 -0
- spotifywebapipython/models/episodesaved.py +99 -0
- spotifywebapipython/models/episodesimplified.py +370 -0
- spotifywebapipython/models/explicitcontent.py +80 -0
- spotifywebapipython/models/externalids.py +91 -0
- spotifywebapipython/models/externalurls.py +104 -0
- spotifywebapipython/models/followers.py +81 -0
- spotifywebapipython/models/imageobject.py +193 -0
- spotifywebapipython/models/imagevibrantcolors.py +182 -0
- spotifywebapipython/models/linkedfrom.py +165 -0
- spotifywebapipython/models/narrator.py +67 -0
- spotifywebapipython/models/owner.py +162 -0
- spotifywebapipython/models/pageobject.py +343 -0
- spotifywebapipython/models/playeractions.py +196 -0
- spotifywebapipython/models/playerlastplayedinfo.py +334 -0
- spotifywebapipython/models/playerplaystate.py +467 -0
- spotifywebapipython/models/playerqueueinfo.py +207 -0
- spotifywebapipython/models/playhistory.py +136 -0
- spotifywebapipython/models/playhistorypage.py +85 -0
- spotifywebapipython/models/playlist.py +125 -0
- spotifywebapipython/models/playlistpage.py +85 -0
- spotifywebapipython/models/playlistpagesimplified.py +107 -0
- spotifywebapipython/models/playlistsimplified.py +334 -0
- spotifywebapipython/models/playlisttrack.py +143 -0
- spotifywebapipython/models/playlisttracksummary.py +80 -0
- spotifywebapipython/models/recommendationseed.py +135 -0
- spotifywebapipython/models/restrictions.py +86 -0
- spotifywebapipython/models/resumepoint.py +79 -0
- spotifywebapipython/models/searchresponse.py +391 -0
- spotifywebapipython/models/searchresultbase.py +299 -0
- spotifywebapipython/models/show.py +87 -0
- spotifywebapipython/models/showpagesaved.py +85 -0
- spotifywebapipython/models/showpagesimplified.py +88 -0
- spotifywebapipython/models/showsaved.py +99 -0
- spotifywebapipython/models/showsimplified.py +320 -0
- spotifywebapipython/models/spotifyconnectdevice.py +321 -0
- spotifywebapipython/models/spotifyconnectdevices.py +441 -0
- spotifywebapipython/models/track.py +142 -0
- spotifywebapipython/models/trackpage.py +110 -0
- spotifywebapipython/models/trackpagesaved.py +85 -0
- spotifywebapipython/models/trackpagesimplified.py +88 -0
- spotifywebapipython/models/trackrecommendations.py +88 -0
- spotifywebapipython/models/tracksaved.py +99 -0
- spotifywebapipython/models/tracksimplified.py +398 -0
- spotifywebapipython/models/userprofile.py +184 -0
- spotifywebapipython/models/userprofilesimplified.py +206 -0
- spotifywebapipython/models/zeroconfdiscoveryresult.py +592 -0
- spotifywebapipython/models/zeroconfproperty.py +93 -0
- spotifywebapipython/oauthcli/__init__.py +7 -0
- spotifywebapipython/oauthcli/authclient.py +1229 -0
- spotifywebapipython/saappmessages.py +86 -0
- spotifywebapipython/sautils.py +285 -0
- spotifywebapipython/spotifyapierror.py +66 -0
- spotifywebapipython/spotifyapimessage.py +269 -0
- spotifywebapipython/spotifyauthtoken.py +264 -0
- spotifywebapipython/spotifyclient.py +17885 -0
- spotifywebapipython/spotifyconnect/__init__.py +19 -0
- spotifywebapipython/spotifyconnect/spotifyconnectdeviceeventargs.py +67 -0
- spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py +2564 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastapptask.py +467 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastcontroller.py +701 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastlistener.py +359 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonelistener.py +212 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfexceptions.py +20 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconflistener.py +335 -0
- spotifywebapipython/spotifydiscovery.py +473 -0
- spotifywebapipython/spotifymediatypes.py +53 -0
- spotifywebapipython/spotifywebapiauthenticationerror.py +122 -0
- spotifywebapipython/spotifywebapierror.py +106 -0
- spotifywebapipython/spotifywebplayertoken.py +743 -0
- spotifywebapipython/vibrant/__init__.py +17 -0
- spotifywebapipython/vibrant/generator.py +261 -0
- spotifywebapipython/vibrant/image.py +100 -0
- spotifywebapipython/vibrant/main.py +34 -0
- spotifywebapipython/vibrant/models.py +93 -0
- spotifywebapipython/vibrant/utils.py +56 -0
- 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 +1327 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfo.py +572 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py +109 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py +90 -0
- spotifywebapipython/zeroconfapi/zeroconfresponse.py +195 -0
- spotifywebapipython-1.0.242.dist-info/LICENSE +22 -0
- spotifywebapipython-1.0.242.dist-info/METADATA +219 -0
- spotifywebapipython-1.0.242.dist-info/RECORD +138 -0
- spotifywebapipython-1.0.242.dist-info/WHEEL +5 -0
- spotifywebapipython-1.0.242.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
|
|
3
|
+
# our package imports.
|
|
4
|
+
from ..sautils import export
|
|
5
|
+
from .externalurls import ExternalUrls
|
|
6
|
+
|
|
7
|
+
@export
|
|
8
|
+
class LinkedFrom:
|
|
9
|
+
"""
|
|
10
|
+
Part of the response when Track Relinking is applied, and the requested track has been
|
|
11
|
+
replaced with different track. The track in the `linked_from` object contains information
|
|
12
|
+
about the originally requested track.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, root:dict=None) -> None:
|
|
16
|
+
"""
|
|
17
|
+
Initializes a new instance of the class.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
root (dict):
|
|
21
|
+
Spotify Web API JSON response in dictionary format, used to load object
|
|
22
|
+
attributes; otherwise, None to not load attributes.
|
|
23
|
+
"""
|
|
24
|
+
self._ExternalUrls:ExternalUrls = None
|
|
25
|
+
self._Href:str = None
|
|
26
|
+
self._Id:str = None
|
|
27
|
+
self._Type:str = None
|
|
28
|
+
self._Uri:str = None
|
|
29
|
+
|
|
30
|
+
if (root is None):
|
|
31
|
+
|
|
32
|
+
# if not building the class from json response, then initialize various properties as
|
|
33
|
+
# the object is probably being built manually.
|
|
34
|
+
self._ExternalUrls = ExternalUrls()
|
|
35
|
+
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
self._Href = root.get('href', None)
|
|
39
|
+
self._Id = root.get('id', None)
|
|
40
|
+
self._Type = root.get('type', None)
|
|
41
|
+
self._Uri = root.get('uri', None)
|
|
42
|
+
|
|
43
|
+
# process all collections and objects.
|
|
44
|
+
item:dict = root.get('external_urls',None)
|
|
45
|
+
if item is not None:
|
|
46
|
+
self._ExternalUrls = ExternalUrls(root=item)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def __repr__(self) -> str:
|
|
50
|
+
return self.ToString()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def __str__(self) -> str:
|
|
54
|
+
return self.ToString()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def ExternalUrls(self) -> ExternalUrls:
|
|
59
|
+
"""
|
|
60
|
+
Known external URLs for this object.
|
|
61
|
+
"""
|
|
62
|
+
return self._ExternalUrls
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def Href(self) -> str:
|
|
67
|
+
"""
|
|
68
|
+
A link to the Web API endpoint providing full details of the object.
|
|
69
|
+
"""
|
|
70
|
+
return self._Href
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def Id(self) -> str:
|
|
75
|
+
"""
|
|
76
|
+
The Spotify ID for the object.
|
|
77
|
+
|
|
78
|
+
Example: `6kLCHFM39wkFjOuyPGLGeQ`
|
|
79
|
+
"""
|
|
80
|
+
return self._Id
|
|
81
|
+
|
|
82
|
+
@Id.setter
|
|
83
|
+
def Id(self, value:str):
|
|
84
|
+
"""
|
|
85
|
+
Sets the Id property value.
|
|
86
|
+
"""
|
|
87
|
+
if isinstance(value, str):
|
|
88
|
+
self._Id = value
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def Type(self) -> str:
|
|
93
|
+
"""
|
|
94
|
+
The object type (e.g. album, artist, audiobook, episode, playlist, show, track, etc).
|
|
95
|
+
"""
|
|
96
|
+
return self._Type
|
|
97
|
+
|
|
98
|
+
@Type.setter
|
|
99
|
+
def Type(self, value:str):
|
|
100
|
+
"""
|
|
101
|
+
Sets the Type property value.
|
|
102
|
+
"""
|
|
103
|
+
if isinstance(value, str):
|
|
104
|
+
self._Type = value
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def Uri(self) -> str:
|
|
109
|
+
"""
|
|
110
|
+
The Spotify URI for the object.
|
|
111
|
+
|
|
112
|
+
Example: `spotify:track:6kLCHFM39wkFjOuyPGLGeQ`
|
|
113
|
+
"""
|
|
114
|
+
return self._Uri
|
|
115
|
+
|
|
116
|
+
@Uri.setter
|
|
117
|
+
def Uri(self, value:str):
|
|
118
|
+
"""
|
|
119
|
+
Sets the Uri property value.
|
|
120
|
+
"""
|
|
121
|
+
if isinstance(value, str):
|
|
122
|
+
self._Uri = value
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def ToDictionary(self) -> dict:
|
|
126
|
+
"""
|
|
127
|
+
Returns a dictionary representation of the class.
|
|
128
|
+
"""
|
|
129
|
+
externalUrls:dict = {}
|
|
130
|
+
if self._ExternalUrls is not None:
|
|
131
|
+
externalUrls = self._ExternalUrls.ToDictionary()
|
|
132
|
+
|
|
133
|
+
result:dict = \
|
|
134
|
+
{
|
|
135
|
+
'external_urls': externalUrls,
|
|
136
|
+
'href': self._Href,
|
|
137
|
+
'id': self._Id,
|
|
138
|
+
'type': self._Type,
|
|
139
|
+
'uri': self._Uri,
|
|
140
|
+
}
|
|
141
|
+
return result
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def ToString(self, includeTitle:bool=True) -> str:
|
|
145
|
+
"""
|
|
146
|
+
Returns a displayable string representation of the class.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
includeTitle (str):
|
|
150
|
+
True to include the class name title prefix.
|
|
151
|
+
"""
|
|
152
|
+
msg:str = ''
|
|
153
|
+
if includeTitle:
|
|
154
|
+
msg = 'LinkedFrom:'
|
|
155
|
+
|
|
156
|
+
if self._Uri is not None: msg = '%s\n Uri="%s"' % (msg, str(self._Uri))
|
|
157
|
+
if self._Href is not None: msg = '%s\n Href="%s"' % (msg, str(self._Href))
|
|
158
|
+
if self._Id is not None: msg = '%s\n Id="%s"' % (msg, str(self._Id))
|
|
159
|
+
if self._Type is not None: msg = '%s\n Type="%s"' % (msg, str(self._Type))
|
|
160
|
+
|
|
161
|
+
# if not including the title, then remove line breaks.
|
|
162
|
+
if not includeTitle:
|
|
163
|
+
msg = msg.replace("\n"," ")
|
|
164
|
+
|
|
165
|
+
return msg
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
|
|
3
|
+
# our package imports.
|
|
4
|
+
from ..sautils import export
|
|
5
|
+
|
|
6
|
+
@export
|
|
7
|
+
class Narrator:
|
|
8
|
+
"""
|
|
9
|
+
Spotify Web API Content Narrator object.
|
|
10
|
+
|
|
11
|
+
Contains information about content narrators.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, root:dict=None) -> None:
|
|
15
|
+
"""
|
|
16
|
+
Initializes a new instance of the class.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
root (dict):
|
|
20
|
+
Spotify Web API JSON response in dictionary format, used to load object
|
|
21
|
+
attributes; otherwise, None to not load attributes.
|
|
22
|
+
"""
|
|
23
|
+
self._Name:str = None
|
|
24
|
+
|
|
25
|
+
if (root is None):
|
|
26
|
+
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
self._Name = root.get('name', None)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def __repr__(self) -> str:
|
|
35
|
+
return self.ToString()
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def __str__(self) -> str:
|
|
39
|
+
return self.ToString()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def Name(self) -> str:
|
|
44
|
+
"""
|
|
45
|
+
The narrator name for this content.
|
|
46
|
+
"""
|
|
47
|
+
return self._Name
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def ToDictionary(self) -> dict:
|
|
51
|
+
"""
|
|
52
|
+
Returns a dictionary representation of the class.
|
|
53
|
+
"""
|
|
54
|
+
result:dict = \
|
|
55
|
+
{
|
|
56
|
+
'name': self._Name,
|
|
57
|
+
}
|
|
58
|
+
return result
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def ToString(self) -> str:
|
|
62
|
+
"""
|
|
63
|
+
Returns a displayable string representation of the class.
|
|
64
|
+
"""
|
|
65
|
+
msg:str = 'Narrator:'
|
|
66
|
+
if self._Name is not None: msg = '%s\n Name="%s"' % (msg, str(self._Name))
|
|
67
|
+
return msg
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# external package imports.
|
|
2
|
+
|
|
3
|
+
# our package imports.
|
|
4
|
+
from ..sautils import export
|
|
5
|
+
from .externalurls import ExternalUrls
|
|
6
|
+
from .followers import Followers
|
|
7
|
+
|
|
8
|
+
@export
|
|
9
|
+
class Owner:
|
|
10
|
+
"""
|
|
11
|
+
Spotify Web API Owner object.
|
|
12
|
+
|
|
13
|
+
Information about the owner of an object (e.g. playlist, etc).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self, root:dict=None) -> None:
|
|
17
|
+
"""
|
|
18
|
+
Initializes a new instance of the class.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
root (dict):
|
|
22
|
+
Spotify Web API JSON response in dictionary format, used to load object
|
|
23
|
+
attributes; otherwise, None to not load attributes.
|
|
24
|
+
"""
|
|
25
|
+
self._DisplayName:str = None
|
|
26
|
+
self._ExternalUrls:ExternalUrls = None
|
|
27
|
+
self._Followers:Followers = None
|
|
28
|
+
self._Href:str = None
|
|
29
|
+
self._Id:str = None
|
|
30
|
+
self._Type:str = None
|
|
31
|
+
self._Uri:str = None
|
|
32
|
+
|
|
33
|
+
if (root is None):
|
|
34
|
+
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
else:
|
|
38
|
+
|
|
39
|
+
self._DisplayName = root.get('display_name', None)
|
|
40
|
+
self._Href = root.get('href', None)
|
|
41
|
+
self._Id = root.get('id', None)
|
|
42
|
+
self._Type = root.get('type', None)
|
|
43
|
+
self._Uri = root.get('uri', None)
|
|
44
|
+
|
|
45
|
+
# process all collections and objects.
|
|
46
|
+
item:dict = root.get('external_urls',None)
|
|
47
|
+
if item is not None:
|
|
48
|
+
self._ExternalUrls = ExternalUrls(root=item)
|
|
49
|
+
|
|
50
|
+
item:dict = root.get('followers',None)
|
|
51
|
+
if item is not None:
|
|
52
|
+
self._Followers = Followers(root=item)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def __repr__(self) -> str:
|
|
56
|
+
return self.ToString()
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def __str__(self) -> str:
|
|
60
|
+
return self.ToString()
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def DisplayName(self) -> str:
|
|
65
|
+
"""
|
|
66
|
+
The name displayed on the user's profile, or null if not available.
|
|
67
|
+
|
|
68
|
+
Example: `John S`
|
|
69
|
+
"""
|
|
70
|
+
return self._DisplayName
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def ExternalUrls(self) -> ExternalUrls:
|
|
75
|
+
"""
|
|
76
|
+
Known public external URLs for this user.
|
|
77
|
+
"""
|
|
78
|
+
return self._ExternalUrls
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def Followers(self) -> Followers:
|
|
83
|
+
"""
|
|
84
|
+
Information about the followers of the user.
|
|
85
|
+
"""
|
|
86
|
+
return self._Followers
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def Href(self) -> str:
|
|
91
|
+
"""
|
|
92
|
+
A link to the Web API endpoint providing full details of the user.
|
|
93
|
+
"""
|
|
94
|
+
return self._Href
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def Id(self) -> str:
|
|
99
|
+
"""
|
|
100
|
+
The Spotify user ID for the user.
|
|
101
|
+
|
|
102
|
+
Example: `2up3OPMp9Tb4dAKM2erWXQ`
|
|
103
|
+
"""
|
|
104
|
+
return self._Id
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def Type(self) -> str:
|
|
109
|
+
"""
|
|
110
|
+
The object type: `user`.
|
|
111
|
+
"""
|
|
112
|
+
return self._Type
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def Uri(self) -> str:
|
|
117
|
+
"""
|
|
118
|
+
The Spotify URI for the user.
|
|
119
|
+
|
|
120
|
+
Example: `spotify:user:2up3OPMp9Tb4dAKM2erWXQ`
|
|
121
|
+
"""
|
|
122
|
+
return self._Uri
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def ToDictionary(self) -> dict:
|
|
126
|
+
"""
|
|
127
|
+
Returns a dictionary representation of the class.
|
|
128
|
+
"""
|
|
129
|
+
externalUrls:dict = {}
|
|
130
|
+
if self._ExternalUrls is not None:
|
|
131
|
+
externalUrls = self._ExternalUrls.ToDictionary()
|
|
132
|
+
|
|
133
|
+
followers:dict = {}
|
|
134
|
+
if self._Followers is not None:
|
|
135
|
+
followers = self._Followers.ToDictionary()
|
|
136
|
+
|
|
137
|
+
result:dict = \
|
|
138
|
+
{
|
|
139
|
+
'display_name': self._DisplayName,
|
|
140
|
+
'external_urls': externalUrls,
|
|
141
|
+
'followers': followers,
|
|
142
|
+
'href': self._Href,
|
|
143
|
+
'id': self._Id,
|
|
144
|
+
'type': self._Type,
|
|
145
|
+
'uri': self._Uri,
|
|
146
|
+
}
|
|
147
|
+
return result
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def ToString(self) -> str:
|
|
151
|
+
"""
|
|
152
|
+
Returns a displayable string representation of the class.
|
|
153
|
+
"""
|
|
154
|
+
msg:str = 'UserProfile:'
|
|
155
|
+
if self._DisplayName is not None: msg = '%s\n DisplayName="%s"' % (msg, str(self._DisplayName))
|
|
156
|
+
if self._Uri is not None: msg = '%s\n Uri="%s"' % (msg, str(self._Uri))
|
|
157
|
+
#if self._ExternalUrls is not None: msg = '%s\n %s' % (msg, str(self._ExternalUrls))
|
|
158
|
+
#if self._Followers is not None: msg = '%s\n %s' % (msg, str(self._Followers))
|
|
159
|
+
if self._Href is not None: msg = '%s\n Href="%s"' % (msg, str(self._Href))
|
|
160
|
+
if self._Id is not None: msg = '%s\n Id="%s"' % (msg, str(self._Id))
|
|
161
|
+
if self._Type is not None: msg = '%s\n Type="%s"' % (msg, str(self._Type))
|
|
162
|
+
return msg
|