spotify-apimatic-sdk 1.0.0__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.
- spotify_apimatic_sdk-1.0.0.dist-info/METADATA +150 -0
- spotify_apimatic_sdk-1.0.0.dist-info/RECORD +186 -0
- spotify_apimatic_sdk-1.0.0.dist-info/WHEEL +5 -0
- spotify_apimatic_sdk-1.0.0.dist-info/licenses/LICENSE +30 -0
- spotify_apimatic_sdk-1.0.0.dist-info/top_level.txt +1 -0
- spotifywebapi/__init__.py +12 -0
- spotifywebapi/api_helper.py +19 -0
- spotifywebapi/configuration.py +318 -0
- spotifywebapi/controllers/__init__.py +20 -0
- spotifywebapi/controllers/albums_controller.py +498 -0
- spotifywebapi/controllers/artists_controller.py +327 -0
- spotifywebapi/controllers/audiobooks_controller.py +441 -0
- spotifywebapi/controllers/base_controller.py +67 -0
- spotifywebapi/controllers/categories_controller.py +161 -0
- spotifywebapi/controllers/chapters_controller.py +157 -0
- spotifywebapi/controllers/episodes_controller.py +390 -0
- spotifywebapi/controllers/genres_controller.py +84 -0
- spotifywebapi/controllers/markets_controller.py +82 -0
- spotifywebapi/controllers/o_auth_authorization_controller.py +156 -0
- spotifywebapi/controllers/player_controller.py +807 -0
- spotifywebapi/controllers/playlists_controller.py +851 -0
- spotifywebapi/controllers/search_controller.py +123 -0
- spotifywebapi/controllers/shows_controller.py +439 -0
- spotifywebapi/controllers/tracks_controller.py +821 -0
- spotifywebapi/controllers/users_controller.py +649 -0
- spotifywebapi/exceptions/__init__.py +11 -0
- spotifywebapi/exceptions/api_exception.py +36 -0
- spotifywebapi/exceptions/bad_request_exception.py +56 -0
- spotifywebapi/exceptions/forbidden_exception.py +56 -0
- spotifywebapi/exceptions/not_found_exception.py +56 -0
- spotifywebapi/exceptions/o_auth_provider_exception.py +73 -0
- spotifywebapi/exceptions/too_many_requests_exception.py +56 -0
- spotifywebapi/exceptions/unauthorized_exception.py +56 -0
- spotifywebapi/http/__init__.py +11 -0
- spotifywebapi/http/api_response.py +67 -0
- spotifywebapi/http/auth/__init__.py +5 -0
- spotifywebapi/http/auth/o_auth_2.py +336 -0
- spotifywebapi/http/http_call_back.py +20 -0
- spotifywebapi/http/http_client_provider.py +23 -0
- spotifywebapi/http/http_method_enum.py +25 -0
- spotifywebapi/http/http_request.py +55 -0
- spotifywebapi/http/http_response.py +45 -0
- spotifywebapi/http/proxy_settings.py +50 -0
- spotifywebapi/models/__init__.py +142 -0
- spotifywebapi/models/album_base.py +264 -0
- spotifywebapi/models/album_group_enum.py +51 -0
- spotifywebapi/models/album_object.py +375 -0
- spotifywebapi/models/album_restriction_object.py +109 -0
- spotifywebapi/models/album_type_enum.py +62 -0
- spotifywebapi/models/artist_discography_album_object.py +298 -0
- spotifywebapi/models/artist_object.py +335 -0
- spotifywebapi/models/audio_analysis_object.py +266 -0
- spotifywebapi/models/audio_features_object.py +518 -0
- spotifywebapi/models/audiobook_base.py +353 -0
- spotifywebapi/models/audiobook_object.py +369 -0
- spotifywebapi/models/author_object.py +85 -0
- spotifywebapi/models/categories.py +162 -0
- spotifywebapi/models/category_object.py +117 -0
- spotifywebapi/models/chapter_base.py +392 -0
- spotifywebapi/models/chapter_object.py +408 -0
- spotifywebapi/models/chapter_restriction_object.py +113 -0
- spotifywebapi/models/context_object.py +181 -0
- spotifywebapi/models/copyright_object.py +130 -0
- spotifywebapi/models/currently_playing_context_object.py +314 -0
- spotifywebapi/models/currently_playing_object.py +241 -0
- spotifywebapi/models/cursor_object.py +108 -0
- spotifywebapi/models/cursor_paged_artists.py +75 -0
- spotifywebapi/models/cursor_paging_object.py +183 -0
- spotifywebapi/models/cursor_paging_play_history_object.py +214 -0
- spotifywebapi/models/cursor_paging_simplified_artist_object.py +213 -0
- spotifywebapi/models/device_object.py +278 -0
- spotifywebapi/models/disallows_object.py +314 -0
- spotifywebapi/models/episode_base.py +394 -0
- spotifywebapi/models/episode_object.py +665 -0
- spotifywebapi/models/episode_restriction_object.py +112 -0
- spotifywebapi/models/error_object.py +85 -0
- spotifywebapi/models/explicit_content_settings_object.py +110 -0
- spotifywebapi/models/external_id_object.py +156 -0
- spotifywebapi/models/external_url_object.py +107 -0
- spotifywebapi/models/followers_object.py +134 -0
- spotifywebapi/models/image_object.py +168 -0
- spotifywebapi/models/include_external_enum.py +45 -0
- spotifywebapi/models/item_type_1_enum.py +56 -0
- spotifywebapi/models/item_type_2_enum.py +45 -0
- spotifywebapi/models/item_type_3_enum.py +45 -0
- spotifywebapi/models/item_type_enum.py +58 -0
- spotifywebapi/models/linked_track_object.py +205 -0
- spotifywebapi/models/many_albums.py +76 -0
- spotifywebapi/models/many_artists.py +76 -0
- spotifywebapi/models/many_audio_features.py +77 -0
- spotifywebapi/models/many_audiobooks.py +77 -0
- spotifywebapi/models/many_chapters.py +77 -0
- spotifywebapi/models/many_devices.py +76 -0
- spotifywebapi/models/many_episodes.py +77 -0
- spotifywebapi/models/many_genres.py +69 -0
- spotifywebapi/models/many_simplified_shows.py +74 -0
- spotifywebapi/models/many_tracks.py +76 -0
- spotifywebapi/models/markets.py +85 -0
- spotifywebapi/models/me_albums_request.py +90 -0
- spotifywebapi/models/me_episodes_request.py +73 -0
- spotifywebapi/models/me_episodes_request_1.py +89 -0
- spotifywebapi/models/me_following_request.py +74 -0
- spotifywebapi/models/me_following_request_1.py +90 -0
- spotifywebapi/models/me_player_play_request.py +165 -0
- spotifywebapi/models/me_player_request.py +103 -0
- spotifywebapi/models/me_shows_request.py +89 -0
- spotifywebapi/models/me_tracks_request.py +74 -0
- spotifywebapi/models/me_tracks_request_1.py +90 -0
- spotifywebapi/models/meta.py +227 -0
- spotifywebapi/models/mode_enum.py +52 -0
- spotifywebapi/models/narrator_object.py +85 -0
- spotifywebapi/models/o_auth_provider_error_enum.py +67 -0
- spotifywebapi/models/o_auth_scope_enum.py +98 -0
- spotifywebapi/models/o_auth_token.py +113 -0
- spotifywebapi/models/paged_albums.py +75 -0
- spotifywebapi/models/paged_categories.py +74 -0
- spotifywebapi/models/paging_artist_discography_album_object.py +163 -0
- spotifywebapi/models/paging_artist_object.py +162 -0
- spotifywebapi/models/paging_featured_playlist_object.py +113 -0
- spotifywebapi/models/paging_object.py +142 -0
- spotifywebapi/models/paging_playlist_object.py +163 -0
- spotifywebapi/models/paging_playlist_track_object.py +163 -0
- spotifywebapi/models/paging_saved_album_object.py +163 -0
- spotifywebapi/models/paging_saved_audiobook_object.py +163 -0
- spotifywebapi/models/paging_saved_episode_object.py +163 -0
- spotifywebapi/models/paging_saved_show_object.py +163 -0
- spotifywebapi/models/paging_saved_track_object.py +163 -0
- spotifywebapi/models/paging_simplified_album_object.py +163 -0
- spotifywebapi/models/paging_simplified_audiobook_object.py +162 -0
- spotifywebapi/models/paging_simplified_chapter_object.py +162 -0
- spotifywebapi/models/paging_simplified_episode_object.py +162 -0
- spotifywebapi/models/paging_simplified_show_object.py +160 -0
- spotifywebapi/models/paging_simplified_track_object.py +163 -0
- spotifywebapi/models/paging_track_object.py +162 -0
- spotifywebapi/models/play_history_object.py +141 -0
- spotifywebapi/models/playlist_object.py +425 -0
- spotifywebapi/models/playlist_owner_object.py +238 -0
- spotifywebapi/models/playlist_snapshot_id.py +85 -0
- spotifywebapi/models/playlist_track_object.py +171 -0
- spotifywebapi/models/playlist_tracks_ref_object.py +109 -0
- spotifywebapi/models/playlist_user_object.py +231 -0
- spotifywebapi/models/playlists_followers_request.py +86 -0
- spotifywebapi/models/playlists_request.py +160 -0
- spotifywebapi/models/playlists_tracks_request.py +121 -0
- spotifywebapi/models/playlists_tracks_request_1.py +188 -0
- spotifywebapi/models/playlists_tracks_request_2.py +109 -0
- spotifywebapi/models/private_user_object.py +379 -0
- spotifywebapi/models/public_user_object.py +268 -0
- spotifywebapi/models/queue_object.py +118 -0
- spotifywebapi/models/reason_enum.py +65 -0
- spotifywebapi/models/recommendation_seed_object.py +208 -0
- spotifywebapi/models/recommendations_object.py +96 -0
- spotifywebapi/models/release_date_precision_enum.py +62 -0
- spotifywebapi/models/resume_point_object.py +131 -0
- spotifywebapi/models/saved_album_object.py +118 -0
- spotifywebapi/models/saved_audiobook_object.py +118 -0
- spotifywebapi/models/saved_episode_object.py +116 -0
- spotifywebapi/models/saved_show_object.py +116 -0
- spotifywebapi/models/saved_track_object.py +118 -0
- spotifywebapi/models/search_items.py +256 -0
- spotifywebapi/models/section_object.py +362 -0
- spotifywebapi/models/segment_object.py +307 -0
- spotifywebapi/models/show_base.py +550 -0
- spotifywebapi/models/show_object.py +319 -0
- spotifywebapi/models/simplified_album_object.py +468 -0
- spotifywebapi/models/simplified_artist_object.py +228 -0
- spotifywebapi/models/simplified_playlist_object.py +398 -0
- spotifywebapi/models/simplified_track_object.py +494 -0
- spotifywebapi/models/time_interval_object.py +132 -0
- spotifywebapi/models/track.py +697 -0
- spotifywebapi/models/track_1.py +85 -0
- spotifywebapi/models/track_object.py +605 -0
- spotifywebapi/models/track_restriction_object.py +112 -0
- spotifywebapi/models/type_2_enum.py +56 -0
- spotifywebapi/models/type_3_enum.py +56 -0
- spotifywebapi/models/type_4_enum.py +56 -0
- spotifywebapi/models/type_5_enum.py +56 -0
- spotifywebapi/models/type_6_enum.py +56 -0
- spotifywebapi/models/type_8_enum.py +42 -0
- spotifywebapi/models/type_9_enum.py +42 -0
- spotifywebapi/models/type_enum.py +56 -0
- spotifywebapi/models/users_playlists_request.py +154 -0
- spotifywebapi/spotifywebapi_client.py +198 -0
- spotifywebapi/utilities/__init__.py +6 -0
- spotifywebapi/utilities/file_wrapper.py +45 -0
- spotifywebapi/utilities/union_type_lookup.py +113 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from spotifywebapi.api_helper import APIHelper
|
|
8
|
+
from spotifywebapi.models.author_object import (
|
|
9
|
+
AuthorObject,
|
|
10
|
+
)
|
|
11
|
+
from spotifywebapi.models.copyright_object import (
|
|
12
|
+
CopyrightObject,
|
|
13
|
+
)
|
|
14
|
+
from spotifywebapi.models.external_url_object import (
|
|
15
|
+
ExternalUrlObject,
|
|
16
|
+
)
|
|
17
|
+
from spotifywebapi.models.image_object import (
|
|
18
|
+
ImageObject,
|
|
19
|
+
)
|
|
20
|
+
from spotifywebapi.models.narrator_object import (
|
|
21
|
+
NarratorObject,
|
|
22
|
+
)
|
|
23
|
+
from spotifywebapi.models.paging_simplified_chapter_object import (
|
|
24
|
+
PagingSimplifiedChapterObject,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AudiobookObject(object):
|
|
29
|
+
"""Implementation of the 'AudiobookObject' model.
|
|
30
|
+
|
|
31
|
+
Attributes:
|
|
32
|
+
authors (List[AuthorObject]): The author(s) for the audiobook.
|
|
33
|
+
available_markets (List[str]): A list of the countries in which the audiobook
|
|
34
|
+
can be played, identified by their [ISO 3166-1
|
|
35
|
+
alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
|
|
36
|
+
copyrights (List[CopyrightObject]): The copyright statements of the audiobook.
|
|
37
|
+
description (str): A description of the audiobook. HTML tags are stripped
|
|
38
|
+
away from this field, use `html_description` field in case HTML tags are
|
|
39
|
+
needed.
|
|
40
|
+
html_description (str): A description of the audiobook. This field may
|
|
41
|
+
contain HTML tags.
|
|
42
|
+
edition (str): The edition of the audiobook.
|
|
43
|
+
explicit (bool): Whether or not the audiobook has explicit content (true =
|
|
44
|
+
yes it does; false = no it does not OR unknown).
|
|
45
|
+
external_urls (ExternalUrlObject): External URLs for this audiobook.
|
|
46
|
+
href (str): A link to the Web API endpoint providing full details of the
|
|
47
|
+
audiobook.
|
|
48
|
+
id (str): The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids)
|
|
49
|
+
for the audiobook.
|
|
50
|
+
images (List[ImageObject]): The cover art for the audiobook in various sizes,
|
|
51
|
+
widest first.
|
|
52
|
+
languages (List[str]): A list of the languages used in the audiobook,
|
|
53
|
+
identified by their [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
|
|
54
|
+
media_type (str): The media type of the audiobook.
|
|
55
|
+
name (str): The name of the audiobook.
|
|
56
|
+
narrators (List[NarratorObject]): The narrator(s) for the audiobook.
|
|
57
|
+
publisher (str): The publisher of the audiobook.
|
|
58
|
+
mtype (Type9Enum): The object type.
|
|
59
|
+
uri (str): The [Spotify
|
|
60
|
+
URI](/documentation/web-api/concepts/spotify-uris-ids) for the audiobook.
|
|
61
|
+
total_chapters (int): The number of chapters in this audiobook.
|
|
62
|
+
chapters (PagingSimplifiedChapterObject): The chapters of the audiobook.
|
|
63
|
+
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
# Create a mapping from Model property names to API property names
|
|
67
|
+
_names = {
|
|
68
|
+
"authors": "authors",
|
|
69
|
+
"available_markets": "available_markets",
|
|
70
|
+
"copyrights": "copyrights",
|
|
71
|
+
"description": "description",
|
|
72
|
+
"html_description": "html_description",
|
|
73
|
+
"explicit": "explicit",
|
|
74
|
+
"external_urls": "external_urls",
|
|
75
|
+
"href": "href",
|
|
76
|
+
"id": "id",
|
|
77
|
+
"images": "images",
|
|
78
|
+
"languages": "languages",
|
|
79
|
+
"media_type": "media_type",
|
|
80
|
+
"name": "name",
|
|
81
|
+
"narrators": "narrators",
|
|
82
|
+
"publisher": "publisher",
|
|
83
|
+
"mtype": "type",
|
|
84
|
+
"uri": "uri",
|
|
85
|
+
"total_chapters": "total_chapters",
|
|
86
|
+
"chapters": "chapters",
|
|
87
|
+
"edition": "edition",
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
_optionals = [
|
|
91
|
+
"edition",
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
def __init__(
|
|
95
|
+
self,
|
|
96
|
+
authors=None,
|
|
97
|
+
available_markets=None,
|
|
98
|
+
copyrights=None,
|
|
99
|
+
description=None,
|
|
100
|
+
html_description=None,
|
|
101
|
+
explicit=None,
|
|
102
|
+
external_urls=None,
|
|
103
|
+
href=None,
|
|
104
|
+
id=None,
|
|
105
|
+
images=None,
|
|
106
|
+
languages=None,
|
|
107
|
+
media_type=None,
|
|
108
|
+
name=None,
|
|
109
|
+
narrators=None,
|
|
110
|
+
publisher=None,
|
|
111
|
+
mtype=None,
|
|
112
|
+
uri=None,
|
|
113
|
+
total_chapters=None,
|
|
114
|
+
chapters=None,
|
|
115
|
+
edition=APIHelper.SKIP):
|
|
116
|
+
"""Initialize a AudiobookObject instance."""
|
|
117
|
+
# Initialize members of the class
|
|
118
|
+
self.authors = authors
|
|
119
|
+
self.available_markets = available_markets
|
|
120
|
+
self.copyrights = copyrights
|
|
121
|
+
self.description = description
|
|
122
|
+
self.html_description = html_description
|
|
123
|
+
if edition is not APIHelper.SKIP:
|
|
124
|
+
self.edition = edition
|
|
125
|
+
self.explicit = explicit
|
|
126
|
+
self.external_urls = external_urls
|
|
127
|
+
self.href = href
|
|
128
|
+
self.id = id
|
|
129
|
+
self.images = images
|
|
130
|
+
self.languages = languages
|
|
131
|
+
self.media_type = media_type
|
|
132
|
+
self.name = name
|
|
133
|
+
self.narrators = narrators
|
|
134
|
+
self.publisher = publisher
|
|
135
|
+
self.mtype = mtype
|
|
136
|
+
self.uri = uri
|
|
137
|
+
self.total_chapters = total_chapters
|
|
138
|
+
self.chapters = chapters
|
|
139
|
+
|
|
140
|
+
@classmethod
|
|
141
|
+
def from_dictionary(cls,
|
|
142
|
+
dictionary):
|
|
143
|
+
"""Create an instance of this model from a dictionary
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
147
|
+
as obtained from the deserialization of the server's response. The
|
|
148
|
+
keys MUST match property names in the API description.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
object: An instance of this structure class.
|
|
152
|
+
|
|
153
|
+
"""
|
|
154
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
155
|
+
return None
|
|
156
|
+
|
|
157
|
+
# Extract variables from the dictionary
|
|
158
|
+
authors = None
|
|
159
|
+
if dictionary.get("authors") is not None:
|
|
160
|
+
authors = [
|
|
161
|
+
AuthorObject.from_dictionary(x)
|
|
162
|
+
for x in dictionary.get("authors")
|
|
163
|
+
]
|
|
164
|
+
available_markets =\
|
|
165
|
+
dictionary.get("available_markets")\
|
|
166
|
+
if dictionary.get("available_markets")\
|
|
167
|
+
else None
|
|
168
|
+
copyrights = None
|
|
169
|
+
if dictionary.get("copyrights") is not None:
|
|
170
|
+
copyrights = [
|
|
171
|
+
CopyrightObject.from_dictionary(x)
|
|
172
|
+
for x in dictionary.get("copyrights")
|
|
173
|
+
]
|
|
174
|
+
description =\
|
|
175
|
+
dictionary.get("description")\
|
|
176
|
+
if dictionary.get("description")\
|
|
177
|
+
else None
|
|
178
|
+
html_description =\
|
|
179
|
+
dictionary.get("html_description")\
|
|
180
|
+
if dictionary.get("html_description")\
|
|
181
|
+
else None
|
|
182
|
+
explicit =\
|
|
183
|
+
dictionary.get("explicit")\
|
|
184
|
+
if "explicit" in dictionary.keys()\
|
|
185
|
+
else None
|
|
186
|
+
external_urls =\
|
|
187
|
+
ExternalUrlObject.from_dictionary(
|
|
188
|
+
dictionary.get("external_urls"))\
|
|
189
|
+
if dictionary.get("external_urls") else None
|
|
190
|
+
href =\
|
|
191
|
+
dictionary.get("href")\
|
|
192
|
+
if dictionary.get("href")\
|
|
193
|
+
else None
|
|
194
|
+
id =\
|
|
195
|
+
dictionary.get("id")\
|
|
196
|
+
if dictionary.get("id")\
|
|
197
|
+
else None
|
|
198
|
+
images = None
|
|
199
|
+
if dictionary.get("images") is not None:
|
|
200
|
+
images = [
|
|
201
|
+
ImageObject.from_dictionary(x)
|
|
202
|
+
for x in dictionary.get("images")
|
|
203
|
+
]
|
|
204
|
+
languages =\
|
|
205
|
+
dictionary.get("languages")\
|
|
206
|
+
if dictionary.get("languages")\
|
|
207
|
+
else None
|
|
208
|
+
media_type =\
|
|
209
|
+
dictionary.get("media_type")\
|
|
210
|
+
if dictionary.get("media_type")\
|
|
211
|
+
else None
|
|
212
|
+
name =\
|
|
213
|
+
dictionary.get("name")\
|
|
214
|
+
if dictionary.get("name")\
|
|
215
|
+
else None
|
|
216
|
+
narrators = None
|
|
217
|
+
if dictionary.get("narrators") is not None:
|
|
218
|
+
narrators = [
|
|
219
|
+
NarratorObject.from_dictionary(x)
|
|
220
|
+
for x in dictionary.get("narrators")
|
|
221
|
+
]
|
|
222
|
+
publisher =\
|
|
223
|
+
dictionary.get("publisher")\
|
|
224
|
+
if dictionary.get("publisher")\
|
|
225
|
+
else None
|
|
226
|
+
mtype =\
|
|
227
|
+
dictionary.get("type")\
|
|
228
|
+
if dictionary.get("type")\
|
|
229
|
+
else None
|
|
230
|
+
uri =\
|
|
231
|
+
dictionary.get("uri")\
|
|
232
|
+
if dictionary.get("uri")\
|
|
233
|
+
else None
|
|
234
|
+
total_chapters =\
|
|
235
|
+
dictionary.get("total_chapters")\
|
|
236
|
+
if dictionary.get("total_chapters")\
|
|
237
|
+
else None
|
|
238
|
+
chapters =\
|
|
239
|
+
PagingSimplifiedChapterObject.from_dictionary(
|
|
240
|
+
dictionary.get("chapters"))\
|
|
241
|
+
if dictionary.get("chapters") else None
|
|
242
|
+
edition =\
|
|
243
|
+
dictionary.get("edition")\
|
|
244
|
+
if dictionary.get("edition")\
|
|
245
|
+
else APIHelper.SKIP
|
|
246
|
+
|
|
247
|
+
# Return an object of this model
|
|
248
|
+
return cls(authors,
|
|
249
|
+
available_markets,
|
|
250
|
+
copyrights,
|
|
251
|
+
description,
|
|
252
|
+
html_description,
|
|
253
|
+
explicit,
|
|
254
|
+
external_urls,
|
|
255
|
+
href,
|
|
256
|
+
id,
|
|
257
|
+
images,
|
|
258
|
+
languages,
|
|
259
|
+
media_type,
|
|
260
|
+
name,
|
|
261
|
+
narrators,
|
|
262
|
+
publisher,
|
|
263
|
+
mtype,
|
|
264
|
+
uri,
|
|
265
|
+
total_chapters,
|
|
266
|
+
chapters,
|
|
267
|
+
edition)
|
|
268
|
+
|
|
269
|
+
def __repr__(self):
|
|
270
|
+
"""Return a unambiguous string representation."""
|
|
271
|
+
_authors=self.authors
|
|
272
|
+
_available_markets=self.available_markets
|
|
273
|
+
_copyrights=self.copyrights
|
|
274
|
+
_description=self.description
|
|
275
|
+
_html_description=self.html_description
|
|
276
|
+
_edition=(
|
|
277
|
+
self.edition
|
|
278
|
+
if hasattr(self, "edition")
|
|
279
|
+
else None
|
|
280
|
+
)
|
|
281
|
+
_explicit=self.explicit
|
|
282
|
+
_external_urls=self.external_urls
|
|
283
|
+
_href=self.href
|
|
284
|
+
_id=self.id
|
|
285
|
+
_images=self.images
|
|
286
|
+
_languages=self.languages
|
|
287
|
+
_media_type=self.media_type
|
|
288
|
+
_name=self.name
|
|
289
|
+
_narrators=self.narrators
|
|
290
|
+
_publisher=self.publisher
|
|
291
|
+
_mtype=self.mtype
|
|
292
|
+
_uri=self.uri
|
|
293
|
+
_total_chapters=self.total_chapters
|
|
294
|
+
_chapters=self.chapters
|
|
295
|
+
return (
|
|
296
|
+
f"{self.__class__.__name__}("
|
|
297
|
+
f"authors={_authors!r}, "
|
|
298
|
+
f"available_markets={_available_markets!r}, "
|
|
299
|
+
f"copyrights={_copyrights!r}, "
|
|
300
|
+
f"description={_description!r}, "
|
|
301
|
+
f"html_description={_html_description!r}, "
|
|
302
|
+
f"edition={_edition!r}, "
|
|
303
|
+
f"explicit={_explicit!r}, "
|
|
304
|
+
f"external_urls={_external_urls!r}, "
|
|
305
|
+
f"href={_href!r}, "
|
|
306
|
+
f"id={_id!r}, "
|
|
307
|
+
f"images={_images!r}, "
|
|
308
|
+
f"languages={_languages!r}, "
|
|
309
|
+
f"media_type={_media_type!r}, "
|
|
310
|
+
f"name={_name!r}, "
|
|
311
|
+
f"narrators={_narrators!r}, "
|
|
312
|
+
f"publisher={_publisher!r}, "
|
|
313
|
+
f"mtype={_mtype!r}, "
|
|
314
|
+
f"uri={_uri!r}, "
|
|
315
|
+
f"total_chapters={_total_chapters!r}, "
|
|
316
|
+
f"chapters={_chapters!r}, "
|
|
317
|
+
f")"
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
def __str__(self):
|
|
321
|
+
"""Return a human-readable string representation."""
|
|
322
|
+
_authors=self.authors
|
|
323
|
+
_available_markets=self.available_markets
|
|
324
|
+
_copyrights=self.copyrights
|
|
325
|
+
_description=self.description
|
|
326
|
+
_html_description=self.html_description
|
|
327
|
+
_edition=(
|
|
328
|
+
self.edition
|
|
329
|
+
if hasattr(self, "edition")
|
|
330
|
+
else None
|
|
331
|
+
)
|
|
332
|
+
_explicit=self.explicit
|
|
333
|
+
_external_urls=self.external_urls
|
|
334
|
+
_href=self.href
|
|
335
|
+
_id=self.id
|
|
336
|
+
_images=self.images
|
|
337
|
+
_languages=self.languages
|
|
338
|
+
_media_type=self.media_type
|
|
339
|
+
_name=self.name
|
|
340
|
+
_narrators=self.narrators
|
|
341
|
+
_publisher=self.publisher
|
|
342
|
+
_mtype=self.mtype
|
|
343
|
+
_uri=self.uri
|
|
344
|
+
_total_chapters=self.total_chapters
|
|
345
|
+
_chapters=self.chapters
|
|
346
|
+
return (
|
|
347
|
+
f"{self.__class__.__name__}("
|
|
348
|
+
f"authors={_authors!s}, "
|
|
349
|
+
f"available_markets={_available_markets!s}, "
|
|
350
|
+
f"copyrights={_copyrights!s}, "
|
|
351
|
+
f"description={_description!s}, "
|
|
352
|
+
f"html_description={_html_description!s}, "
|
|
353
|
+
f"edition={_edition!s}, "
|
|
354
|
+
f"explicit={_explicit!s}, "
|
|
355
|
+
f"external_urls={_external_urls!s}, "
|
|
356
|
+
f"href={_href!s}, "
|
|
357
|
+
f"id={_id!s}, "
|
|
358
|
+
f"images={_images!s}, "
|
|
359
|
+
f"languages={_languages!s}, "
|
|
360
|
+
f"media_type={_media_type!s}, "
|
|
361
|
+
f"name={_name!s}, "
|
|
362
|
+
f"narrators={_narrators!s}, "
|
|
363
|
+
f"publisher={_publisher!s}, "
|
|
364
|
+
f"mtype={_mtype!s}, "
|
|
365
|
+
f"uri={_uri!s}, "
|
|
366
|
+
f"total_chapters={_total_chapters!s}, "
|
|
367
|
+
f"chapters={_chapters!s}, "
|
|
368
|
+
f")"
|
|
369
|
+
)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from spotifywebapi.api_helper import APIHelper
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AuthorObject(object):
|
|
11
|
+
"""Implementation of the 'AuthorObject' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
name (str): The name of the author.
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
# Create a mapping from Model property names to API property names
|
|
19
|
+
_names = {
|
|
20
|
+
"name": "name",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_optionals = [
|
|
24
|
+
"name",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
name=APIHelper.SKIP):
|
|
30
|
+
"""Initialize a AuthorObject instance."""
|
|
31
|
+
# Initialize members of the class
|
|
32
|
+
if name is not APIHelper.SKIP:
|
|
33
|
+
self.name = name
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dictionary(cls,
|
|
37
|
+
dictionary):
|
|
38
|
+
"""Create an instance of this model from a dictionary
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
42
|
+
as obtained from the deserialization of the server's response. The
|
|
43
|
+
keys MUST match property names in the API description.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
object: An instance of this structure class.
|
|
47
|
+
|
|
48
|
+
"""
|
|
49
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
# Extract variables from the dictionary
|
|
53
|
+
name =\
|
|
54
|
+
dictionary.get("name")\
|
|
55
|
+
if dictionary.get("name")\
|
|
56
|
+
else APIHelper.SKIP
|
|
57
|
+
|
|
58
|
+
# Return an object of this model
|
|
59
|
+
return cls(name)
|
|
60
|
+
|
|
61
|
+
def __repr__(self):
|
|
62
|
+
"""Return a unambiguous string representation."""
|
|
63
|
+
_name=(
|
|
64
|
+
self.name
|
|
65
|
+
if hasattr(self, "name")
|
|
66
|
+
else None
|
|
67
|
+
)
|
|
68
|
+
return (
|
|
69
|
+
f"{self.__class__.__name__}("
|
|
70
|
+
f"name={_name!r}, "
|
|
71
|
+
f")"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def __str__(self):
|
|
75
|
+
"""Return a human-readable string representation."""
|
|
76
|
+
_name=(
|
|
77
|
+
self.name
|
|
78
|
+
if hasattr(self, "name")
|
|
79
|
+
else None
|
|
80
|
+
)
|
|
81
|
+
return (
|
|
82
|
+
f"{self.__class__.__name__}("
|
|
83
|
+
f"name={_name!s}, "
|
|
84
|
+
f")"
|
|
85
|
+
)
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from spotifywebapi.models.category_object import (
|
|
8
|
+
CategoryObject,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Categories(object):
|
|
13
|
+
"""Implementation of the 'Categories' model.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
href (str): A link to the Web API endpoint returning the full result of the
|
|
17
|
+
request
|
|
18
|
+
limit (int): The maximum number of items in the response (as set in the query
|
|
19
|
+
or by default).
|
|
20
|
+
next (str): URL to the next page of items. ( `null` if none)
|
|
21
|
+
offset (int): The offset of the items returned (as set in the query or by
|
|
22
|
+
default)
|
|
23
|
+
previous (str): URL to the previous page of items. ( `null` if none)
|
|
24
|
+
total (int): The total number of items available to return.
|
|
25
|
+
items (List[CategoryObject]): The model property of type List[CategoryObject].
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
# Create a mapping from Model property names to API property names
|
|
30
|
+
_names = {
|
|
31
|
+
"href": "href",
|
|
32
|
+
"limit": "limit",
|
|
33
|
+
"next": "next",
|
|
34
|
+
"offset": "offset",
|
|
35
|
+
"previous": "previous",
|
|
36
|
+
"total": "total",
|
|
37
|
+
"items": "items",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_nullables = [
|
|
41
|
+
"next",
|
|
42
|
+
"previous",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
def __init__(
|
|
46
|
+
self,
|
|
47
|
+
href=None,
|
|
48
|
+
limit=None,
|
|
49
|
+
next=None,
|
|
50
|
+
offset=None,
|
|
51
|
+
previous=None,
|
|
52
|
+
total=None,
|
|
53
|
+
items=None):
|
|
54
|
+
"""Initialize a Categories instance."""
|
|
55
|
+
# Initialize members of the class
|
|
56
|
+
self.href = href
|
|
57
|
+
self.limit = limit
|
|
58
|
+
self.next = next
|
|
59
|
+
self.offset = offset
|
|
60
|
+
self.previous = previous
|
|
61
|
+
self.total = total
|
|
62
|
+
self.items = items
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dictionary(cls,
|
|
66
|
+
dictionary):
|
|
67
|
+
"""Create an instance of this model from a dictionary
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
71
|
+
as obtained from the deserialization of the server's response. The
|
|
72
|
+
keys MUST match property names in the API description.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
object: An instance of this structure class.
|
|
76
|
+
|
|
77
|
+
"""
|
|
78
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
# Extract variables from the dictionary
|
|
82
|
+
href =\
|
|
83
|
+
dictionary.get("href")\
|
|
84
|
+
if dictionary.get("href")\
|
|
85
|
+
else None
|
|
86
|
+
limit =\
|
|
87
|
+
dictionary.get("limit")\
|
|
88
|
+
if dictionary.get("limit")\
|
|
89
|
+
else None
|
|
90
|
+
next =\
|
|
91
|
+
dictionary.get("next")\
|
|
92
|
+
if dictionary.get("next")\
|
|
93
|
+
else None
|
|
94
|
+
offset =\
|
|
95
|
+
dictionary.get("offset")\
|
|
96
|
+
if dictionary.get("offset")\
|
|
97
|
+
else None
|
|
98
|
+
previous =\
|
|
99
|
+
dictionary.get("previous")\
|
|
100
|
+
if dictionary.get("previous")\
|
|
101
|
+
else None
|
|
102
|
+
total =\
|
|
103
|
+
dictionary.get("total")\
|
|
104
|
+
if dictionary.get("total")\
|
|
105
|
+
else None
|
|
106
|
+
items = None
|
|
107
|
+
if dictionary.get("items") is not None:
|
|
108
|
+
items = [
|
|
109
|
+
CategoryObject.from_dictionary(x)
|
|
110
|
+
for x in dictionary.get("items")
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
# Return an object of this model
|
|
114
|
+
return cls(href,
|
|
115
|
+
limit,
|
|
116
|
+
next,
|
|
117
|
+
offset,
|
|
118
|
+
previous,
|
|
119
|
+
total,
|
|
120
|
+
items)
|
|
121
|
+
|
|
122
|
+
def __repr__(self):
|
|
123
|
+
"""Return a unambiguous string representation."""
|
|
124
|
+
_href=self.href
|
|
125
|
+
_limit=self.limit
|
|
126
|
+
_next=self.next
|
|
127
|
+
_offset=self.offset
|
|
128
|
+
_previous=self.previous
|
|
129
|
+
_total=self.total
|
|
130
|
+
_items=self.items
|
|
131
|
+
return (
|
|
132
|
+
f"{self.__class__.__name__}("
|
|
133
|
+
f"href={_href!r}, "
|
|
134
|
+
f"limit={_limit!r}, "
|
|
135
|
+
f"next={_next!r}, "
|
|
136
|
+
f"offset={_offset!r}, "
|
|
137
|
+
f"previous={_previous!r}, "
|
|
138
|
+
f"total={_total!r}, "
|
|
139
|
+
f"items={_items!r}, "
|
|
140
|
+
f")"
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
def __str__(self):
|
|
144
|
+
"""Return a human-readable string representation."""
|
|
145
|
+
_href=self.href
|
|
146
|
+
_limit=self.limit
|
|
147
|
+
_next=self.next
|
|
148
|
+
_offset=self.offset
|
|
149
|
+
_previous=self.previous
|
|
150
|
+
_total=self.total
|
|
151
|
+
_items=self.items
|
|
152
|
+
return (
|
|
153
|
+
f"{self.__class__.__name__}("
|
|
154
|
+
f"href={_href!s}, "
|
|
155
|
+
f"limit={_limit!s}, "
|
|
156
|
+
f"next={_next!s}, "
|
|
157
|
+
f"offset={_offset!s}, "
|
|
158
|
+
f"previous={_previous!s}, "
|
|
159
|
+
f"total={_total!s}, "
|
|
160
|
+
f"items={_items!s}, "
|
|
161
|
+
f")"
|
|
162
|
+
)
|