spotify-apimatic-sdk 1.0.0
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.
- checksums.yaml +7 -0
- data/LICENSE +30 -0
- data/README.md +170 -0
- data/bin/console +15 -0
- data/lib/spotify_web_api/api_helper.rb +10 -0
- data/lib/spotify_web_api/client.rb +165 -0
- data/lib/spotify_web_api/configuration.rb +244 -0
- data/lib/spotify_web_api/controllers/albums_controller.rb +297 -0
- data/lib/spotify_web_api/controllers/artists_controller.rb +188 -0
- data/lib/spotify_web_api/controllers/audiobooks_controller.rb +258 -0
- data/lib/spotify_web_api/controllers/base_controller.rb +60 -0
- data/lib/spotify_web_api/controllers/categories_controller.rb +84 -0
- data/lib/spotify_web_api/controllers/chapters_controller.rb +82 -0
- data/lib/spotify_web_api/controllers/episodes_controller.rb +241 -0
- data/lib/spotify_web_api/controllers/genres_controller.rb +39 -0
- data/lib/spotify_web_api/controllers/markets_controller.rb +38 -0
- data/lib/spotify_web_api/controllers/o_auth_authorization_controller.rb +82 -0
- data/lib/spotify_web_api/controllers/player_controller.rb +525 -0
- data/lib/spotify_web_api/controllers/playlists_controller.rb +538 -0
- data/lib/spotify_web_api/controllers/search_controller.rb +61 -0
- data/lib/spotify_web_api/controllers/shows_controller.rb +263 -0
- data/lib/spotify_web_api/controllers/tracks_controller.rb +534 -0
- data/lib/spotify_web_api/controllers/users_controller.rb +402 -0
- data/lib/spotify_web_api/exceptions/api_exception.rb +21 -0
- data/lib/spotify_web_api/exceptions/bad_request_exception.rb +46 -0
- data/lib/spotify_web_api/exceptions/forbidden_exception.rb +46 -0
- data/lib/spotify_web_api/exceptions/not_found_exception.rb +46 -0
- data/lib/spotify_web_api/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/spotify_web_api/exceptions/too_many_requests_exception.rb +46 -0
- data/lib/spotify_web_api/exceptions/unauthorized_exception.rb +46 -0
- data/lib/spotify_web_api/http/api_response.rb +19 -0
- data/lib/spotify_web_api/http/auth/o_auth2.rb +164 -0
- data/lib/spotify_web_api/http/http_call_back.rb +10 -0
- data/lib/spotify_web_api/http/http_method_enum.rb +10 -0
- data/lib/spotify_web_api/http/http_request.rb +10 -0
- data/lib/spotify_web_api/http/http_response.rb +10 -0
- data/lib/spotify_web_api/http/proxy_settings.rb +22 -0
- data/lib/spotify_web_api/models/album_base.rb +189 -0
- data/lib/spotify_web_api/models/album_group_enum.rb +44 -0
- data/lib/spotify_web_api/models/album_object.rb +273 -0
- data/lib/spotify_web_api/models/album_restriction_object.rb +75 -0
- data/lib/spotify_web_api/models/album_type_enum.rb +40 -0
- data/lib/spotify_web_api/models/artist_discography_album_object.rb +216 -0
- data/lib/spotify_web_api/models/artist_object.rb +174 -0
- data/lib/spotify_web_api/models/audio_analysis_object.rb +171 -0
- data/lib/spotify_web_api/models/audio_features_object.rb +273 -0
- data/lib/spotify_web_api/models/audiobook_base.rb +270 -0
- data/lib/spotify_web_api/models/audiobook_object.rb +278 -0
- data/lib/spotify_web_api/models/author_object.rb +62 -0
- data/lib/spotify_web_api/models/base_model.rb +110 -0
- data/lib/spotify_web_api/models/categories.rb +125 -0
- data/lib/spotify_web_api/models/category_object.rb +95 -0
- data/lib/spotify_web_api/models/chapter_base.rb +265 -0
- data/lib/spotify_web_api/models/chapter_object.rb +273 -0
- data/lib/spotify_web_api/models/chapter_restriction_object.rb +71 -0
- data/lib/spotify_web_api/models/context_object.rb +102 -0
- data/lib/spotify_web_api/models/copyright_object.rb +82 -0
- data/lib/spotify_web_api/models/currently_playing_context_object.rb +168 -0
- data/lib/spotify_web_api/models/currently_playing_object.rb +138 -0
- data/lib/spotify_web_api/models/cursor_object.rb +71 -0
- data/lib/spotify_web_api/models/cursor_paged_artists.rb +60 -0
- data/lib/spotify_web_api/models/cursor_paging_object.rb +102 -0
- data/lib/spotify_web_api/models/cursor_paging_play_history_object.rb +120 -0
- data/lib/spotify_web_api/models/cursor_paging_simplified_artist_object.rb +120 -0
- data/lib/spotify_web_api/models/device_object.rb +153 -0
- data/lib/spotify_web_api/models/disallows_object.rb +171 -0
- data/lib/spotify_web_api/models/episode_base.rb +263 -0
- data/lib/spotify_web_api/models/episode_object.rb +368 -0
- data/lib/spotify_web_api/models/episode_restriction_object.rb +80 -0
- data/lib/spotify_web_api/models/error_object.rb +71 -0
- data/lib/spotify_web_api/models/explicit_content_settings_object.rb +74 -0
- data/lib/spotify_web_api/models/external_id_object.rb +94 -0
- data/lib/spotify_web_api/models/external_url_object.rb +73 -0
- data/lib/spotify_web_api/models/followers_object.rb +84 -0
- data/lib/spotify_web_api/models/image_object.rb +106 -0
- data/lib/spotify_web_api/models/include_external_enum.rb +29 -0
- data/lib/spotify_web_api/models/item_type1_enum.rb +26 -0
- data/lib/spotify_web_api/models/item_type2_enum.rb +36 -0
- data/lib/spotify_web_api/models/item_type3_enum.rb +36 -0
- data/lib/spotify_web_api/models/item_type_enum.rb +56 -0
- data/lib/spotify_web_api/models/linked_track_object.rb +113 -0
- data/lib/spotify_web_api/models/many_albums.rb +69 -0
- data/lib/spotify_web_api/models/many_artists.rb +69 -0
- data/lib/spotify_web_api/models/many_audio_features.rb +69 -0
- data/lib/spotify_web_api/models/many_audiobooks.rb +69 -0
- data/lib/spotify_web_api/models/many_chapters.rb +69 -0
- data/lib/spotify_web_api/models/many_devices.rb +69 -0
- data/lib/spotify_web_api/models/many_episodes.rb +69 -0
- data/lib/spotify_web_api/models/many_genres.rb +60 -0
- data/lib/spotify_web_api/models/many_simplified_shows.rb +69 -0
- data/lib/spotify_web_api/models/many_tracks.rb +69 -0
- data/lib/spotify_web_api/models/markets.rb +62 -0
- data/lib/spotify_web_api/models/me_albums_request.rb +67 -0
- data/lib/spotify_web_api/models/me_episodes_request.rb +64 -0
- data/lib/spotify_web_api/models/me_episodes_request1.rb +66 -0
- data/lib/spotify_web_api/models/me_following_request.rb +65 -0
- data/lib/spotify_web_api/models/me_following_request1.rb +67 -0
- data/lib/spotify_web_api/models/me_player_play_request.rb +103 -0
- data/lib/spotify_web_api/models/me_player_request.rb +75 -0
- data/lib/spotify_web_api/models/me_shows_request.rb +67 -0
- data/lib/spotify_web_api/models/me_tracks_request.rb +65 -0
- data/lib/spotify_web_api/models/me_tracks_request1.rb +67 -0
- data/lib/spotify_web_api/models/meta.rb +127 -0
- data/lib/spotify_web_api/models/mode_enum.rb +50 -0
- data/lib/spotify_web_api/models/narrator_object.rb +62 -0
- data/lib/spotify_web_api/models/o_auth_provider_error_enum.rb +62 -0
- data/lib/spotify_web_api/models/o_auth_scope_enum.rb +124 -0
- data/lib/spotify_web_api/models/o_auth_token.rb +96 -0
- data/lib/spotify_web_api/models/paged_albums.rb +60 -0
- data/lib/spotify_web_api/models/paged_categories.rb +60 -0
- data/lib/spotify_web_api/models/paging_artist_discography_album_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_artist_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_featured_playlist_object.rb +71 -0
- data/lib/spotify_web_api/models/paging_object.rb +107 -0
- data/lib/spotify_web_api/models/paging_playlist_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_playlist_track_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_saved_album_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_saved_audiobook_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_saved_episode_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_saved_show_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_saved_track_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_album_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_audiobook_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_chapter_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_episode_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_show_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_simplified_track_object.rb +125 -0
- data/lib/spotify_web_api/models/paging_track_object.rb +125 -0
- data/lib/spotify_web_api/models/play_history_object.rb +90 -0
- data/lib/spotify_web_api/models/playlist_object.rb +213 -0
- data/lib/spotify_web_api/models/playlist_owner_object.rb +124 -0
- data/lib/spotify_web_api/models/playlist_snapshot_id.rb +62 -0
- data/lib/spotify_web_api/models/playlist_track_object.rb +116 -0
- data/lib/spotify_web_api/models/playlist_tracks_ref_object.rb +72 -0
- data/lib/spotify_web_api/models/playlist_user_object.rb +122 -0
- data/lib/spotify_web_api/models/playlists_followers_request.rb +63 -0
- data/lib/spotify_web_api/models/playlists_request.rb +96 -0
- data/lib/spotify_web_api/models/playlists_tracks_request.rb +84 -0
- data/lib/spotify_web_api/models/playlists_tracks_request1.rb +112 -0
- data/lib/spotify_web_api/models/playlists_tracks_request2.rb +87 -0
- data/lib/spotify_web_api/models/private_user_object.rb +200 -0
- data/lib/spotify_web_api/models/public_user_object.rb +144 -0
- data/lib/spotify_web_api/models/queue_object.rb +86 -0
- data/lib/spotify_web_api/models/reason_enum.rb +43 -0
- data/lib/spotify_web_api/models/recommendation_seed_object.rb +120 -0
- data/lib/spotify_web_api/models/recommendations_object.rb +86 -0
- data/lib/spotify_web_api/models/release_date_precision_enum.rb +40 -0
- data/lib/spotify_web_api/models/resume_point_object.rb +84 -0
- data/lib/spotify_web_api/models/saved_album_object.rb +85 -0
- data/lib/spotify_web_api/models/saved_audiobook_object.rb +85 -0
- data/lib/spotify_web_api/models/saved_episode_object.rb +82 -0
- data/lib/spotify_web_api/models/saved_show_object.rb +85 -0
- data/lib/spotify_web_api/models/saved_track_object.rb +85 -0
- data/lib/spotify_web_api/models/search_items.rb +122 -0
- data/lib/spotify_web_api/models/section_object.rb +201 -0
- data/lib/spotify_web_api/models/segment_object.rb +184 -0
- data/lib/spotify_web_api/models/show_base.rb +327 -0
- data/lib/spotify_web_api/models/show_object.rb +243 -0
- data/lib/spotify_web_api/models/simplified_album_object.rb +284 -0
- data/lib/spotify_web_api/models/simplified_artist_object.rb +122 -0
- data/lib/spotify_web_api/models/simplified_playlist_object.rb +203 -0
- data/lib/spotify_web_api/models/simplified_track_object.rb +251 -0
- data/lib/spotify_web_api/models/time_interval_object.rb +81 -0
- data/lib/spotify_web_api/models/track.rb +367 -0
- data/lib/spotify_web_api/models/track1.rb +62 -0
- data/lib/spotify_web_api/models/track_object.rb +301 -0
- data/lib/spotify_web_api/models/track_restriction_object.rb +80 -0
- data/lib/spotify_web_api/models/type2_enum.rb +26 -0
- data/lib/spotify_web_api/models/type3_enum.rb +26 -0
- data/lib/spotify_web_api/models/type4_enum.rb +26 -0
- data/lib/spotify_web_api/models/type5_enum.rb +26 -0
- data/lib/spotify_web_api/models/type6_enum.rb +26 -0
- data/lib/spotify_web_api/models/type8_enum.rb +26 -0
- data/lib/spotify_web_api/models/type9_enum.rb +26 -0
- data/lib/spotify_web_api/models/type_enum.rb +26 -0
- data/lib/spotify_web_api/models/users_playlists_request.rb +101 -0
- data/lib/spotify_web_api/utilities/date_time_helper.rb +11 -0
- data/lib/spotify_web_api/utilities/file_wrapper.rb +28 -0
- data/lib/spotify_web_api/utilities/union_type_lookup.rb +73 -0
- data/lib/spotify_web_api.rb +200 -0
- metadata +264 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# PagingSavedAlbumObject Model.
|
|
8
|
+
class PagingSavedAlbumObject < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A link to the Web API endpoint returning the full result of the request
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :href
|
|
15
|
+
|
|
16
|
+
# The maximum number of items in the response (as set in the query or by
|
|
17
|
+
# default).
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :limit
|
|
20
|
+
|
|
21
|
+
# URL to the next page of items. ( `null` if none)
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :mnext
|
|
24
|
+
|
|
25
|
+
# The offset of the items returned (as set in the query or by default)
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset
|
|
28
|
+
|
|
29
|
+
# URL to the previous page of items. ( `null` if none)
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :previous
|
|
32
|
+
|
|
33
|
+
# The total number of items available to return.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :total
|
|
36
|
+
|
|
37
|
+
# The total number of items available to return.
|
|
38
|
+
# @return [Array[SavedAlbumObject]]
|
|
39
|
+
attr_accessor :items
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['href'] = 'href'
|
|
45
|
+
@_hash['limit'] = 'limit'
|
|
46
|
+
@_hash['mnext'] = 'next'
|
|
47
|
+
@_hash['offset'] = 'offset'
|
|
48
|
+
@_hash['previous'] = 'previous'
|
|
49
|
+
@_hash['total'] = 'total'
|
|
50
|
+
@_hash['items'] = 'items'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
mnext
|
|
63
|
+
previous
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(href = nil, limit = nil, mnext = nil, offset = nil,
|
|
68
|
+
previous = nil, total = nil, items = nil)
|
|
69
|
+
@href = href
|
|
70
|
+
@limit = limit
|
|
71
|
+
@mnext = mnext
|
|
72
|
+
@offset = offset
|
|
73
|
+
@previous = previous
|
|
74
|
+
@total = total
|
|
75
|
+
@items = items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
href = hash.key?('href') ? hash['href'] : nil
|
|
84
|
+
limit = hash.key?('limit') ? hash['limit'] : nil
|
|
85
|
+
mnext = hash.key?('next') ? hash['next'] : nil
|
|
86
|
+
offset = hash.key?('offset') ? hash['offset'] : nil
|
|
87
|
+
previous = hash.key?('previous') ? hash['previous'] : nil
|
|
88
|
+
total = hash.key?('total') ? hash['total'] : nil
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
items = nil
|
|
91
|
+
unless hash['items'].nil?
|
|
92
|
+
items = []
|
|
93
|
+
hash['items'].each do |structure|
|
|
94
|
+
items << (SavedAlbumObject.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
items = nil unless hash.key?('items')
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
PagingSavedAlbumObject.new(href,
|
|
102
|
+
limit,
|
|
103
|
+
mnext,
|
|
104
|
+
offset,
|
|
105
|
+
previous,
|
|
106
|
+
total,
|
|
107
|
+
items)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} href: #{@href}, limit: #{@limit}, mnext: #{@mnext}, offset: #{@offset},"\
|
|
114
|
+
" previous: #{@previous}, total: #{@total}, items: #{@items}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} href: #{@href.inspect}, limit: #{@limit.inspect}, mnext: #{@mnext.inspect},"\
|
|
121
|
+
" offset: #{@offset.inspect}, previous: #{@previous.inspect}, total: #{@total.inspect},"\
|
|
122
|
+
" items: #{@items.inspect}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# PagingSavedAudiobookObject Model.
|
|
8
|
+
class PagingSavedAudiobookObject < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A link to the Web API endpoint returning the full result of the request
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :href
|
|
15
|
+
|
|
16
|
+
# The maximum number of items in the response (as set in the query or by
|
|
17
|
+
# default).
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :limit
|
|
20
|
+
|
|
21
|
+
# URL to the next page of items. ( `null` if none)
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :mnext
|
|
24
|
+
|
|
25
|
+
# The offset of the items returned (as set in the query or by default)
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset
|
|
28
|
+
|
|
29
|
+
# URL to the previous page of items. ( `null` if none)
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :previous
|
|
32
|
+
|
|
33
|
+
# The total number of items available to return.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :total
|
|
36
|
+
|
|
37
|
+
# The total number of items available to return.
|
|
38
|
+
# @return [Array[SavedAudiobookObject]]
|
|
39
|
+
attr_accessor :items
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['href'] = 'href'
|
|
45
|
+
@_hash['limit'] = 'limit'
|
|
46
|
+
@_hash['mnext'] = 'next'
|
|
47
|
+
@_hash['offset'] = 'offset'
|
|
48
|
+
@_hash['previous'] = 'previous'
|
|
49
|
+
@_hash['total'] = 'total'
|
|
50
|
+
@_hash['items'] = 'items'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
mnext
|
|
63
|
+
previous
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(href = nil, limit = nil, mnext = nil, offset = nil,
|
|
68
|
+
previous = nil, total = nil, items = nil)
|
|
69
|
+
@href = href
|
|
70
|
+
@limit = limit
|
|
71
|
+
@mnext = mnext
|
|
72
|
+
@offset = offset
|
|
73
|
+
@previous = previous
|
|
74
|
+
@total = total
|
|
75
|
+
@items = items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
href = hash.key?('href') ? hash['href'] : nil
|
|
84
|
+
limit = hash.key?('limit') ? hash['limit'] : nil
|
|
85
|
+
mnext = hash.key?('next') ? hash['next'] : nil
|
|
86
|
+
offset = hash.key?('offset') ? hash['offset'] : nil
|
|
87
|
+
previous = hash.key?('previous') ? hash['previous'] : nil
|
|
88
|
+
total = hash.key?('total') ? hash['total'] : nil
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
items = nil
|
|
91
|
+
unless hash['items'].nil?
|
|
92
|
+
items = []
|
|
93
|
+
hash['items'].each do |structure|
|
|
94
|
+
items << (SavedAudiobookObject.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
items = nil unless hash.key?('items')
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
PagingSavedAudiobookObject.new(href,
|
|
102
|
+
limit,
|
|
103
|
+
mnext,
|
|
104
|
+
offset,
|
|
105
|
+
previous,
|
|
106
|
+
total,
|
|
107
|
+
items)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} href: #{@href}, limit: #{@limit}, mnext: #{@mnext}, offset: #{@offset},"\
|
|
114
|
+
" previous: #{@previous}, total: #{@total}, items: #{@items}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} href: #{@href.inspect}, limit: #{@limit.inspect}, mnext: #{@mnext.inspect},"\
|
|
121
|
+
" offset: #{@offset.inspect}, previous: #{@previous.inspect}, total: #{@total.inspect},"\
|
|
122
|
+
" items: #{@items.inspect}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# PagingSavedEpisodeObject Model.
|
|
8
|
+
class PagingSavedEpisodeObject < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A link to the Web API endpoint returning the full result of the request
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :href
|
|
15
|
+
|
|
16
|
+
# The maximum number of items in the response (as set in the query or by
|
|
17
|
+
# default).
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :limit
|
|
20
|
+
|
|
21
|
+
# URL to the next page of items. ( `null` if none)
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :mnext
|
|
24
|
+
|
|
25
|
+
# The offset of the items returned (as set in the query or by default)
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset
|
|
28
|
+
|
|
29
|
+
# URL to the previous page of items. ( `null` if none)
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :previous
|
|
32
|
+
|
|
33
|
+
# The total number of items available to return.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :total
|
|
36
|
+
|
|
37
|
+
# The total number of items available to return.
|
|
38
|
+
# @return [Array[SavedEpisodeObject]]
|
|
39
|
+
attr_accessor :items
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['href'] = 'href'
|
|
45
|
+
@_hash['limit'] = 'limit'
|
|
46
|
+
@_hash['mnext'] = 'next'
|
|
47
|
+
@_hash['offset'] = 'offset'
|
|
48
|
+
@_hash['previous'] = 'previous'
|
|
49
|
+
@_hash['total'] = 'total'
|
|
50
|
+
@_hash['items'] = 'items'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
mnext
|
|
63
|
+
previous
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(href = nil, limit = nil, mnext = nil, offset = nil,
|
|
68
|
+
previous = nil, total = nil, items = nil)
|
|
69
|
+
@href = href
|
|
70
|
+
@limit = limit
|
|
71
|
+
@mnext = mnext
|
|
72
|
+
@offset = offset
|
|
73
|
+
@previous = previous
|
|
74
|
+
@total = total
|
|
75
|
+
@items = items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
href = hash.key?('href') ? hash['href'] : nil
|
|
84
|
+
limit = hash.key?('limit') ? hash['limit'] : nil
|
|
85
|
+
mnext = hash.key?('next') ? hash['next'] : nil
|
|
86
|
+
offset = hash.key?('offset') ? hash['offset'] : nil
|
|
87
|
+
previous = hash.key?('previous') ? hash['previous'] : nil
|
|
88
|
+
total = hash.key?('total') ? hash['total'] : nil
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
items = nil
|
|
91
|
+
unless hash['items'].nil?
|
|
92
|
+
items = []
|
|
93
|
+
hash['items'].each do |structure|
|
|
94
|
+
items << (SavedEpisodeObject.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
items = nil unless hash.key?('items')
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
PagingSavedEpisodeObject.new(href,
|
|
102
|
+
limit,
|
|
103
|
+
mnext,
|
|
104
|
+
offset,
|
|
105
|
+
previous,
|
|
106
|
+
total,
|
|
107
|
+
items)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} href: #{@href}, limit: #{@limit}, mnext: #{@mnext}, offset: #{@offset},"\
|
|
114
|
+
" previous: #{@previous}, total: #{@total}, items: #{@items}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} href: #{@href.inspect}, limit: #{@limit.inspect}, mnext: #{@mnext.inspect},"\
|
|
121
|
+
" offset: #{@offset.inspect}, previous: #{@previous.inspect}, total: #{@total.inspect},"\
|
|
122
|
+
" items: #{@items.inspect}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# PagingSavedShowObject Model.
|
|
8
|
+
class PagingSavedShowObject < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A link to the Web API endpoint returning the full result of the request
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :href
|
|
15
|
+
|
|
16
|
+
# The maximum number of items in the response (as set in the query or by
|
|
17
|
+
# default).
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :limit
|
|
20
|
+
|
|
21
|
+
# URL to the next page of items. ( `null` if none)
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :mnext
|
|
24
|
+
|
|
25
|
+
# The offset of the items returned (as set in the query or by default)
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset
|
|
28
|
+
|
|
29
|
+
# URL to the previous page of items. ( `null` if none)
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :previous
|
|
32
|
+
|
|
33
|
+
# The total number of items available to return.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :total
|
|
36
|
+
|
|
37
|
+
# The total number of items available to return.
|
|
38
|
+
# @return [Array[SavedShowObject]]
|
|
39
|
+
attr_accessor :items
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['href'] = 'href'
|
|
45
|
+
@_hash['limit'] = 'limit'
|
|
46
|
+
@_hash['mnext'] = 'next'
|
|
47
|
+
@_hash['offset'] = 'offset'
|
|
48
|
+
@_hash['previous'] = 'previous'
|
|
49
|
+
@_hash['total'] = 'total'
|
|
50
|
+
@_hash['items'] = 'items'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
mnext
|
|
63
|
+
previous
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(href = nil, limit = nil, mnext = nil, offset = nil,
|
|
68
|
+
previous = nil, total = nil, items = nil)
|
|
69
|
+
@href = href
|
|
70
|
+
@limit = limit
|
|
71
|
+
@mnext = mnext
|
|
72
|
+
@offset = offset
|
|
73
|
+
@previous = previous
|
|
74
|
+
@total = total
|
|
75
|
+
@items = items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
href = hash.key?('href') ? hash['href'] : nil
|
|
84
|
+
limit = hash.key?('limit') ? hash['limit'] : nil
|
|
85
|
+
mnext = hash.key?('next') ? hash['next'] : nil
|
|
86
|
+
offset = hash.key?('offset') ? hash['offset'] : nil
|
|
87
|
+
previous = hash.key?('previous') ? hash['previous'] : nil
|
|
88
|
+
total = hash.key?('total') ? hash['total'] : nil
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
items = nil
|
|
91
|
+
unless hash['items'].nil?
|
|
92
|
+
items = []
|
|
93
|
+
hash['items'].each do |structure|
|
|
94
|
+
items << (SavedShowObject.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
items = nil unless hash.key?('items')
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
PagingSavedShowObject.new(href,
|
|
102
|
+
limit,
|
|
103
|
+
mnext,
|
|
104
|
+
offset,
|
|
105
|
+
previous,
|
|
106
|
+
total,
|
|
107
|
+
items)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} href: #{@href}, limit: #{@limit}, mnext: #{@mnext}, offset: #{@offset},"\
|
|
114
|
+
" previous: #{@previous}, total: #{@total}, items: #{@items}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} href: #{@href.inspect}, limit: #{@limit.inspect}, mnext: #{@mnext.inspect},"\
|
|
121
|
+
" offset: #{@offset.inspect}, previous: #{@previous.inspect}, total: #{@total.inspect},"\
|
|
122
|
+
" items: #{@items.inspect}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# PagingSavedTrackObject Model.
|
|
8
|
+
class PagingSavedTrackObject < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A link to the Web API endpoint returning the full result of the request
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :href
|
|
15
|
+
|
|
16
|
+
# The maximum number of items in the response (as set in the query or by
|
|
17
|
+
# default).
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
attr_accessor :limit
|
|
20
|
+
|
|
21
|
+
# URL to the next page of items. ( `null` if none)
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :mnext
|
|
24
|
+
|
|
25
|
+
# The offset of the items returned (as set in the query or by default)
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :offset
|
|
28
|
+
|
|
29
|
+
# URL to the previous page of items. ( `null` if none)
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :previous
|
|
32
|
+
|
|
33
|
+
# The total number of items available to return.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :total
|
|
36
|
+
|
|
37
|
+
# The total number of items available to return.
|
|
38
|
+
# @return [Array[SavedTrackObject]]
|
|
39
|
+
attr_accessor :items
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['href'] = 'href'
|
|
45
|
+
@_hash['limit'] = 'limit'
|
|
46
|
+
@_hash['mnext'] = 'next'
|
|
47
|
+
@_hash['offset'] = 'offset'
|
|
48
|
+
@_hash['previous'] = 'previous'
|
|
49
|
+
@_hash['total'] = 'total'
|
|
50
|
+
@_hash['items'] = 'items'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
mnext
|
|
63
|
+
previous
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(href = nil, limit = nil, mnext = nil, offset = nil,
|
|
68
|
+
previous = nil, total = nil, items = nil)
|
|
69
|
+
@href = href
|
|
70
|
+
@limit = limit
|
|
71
|
+
@mnext = mnext
|
|
72
|
+
@offset = offset
|
|
73
|
+
@previous = previous
|
|
74
|
+
@total = total
|
|
75
|
+
@items = items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
href = hash.key?('href') ? hash['href'] : nil
|
|
84
|
+
limit = hash.key?('limit') ? hash['limit'] : nil
|
|
85
|
+
mnext = hash.key?('next') ? hash['next'] : nil
|
|
86
|
+
offset = hash.key?('offset') ? hash['offset'] : nil
|
|
87
|
+
previous = hash.key?('previous') ? hash['previous'] : nil
|
|
88
|
+
total = hash.key?('total') ? hash['total'] : nil
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
items = nil
|
|
91
|
+
unless hash['items'].nil?
|
|
92
|
+
items = []
|
|
93
|
+
hash['items'].each do |structure|
|
|
94
|
+
items << (SavedTrackObject.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
items = nil unless hash.key?('items')
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
PagingSavedTrackObject.new(href,
|
|
102
|
+
limit,
|
|
103
|
+
mnext,
|
|
104
|
+
offset,
|
|
105
|
+
previous,
|
|
106
|
+
total,
|
|
107
|
+
items)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} href: #{@href}, limit: #{@limit}, mnext: #{@mnext}, offset: #{@offset},"\
|
|
114
|
+
" previous: #{@previous}, total: #{@total}, items: #{@items}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} href: #{@href.inspect}, limit: #{@limit.inspect}, mnext: #{@mnext.inspect},"\
|
|
121
|
+
" offset: #{@offset.inspect}, previous: #{@previous.inspect}, total: #{@total.inspect},"\
|
|
122
|
+
" items: #{@items.inspect}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|