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,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 Markets(object):
|
|
11
|
+
"""Implementation of the 'Markets' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
markets (List[str]): The model property of type List[str].
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
# Create a mapping from Model property names to API property names
|
|
19
|
+
_names = {
|
|
20
|
+
"markets": "markets",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_optionals = [
|
|
24
|
+
"markets",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
markets=APIHelper.SKIP):
|
|
30
|
+
"""Initialize a Markets instance."""
|
|
31
|
+
# Initialize members of the class
|
|
32
|
+
if markets is not APIHelper.SKIP:
|
|
33
|
+
self.markets = markets
|
|
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
|
+
markets =\
|
|
54
|
+
dictionary.get("markets")\
|
|
55
|
+
if dictionary.get("markets")\
|
|
56
|
+
else APIHelper.SKIP
|
|
57
|
+
|
|
58
|
+
# Return an object of this model
|
|
59
|
+
return cls(markets)
|
|
60
|
+
|
|
61
|
+
def __repr__(self):
|
|
62
|
+
"""Return a unambiguous string representation."""
|
|
63
|
+
_markets=(
|
|
64
|
+
self.markets
|
|
65
|
+
if hasattr(self, "markets")
|
|
66
|
+
else None
|
|
67
|
+
)
|
|
68
|
+
return (
|
|
69
|
+
f"{self.__class__.__name__}("
|
|
70
|
+
f"markets={_markets!r}, "
|
|
71
|
+
f")"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def __str__(self):
|
|
75
|
+
"""Return a human-readable string representation."""
|
|
76
|
+
_markets=(
|
|
77
|
+
self.markets
|
|
78
|
+
if hasattr(self, "markets")
|
|
79
|
+
else None
|
|
80
|
+
)
|
|
81
|
+
return (
|
|
82
|
+
f"{self.__class__.__name__}("
|
|
83
|
+
f"markets={_markets!s}, "
|
|
84
|
+
f")"
|
|
85
|
+
)
|
|
@@ -0,0 +1,90 @@
|
|
|
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 MeAlbumsRequest(object):
|
|
11
|
+
"""Implementation of the 'Me Albums Request' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
ids (List[str]): A JSON array of the [Spotify
|
|
15
|
+
IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
16
|
+
`["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of
|
|
17
|
+
50 items can be specified in one request. _**Note**: if the `ids`
|
|
18
|
+
parameter is present in the query string, any IDs listed here in the body
|
|
19
|
+
will be ignored._
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
# Create a mapping from Model property names to API property names
|
|
24
|
+
_names = {
|
|
25
|
+
"ids": "ids",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_optionals = [
|
|
29
|
+
"ids",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
ids=APIHelper.SKIP):
|
|
35
|
+
"""Initialize a MeAlbumsRequest instance."""
|
|
36
|
+
# Initialize members of the class
|
|
37
|
+
if ids is not APIHelper.SKIP:
|
|
38
|
+
self.ids = ids
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dictionary(cls,
|
|
42
|
+
dictionary):
|
|
43
|
+
"""Create an instance of this model from a dictionary
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
47
|
+
as obtained from the deserialization of the server's response. The
|
|
48
|
+
keys MUST match property names in the API description.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
object: An instance of this structure class.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
# Extract variables from the dictionary
|
|
58
|
+
ids =\
|
|
59
|
+
dictionary.get("ids")\
|
|
60
|
+
if dictionary.get("ids")\
|
|
61
|
+
else APIHelper.SKIP
|
|
62
|
+
|
|
63
|
+
# Return an object of this model
|
|
64
|
+
return cls(ids)
|
|
65
|
+
|
|
66
|
+
def __repr__(self):
|
|
67
|
+
"""Return a unambiguous string representation."""
|
|
68
|
+
_ids=(
|
|
69
|
+
self.ids
|
|
70
|
+
if hasattr(self, "ids")
|
|
71
|
+
else None
|
|
72
|
+
)
|
|
73
|
+
return (
|
|
74
|
+
f"{self.__class__.__name__}("
|
|
75
|
+
f"ids={_ids!r}, "
|
|
76
|
+
f")"
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def __str__(self):
|
|
80
|
+
"""Return a human-readable string representation."""
|
|
81
|
+
_ids=(
|
|
82
|
+
self.ids
|
|
83
|
+
if hasattr(self, "ids")
|
|
84
|
+
else None
|
|
85
|
+
)
|
|
86
|
+
return (
|
|
87
|
+
f"{self.__class__.__name__}("
|
|
88
|
+
f"ids={_ids!s}, "
|
|
89
|
+
f")"
|
|
90
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
class MeEpisodesRequest(object):
|
|
8
|
+
"""Implementation of the 'Me Episodes Request' model.
|
|
9
|
+
|
|
10
|
+
Attributes:
|
|
11
|
+
ids (List[str]): A JSON array of the [Spotify
|
|
12
|
+
IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum of
|
|
13
|
+
50 items can be specified in one request. _**Note**: if the `ids`
|
|
14
|
+
parameter is present in the query string, any IDs listed here in the body
|
|
15
|
+
will be ignored._
|
|
16
|
+
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
# Create a mapping from Model property names to API property names
|
|
20
|
+
_names = {
|
|
21
|
+
"ids": "ids",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
ids=None):
|
|
27
|
+
"""Initialize a MeEpisodesRequest instance."""
|
|
28
|
+
# Initialize members of the class
|
|
29
|
+
self.ids = ids
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_dictionary(cls,
|
|
33
|
+
dictionary):
|
|
34
|
+
"""Create an instance of this model from a dictionary
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
38
|
+
as obtained from the deserialization of the server's response. The
|
|
39
|
+
keys MUST match property names in the API description.
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
object: An instance of this structure class.
|
|
43
|
+
|
|
44
|
+
"""
|
|
45
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
# Extract variables from the dictionary
|
|
49
|
+
ids =\
|
|
50
|
+
dictionary.get("ids")\
|
|
51
|
+
if dictionary.get("ids")\
|
|
52
|
+
else None
|
|
53
|
+
|
|
54
|
+
# Return an object of this model
|
|
55
|
+
return cls(ids)
|
|
56
|
+
|
|
57
|
+
def __repr__(self):
|
|
58
|
+
"""Return a unambiguous string representation."""
|
|
59
|
+
_ids=self.ids
|
|
60
|
+
return (
|
|
61
|
+
f"{self.__class__.__name__}("
|
|
62
|
+
f"ids={_ids!r}, "
|
|
63
|
+
f")"
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
def __str__(self):
|
|
67
|
+
"""Return a human-readable string representation."""
|
|
68
|
+
_ids=self.ids
|
|
69
|
+
return (
|
|
70
|
+
f"{self.__class__.__name__}("
|
|
71
|
+
f"ids={_ids!s}, "
|
|
72
|
+
f")"
|
|
73
|
+
)
|
|
@@ -0,0 +1,89 @@
|
|
|
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 MeEpisodesRequest1(object):
|
|
11
|
+
"""Implementation of the 'Me Episodes Request1' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
ids (List[str]): A JSON array of the [Spotify
|
|
15
|
+
IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum of
|
|
16
|
+
50 items can be specified in one request. _**Note**: if the `ids`
|
|
17
|
+
parameter is present in the query string, any IDs listed here in the body
|
|
18
|
+
will be ignored._
|
|
19
|
+
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
# Create a mapping from Model property names to API property names
|
|
23
|
+
_names = {
|
|
24
|
+
"ids": "ids",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_optionals = [
|
|
28
|
+
"ids",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
def __init__(
|
|
32
|
+
self,
|
|
33
|
+
ids=APIHelper.SKIP):
|
|
34
|
+
"""Initialize a MeEpisodesRequest1 instance."""
|
|
35
|
+
# Initialize members of the class
|
|
36
|
+
if ids is not APIHelper.SKIP:
|
|
37
|
+
self.ids = ids
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dictionary(cls,
|
|
41
|
+
dictionary):
|
|
42
|
+
"""Create an instance of this model from a dictionary
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
46
|
+
as obtained from the deserialization of the server's response. The
|
|
47
|
+
keys MUST match property names in the API description.
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
object: An instance of this structure class.
|
|
51
|
+
|
|
52
|
+
"""
|
|
53
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
# Extract variables from the dictionary
|
|
57
|
+
ids =\
|
|
58
|
+
dictionary.get("ids")\
|
|
59
|
+
if dictionary.get("ids")\
|
|
60
|
+
else APIHelper.SKIP
|
|
61
|
+
|
|
62
|
+
# Return an object of this model
|
|
63
|
+
return cls(ids)
|
|
64
|
+
|
|
65
|
+
def __repr__(self):
|
|
66
|
+
"""Return a unambiguous string representation."""
|
|
67
|
+
_ids=(
|
|
68
|
+
self.ids
|
|
69
|
+
if hasattr(self, "ids")
|
|
70
|
+
else None
|
|
71
|
+
)
|
|
72
|
+
return (
|
|
73
|
+
f"{self.__class__.__name__}("
|
|
74
|
+
f"ids={_ids!r}, "
|
|
75
|
+
f")"
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def __str__(self):
|
|
79
|
+
"""Return a human-readable string representation."""
|
|
80
|
+
_ids=(
|
|
81
|
+
self.ids
|
|
82
|
+
if hasattr(self, "ids")
|
|
83
|
+
else None
|
|
84
|
+
)
|
|
85
|
+
return (
|
|
86
|
+
f"{self.__class__.__name__}("
|
|
87
|
+
f"ids={_ids!s}, "
|
|
88
|
+
f")"
|
|
89
|
+
)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
class MeFollowingRequest(object):
|
|
8
|
+
"""Implementation of the 'Me Following Request' model.
|
|
9
|
+
|
|
10
|
+
Attributes:
|
|
11
|
+
ids (List[str]): A JSON array of the artist or user [Spotify
|
|
12
|
+
IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
13
|
+
`{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum
|
|
14
|
+
of 50 IDs can be sent in one request. _**Note**: if the `ids` parameter
|
|
15
|
+
is present in the query string, any IDs listed here in the body will be
|
|
16
|
+
ignored._
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
# Create a mapping from Model property names to API property names
|
|
21
|
+
_names = {
|
|
22
|
+
"ids": "ids",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
ids=None):
|
|
28
|
+
"""Initialize a MeFollowingRequest instance."""
|
|
29
|
+
# Initialize members of the class
|
|
30
|
+
self.ids = ids
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_dictionary(cls,
|
|
34
|
+
dictionary):
|
|
35
|
+
"""Create an instance of this model from a dictionary
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
39
|
+
as obtained from the deserialization of the server's response. The
|
|
40
|
+
keys MUST match property names in the API description.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
object: An instance of this structure class.
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
# Extract variables from the dictionary
|
|
50
|
+
ids =\
|
|
51
|
+
dictionary.get("ids")\
|
|
52
|
+
if dictionary.get("ids")\
|
|
53
|
+
else None
|
|
54
|
+
|
|
55
|
+
# Return an object of this model
|
|
56
|
+
return cls(ids)
|
|
57
|
+
|
|
58
|
+
def __repr__(self):
|
|
59
|
+
"""Return a unambiguous string representation."""
|
|
60
|
+
_ids=self.ids
|
|
61
|
+
return (
|
|
62
|
+
f"{self.__class__.__name__}("
|
|
63
|
+
f"ids={_ids!r}, "
|
|
64
|
+
f")"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def __str__(self):
|
|
68
|
+
"""Return a human-readable string representation."""
|
|
69
|
+
_ids=self.ids
|
|
70
|
+
return (
|
|
71
|
+
f"{self.__class__.__name__}("
|
|
72
|
+
f"ids={_ids!s}, "
|
|
73
|
+
f")"
|
|
74
|
+
)
|
|
@@ -0,0 +1,90 @@
|
|
|
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 MeFollowingRequest1(object):
|
|
11
|
+
"""Implementation of the 'Me Following Request1' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
ids (List[str]): A JSON array of the artist or user [Spotify
|
|
15
|
+
IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
16
|
+
`{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum
|
|
17
|
+
of 50 IDs can be sent in one request. _**Note**: if the `ids` parameter
|
|
18
|
+
is present in the query string, any IDs listed here in the body will be
|
|
19
|
+
ignored._
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
# Create a mapping from Model property names to API property names
|
|
24
|
+
_names = {
|
|
25
|
+
"ids": "ids",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_optionals = [
|
|
29
|
+
"ids",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
ids=APIHelper.SKIP):
|
|
35
|
+
"""Initialize a MeFollowingRequest1 instance."""
|
|
36
|
+
# Initialize members of the class
|
|
37
|
+
if ids is not APIHelper.SKIP:
|
|
38
|
+
self.ids = ids
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dictionary(cls,
|
|
42
|
+
dictionary):
|
|
43
|
+
"""Create an instance of this model from a dictionary
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
47
|
+
as obtained from the deserialization of the server's response. The
|
|
48
|
+
keys MUST match property names in the API description.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
object: An instance of this structure class.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
# Extract variables from the dictionary
|
|
58
|
+
ids =\
|
|
59
|
+
dictionary.get("ids")\
|
|
60
|
+
if dictionary.get("ids")\
|
|
61
|
+
else APIHelper.SKIP
|
|
62
|
+
|
|
63
|
+
# Return an object of this model
|
|
64
|
+
return cls(ids)
|
|
65
|
+
|
|
66
|
+
def __repr__(self):
|
|
67
|
+
"""Return a unambiguous string representation."""
|
|
68
|
+
_ids=(
|
|
69
|
+
self.ids
|
|
70
|
+
if hasattr(self, "ids")
|
|
71
|
+
else None
|
|
72
|
+
)
|
|
73
|
+
return (
|
|
74
|
+
f"{self.__class__.__name__}("
|
|
75
|
+
f"ids={_ids!r}, "
|
|
76
|
+
f")"
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def __str__(self):
|
|
80
|
+
"""Return a human-readable string representation."""
|
|
81
|
+
_ids=(
|
|
82
|
+
self.ids
|
|
83
|
+
if hasattr(self, "ids")
|
|
84
|
+
else None
|
|
85
|
+
)
|
|
86
|
+
return (
|
|
87
|
+
f"{self.__class__.__name__}("
|
|
88
|
+
f"ids={_ids!s}, "
|
|
89
|
+
f")"
|
|
90
|
+
)
|
|
@@ -0,0 +1,165 @@
|
|
|
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 MePlayerPlayRequest(object):
|
|
11
|
+
"""Implementation of the 'Me Player Play Request' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
context_uri (str): Optional. Spotify URI of the context to play. Valid
|
|
15
|
+
contexts are albums, artists & playlists.
|
|
16
|
+
`{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}`
|
|
17
|
+
uris (List[str]): Optional. A JSON array of the Spotify track URIs to play.
|
|
18
|
+
For example: `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh",
|
|
19
|
+
"spotify:track:1301WleyT98MSxVHPZCA6M"]}`
|
|
20
|
+
offset (Any): Optional. Indicates from where in the context playback should
|
|
21
|
+
start. Only available when context_uri corresponds to an album or
|
|
22
|
+
playlist object "position" is zero based and can’t be negative. Example:
|
|
23
|
+
`"offset": {"position": 5}` "uri" is a string representing the uri of the
|
|
24
|
+
item to start at. Example: `"offset": {"uri":
|
|
25
|
+
"spotify:track:1301WleyT98MSxVHPZCA6M"}`
|
|
26
|
+
position_ms (int): Indicates from what position to start playback. Must be a
|
|
27
|
+
positive number. Passing in a position that is greater than the length of
|
|
28
|
+
the track will cause the player to start playing the next song.
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
# Create a mapping from Model property names to API property names
|
|
33
|
+
_names = {
|
|
34
|
+
"context_uri": "context_uri",
|
|
35
|
+
"uris": "uris",
|
|
36
|
+
"offset": "offset",
|
|
37
|
+
"position_ms": "position_ms",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_optionals = [
|
|
41
|
+
"context_uri",
|
|
42
|
+
"uris",
|
|
43
|
+
"offset",
|
|
44
|
+
"position_ms",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
def __init__(
|
|
48
|
+
self,
|
|
49
|
+
context_uri=APIHelper.SKIP,
|
|
50
|
+
uris=APIHelper.SKIP,
|
|
51
|
+
offset=APIHelper.SKIP,
|
|
52
|
+
position_ms=APIHelper.SKIP):
|
|
53
|
+
"""Initialize a MePlayerPlayRequest instance."""
|
|
54
|
+
# Initialize members of the class
|
|
55
|
+
if context_uri is not APIHelper.SKIP:
|
|
56
|
+
self.context_uri = context_uri
|
|
57
|
+
if uris is not APIHelper.SKIP:
|
|
58
|
+
self.uris = uris
|
|
59
|
+
if offset is not APIHelper.SKIP:
|
|
60
|
+
self.offset = offset
|
|
61
|
+
if position_ms is not APIHelper.SKIP:
|
|
62
|
+
self.position_ms = position_ms
|
|
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
|
+
context_uri =\
|
|
83
|
+
dictionary.get("context_uri")\
|
|
84
|
+
if dictionary.get("context_uri")\
|
|
85
|
+
else APIHelper.SKIP
|
|
86
|
+
uris =\
|
|
87
|
+
dictionary.get("uris")\
|
|
88
|
+
if dictionary.get("uris")\
|
|
89
|
+
else APIHelper.SKIP
|
|
90
|
+
offset =\
|
|
91
|
+
dictionary.get("offset")\
|
|
92
|
+
if dictionary.get("offset")\
|
|
93
|
+
else APIHelper.SKIP
|
|
94
|
+
position_ms =\
|
|
95
|
+
dictionary.get("position_ms")\
|
|
96
|
+
if dictionary.get("position_ms")\
|
|
97
|
+
else APIHelper.SKIP
|
|
98
|
+
|
|
99
|
+
# Return an object of this model
|
|
100
|
+
return cls(context_uri,
|
|
101
|
+
uris,
|
|
102
|
+
offset,
|
|
103
|
+
position_ms)
|
|
104
|
+
|
|
105
|
+
def __repr__(self):
|
|
106
|
+
"""Return a unambiguous string representation."""
|
|
107
|
+
_context_uri=(
|
|
108
|
+
self.context_uri
|
|
109
|
+
if hasattr(self, "context_uri")
|
|
110
|
+
else None
|
|
111
|
+
)
|
|
112
|
+
_uris=(
|
|
113
|
+
self.uris
|
|
114
|
+
if hasattr(self, "uris")
|
|
115
|
+
else None
|
|
116
|
+
)
|
|
117
|
+
_offset=(
|
|
118
|
+
self.offset
|
|
119
|
+
if hasattr(self, "offset")
|
|
120
|
+
else None
|
|
121
|
+
)
|
|
122
|
+
_position_ms=(
|
|
123
|
+
self.position_ms
|
|
124
|
+
if hasattr(self, "position_ms")
|
|
125
|
+
else None
|
|
126
|
+
)
|
|
127
|
+
return (
|
|
128
|
+
f"{self.__class__.__name__}("
|
|
129
|
+
f"context_uri={_context_uri!r}, "
|
|
130
|
+
f"uris={_uris!r}, "
|
|
131
|
+
f"offset={_offset!r}, "
|
|
132
|
+
f"position_ms={_position_ms!r}, "
|
|
133
|
+
f")"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def __str__(self):
|
|
137
|
+
"""Return a human-readable string representation."""
|
|
138
|
+
_context_uri=(
|
|
139
|
+
self.context_uri
|
|
140
|
+
if hasattr(self, "context_uri")
|
|
141
|
+
else None
|
|
142
|
+
)
|
|
143
|
+
_uris=(
|
|
144
|
+
self.uris
|
|
145
|
+
if hasattr(self, "uris")
|
|
146
|
+
else None
|
|
147
|
+
)
|
|
148
|
+
_offset=(
|
|
149
|
+
self.offset
|
|
150
|
+
if hasattr(self, "offset")
|
|
151
|
+
else None
|
|
152
|
+
)
|
|
153
|
+
_position_ms=(
|
|
154
|
+
self.position_ms
|
|
155
|
+
if hasattr(self, "position_ms")
|
|
156
|
+
else None
|
|
157
|
+
)
|
|
158
|
+
return (
|
|
159
|
+
f"{self.__class__.__name__}("
|
|
160
|
+
f"context_uri={_context_uri!s}, "
|
|
161
|
+
f"uris={_uris!s}, "
|
|
162
|
+
f"offset={_offset!s}, "
|
|
163
|
+
f"position_ms={_position_ms!s}, "
|
|
164
|
+
f")"
|
|
165
|
+
)
|