spotify-api-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 +107 -0
- data/lib/spotify_web_api/api_helper.rb +10 -0
- data/lib/spotify_web_api/client.rb +154 -0
- data/lib/spotify_web_api/configuration.rb +180 -0
- data/lib/spotify_web_api/controllers/albums_controller.rb +295 -0
- data/lib/spotify_web_api/controllers/artists_controller.rb +187 -0
- data/lib/spotify_web_api/controllers/audiobooks_controller.rb +258 -0
- data/lib/spotify_web_api/controllers/base_controller.rb +66 -0
- data/lib/spotify_web_api/controllers/categories_controller.rb +83 -0
- data/lib/spotify_web_api/controllers/chapters_controller.rb +82 -0
- data/lib/spotify_web_api/controllers/episodes_controller.rb +239 -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 +509 -0
- data/lib/spotify_web_api/controllers/playlists_controller.rb +521 -0
- data/lib/spotify_web_api/controllers/search_controller.rb +60 -0
- data/lib/spotify_web_api/controllers/shows_controller.rb +261 -0
- data/lib/spotify_web_api/controllers/tracks_controller.rb +491 -0
- data/lib/spotify_web_api/controllers/users_controller.rb +396 -0
- data/lib/spotify_web_api/exceptions/api_exception.rb +10 -0
- data/lib/spotify_web_api/exceptions/bad_request_exception.rb +32 -0
- data/lib/spotify_web_api/exceptions/forbidden_exception.rb +32 -0
- data/lib/spotify_web_api/exceptions/not_found_exception.rb +32 -0
- data/lib/spotify_web_api/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/spotify_web_api/exceptions/too_many_requests_exception.rb +32 -0
- data/lib/spotify_web_api/exceptions/unauthorized_exception.rb +32 -0
- data/lib/spotify_web_api/http/api_response.rb +21 -0
- data/lib/spotify_web_api/http/auth/o_auth2.rb +146 -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/models/album_base.rb +168 -0
- data/lib/spotify_web_api/models/album_group_enum.rb +29 -0
- data/lib/spotify_web_api/models/album_object.rb +247 -0
- data/lib/spotify_web_api/models/album_restriction_object.rb +53 -0
- data/lib/spotify_web_api/models/album_type_enum.rb +26 -0
- data/lib/spotify_web_api/models/artist_discography_album_object.rb +194 -0
- data/lib/spotify_web_api/models/artist_object.rb +147 -0
- data/lib/spotify_web_api/models/audio_analysis_object.rb +156 -0
- data/lib/spotify_web_api/models/audio_features_object.rb +249 -0
- data/lib/spotify_web_api/models/audiobook_base.rb +245 -0
- data/lib/spotify_web_api/models/audiobook_object.rb +253 -0
- data/lib/spotify_web_api/models/author_object.rb +50 -0
- data/lib/spotify_web_api/models/base_model.rb +62 -0
- data/lib/spotify_web_api/models/categories.rb +110 -0
- data/lib/spotify_web_api/models/category_object.rb +82 -0
- data/lib/spotify_web_api/models/chapter_base.rb +237 -0
- data/lib/spotify_web_api/models/chapter_object.rb +245 -0
- data/lib/spotify_web_api/models/chapter_restriction_object.rb +59 -0
- data/lib/spotify_web_api/models/context_object.rb +78 -0
- data/lib/spotify_web_api/models/copyright_object.rb +60 -0
- data/lib/spotify_web_api/models/currently_playing_context_object.rb +137 -0
- data/lib/spotify_web_api/models/currently_playing_object.rb +109 -0
- data/lib/spotify_web_api/models/cursor_object.rb +59 -0
- data/lib/spotify_web_api/models/cursor_paged_artists.rb +48 -0
- data/lib/spotify_web_api/models/cursor_paging_object.rb +88 -0
- data/lib/spotify_web_api/models/cursor_paging_play_history_object.rb +106 -0
- data/lib/spotify_web_api/models/cursor_paging_simplified_artist_object.rb +106 -0
- data/lib/spotify_web_api/models/device_object.rb +126 -0
- data/lib/spotify_web_api/models/disallows_object.rb +140 -0
- data/lib/spotify_web_api/models/episode_base.rb +237 -0
- data/lib/spotify_web_api/models/episode_object.rb +246 -0
- data/lib/spotify_web_api/models/episode_restriction_object.rb +58 -0
- data/lib/spotify_web_api/models/error_object.rb +59 -0
- data/lib/spotify_web_api/models/explicit_content_settings_object.rb +61 -0
- data/lib/spotify_web_api/models/external_id_object.rb +72 -0
- data/lib/spotify_web_api/models/external_url_object.rb +51 -0
- data/lib/spotify_web_api/models/followers_object.rb +62 -0
- data/lib/spotify_web_api/models/image_object.rb +67 -0
- data/lib/spotify_web_api/models/include_external_enum.rb +23 -0
- data/lib/spotify_web_api/models/item_type1_enum.rb +20 -0
- data/lib/spotify_web_api/models/item_type2_enum.rb +23 -0
- data/lib/spotify_web_api/models/item_type3_enum.rb +23 -0
- data/lib/spotify_web_api/models/item_type_enum.rb +38 -0
- data/lib/spotify_web_api/models/linked_track_object.rb +89 -0
- data/lib/spotify_web_api/models/many_albums.rb +57 -0
- data/lib/spotify_web_api/models/many_artists.rb +57 -0
- data/lib/spotify_web_api/models/many_audio_features.rb +57 -0
- data/lib/spotify_web_api/models/many_audiobooks.rb +57 -0
- data/lib/spotify_web_api/models/many_chapters.rb +57 -0
- data/lib/spotify_web_api/models/many_devices.rb +57 -0
- data/lib/spotify_web_api/models/many_episodes.rb +57 -0
- data/lib/spotify_web_api/models/many_genres.rb +48 -0
- data/lib/spotify_web_api/models/many_simplified_shows.rb +57 -0
- data/lib/spotify_web_api/models/many_tracks.rb +57 -0
- data/lib/spotify_web_api/models/markets.rb +50 -0
- data/lib/spotify_web_api/models/me_albums_request.rb +55 -0
- data/lib/spotify_web_api/models/me_episodes_request.rb +52 -0
- data/lib/spotify_web_api/models/me_episodes_request1.rb +54 -0
- data/lib/spotify_web_api/models/me_following_request.rb +53 -0
- data/lib/spotify_web_api/models/me_following_request1.rb +55 -0
- data/lib/spotify_web_api/models/me_player_play_request.rb +89 -0
- data/lib/spotify_web_api/models/me_player_request.rb +63 -0
- data/lib/spotify_web_api/models/me_shows_request.rb +55 -0
- data/lib/spotify_web_api/models/me_tracks_request.rb +53 -0
- data/lib/spotify_web_api/models/me_tracks_request1.rb +55 -0
- data/lib/spotify_web_api/models/meta.rb +110 -0
- data/lib/spotify_web_api/models/mode_enum.rb +30 -0
- data/lib/spotify_web_api/models/narrator_object.rb +50 -0
- data/lib/spotify_web_api/models/o_auth_provider_error_enum.rb +45 -0
- data/lib/spotify_web_api/models/o_auth_scope_enum.rb +94 -0
- data/lib/spotify_web_api/models/o_auth_token.rb +96 -0
- data/lib/spotify_web_api/models/paged_albums.rb +48 -0
- data/lib/spotify_web_api/models/paged_categories.rb +48 -0
- data/lib/spotify_web_api/models/paging_artist_discography_album_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_artist_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_featured_playlist_object.rb +59 -0
- data/lib/spotify_web_api/models/paging_object.rb +93 -0
- data/lib/spotify_web_api/models/paging_playlist_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_playlist_track_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_saved_album_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_saved_audiobook_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_saved_episode_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_saved_show_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_saved_track_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_album_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_audiobook_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_chapter_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_episode_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_show_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_simplified_track_object.rb +110 -0
- data/lib/spotify_web_api/models/paging_track_object.rb +110 -0
- data/lib/spotify_web_api/models/play_history_object.rb +77 -0
- data/lib/spotify_web_api/models/playlist_object.rb +193 -0
- data/lib/spotify_web_api/models/playlist_owner_object.rb +109 -0
- data/lib/spotify_web_api/models/playlist_snapshot_id.rb +50 -0
- data/lib/spotify_web_api/models/playlist_track_object.rb +90 -0
- data/lib/spotify_web_api/models/playlist_tracks_ref_object.rb +60 -0
- data/lib/spotify_web_api/models/playlist_user_object.rb +98 -0
- data/lib/spotify_web_api/models/playlists_followers_request.rb +51 -0
- data/lib/spotify_web_api/models/playlists_request.rb +82 -0
- data/lib/spotify_web_api/models/playlists_tracks_request.rb +72 -0
- data/lib/spotify_web_api/models/playlists_tracks_request1.rb +97 -0
- data/lib/spotify_web_api/models/playlists_tracks_request2.rb +75 -0
- data/lib/spotify_web_api/models/private_user_object.rb +181 -0
- data/lib/spotify_web_api/models/public_user_object.rb +128 -0
- data/lib/spotify_web_api/models/queue_object.rb +60 -0
- data/lib/spotify_web_api/models/reason_enum.rb +29 -0
- data/lib/spotify_web_api/models/recommendation_seed_object.rb +104 -0
- data/lib/spotify_web_api/models/recommendations_object.rb +74 -0
- data/lib/spotify_web_api/models/release_date_precision_enum.rb +26 -0
- data/lib/spotify_web_api/models/resume_point_object.rb +60 -0
- data/lib/spotify_web_api/models/saved_album_object.rb +73 -0
- data/lib/spotify_web_api/models/saved_audiobook_object.rb +73 -0
- data/lib/spotify_web_api/models/saved_episode_object.rb +70 -0
- data/lib/spotify_web_api/models/saved_show_object.rb +73 -0
- data/lib/spotify_web_api/models/saved_track_object.rb +73 -0
- data/lib/spotify_web_api/models/search_items.rb +107 -0
- data/lib/spotify_web_api/models/section_object.rb +180 -0
- data/lib/spotify_web_api/models/segment_object.rb +166 -0
- data/lib/spotify_web_api/models/show_base.rb +211 -0
- data/lib/spotify_web_api/models/show_object.rb +219 -0
- data/lib/spotify_web_api/models/simplified_album_object.rb +186 -0
- data/lib/spotify_web_api/models/simplified_artist_object.rb +98 -0
- data/lib/spotify_web_api/models/simplified_playlist_object.rb +184 -0
- data/lib/spotify_web_api/models/simplified_track_object.rb +227 -0
- data/lib/spotify_web_api/models/time_interval_object.rb +68 -0
- data/lib/spotify_web_api/models/track.rb +331 -0
- data/lib/spotify_web_api/models/track1.rb +50 -0
- data/lib/spotify_web_api/models/track_object.rb +265 -0
- data/lib/spotify_web_api/models/track_restriction_object.rb +58 -0
- data/lib/spotify_web_api/models/type2_enum.rb +20 -0
- data/lib/spotify_web_api/models/type3_enum.rb +20 -0
- data/lib/spotify_web_api/models/type4_enum.rb +20 -0
- data/lib/spotify_web_api/models/type6_enum.rb +20 -0
- data/lib/spotify_web_api/models/type7_enum.rb +20 -0
- data/lib/spotify_web_api/models/type8_enum.rb +20 -0
- data/lib/spotify_web_api/models/type9_enum.rb +20 -0
- data/lib/spotify_web_api/models/type_enum.rb +20 -0
- data/lib/spotify_web_api/models/users_playlists_request.rb +87 -0
- data/lib/spotify_web_api/utilities/date_time_helper.rb +11 -0
- data/lib/spotify_web_api/utilities/file_wrapper.rb +16 -0
- data/lib/spotify_web_api.rb +198 -0
- metadata +264 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# ManyTracks Model.
|
|
8
|
+
class ManyTracks < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[TrackObject]]
|
|
14
|
+
attr_accessor :tracks
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['tracks'] = 'tracks'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(tracks = nil)
|
|
34
|
+
@tracks = tracks
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Creates an instance of the object from a hash.
|
|
38
|
+
def self.from_hash(hash)
|
|
39
|
+
return nil unless hash
|
|
40
|
+
|
|
41
|
+
# Extract variables from the hash.
|
|
42
|
+
# Parameter is an array, so we need to iterate through it
|
|
43
|
+
tracks = nil
|
|
44
|
+
unless hash['tracks'].nil?
|
|
45
|
+
tracks = []
|
|
46
|
+
hash['tracks'].each do |structure|
|
|
47
|
+
tracks << (TrackObject.from_hash(structure) if structure)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
tracks = nil unless hash.key?('tracks')
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
ManyTracks.new(tracks)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# Markets Model.
|
|
8
|
+
class Markets < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[String]]
|
|
14
|
+
attr_accessor :markets
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['markets'] = 'markets'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
markets
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(markets = SKIP)
|
|
36
|
+
@markets = markets unless markets == SKIP
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates an instance of the object from a hash.
|
|
40
|
+
def self.from_hash(hash)
|
|
41
|
+
return nil unless hash
|
|
42
|
+
|
|
43
|
+
# Extract variables from the hash.
|
|
44
|
+
markets = hash.key?('markets') ? hash['markets'] : SKIP
|
|
45
|
+
|
|
46
|
+
# Create object from extracted values.
|
|
47
|
+
Markets.new(markets)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeAlbumsRequest Model.
|
|
8
|
+
class MeAlbumsRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
|
+
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50
|
|
15
|
+
# items can be specified in one request. _**Note**: if the `ids` parameter
|
|
16
|
+
# is present in the query string, any IDs listed here in the body will be
|
|
17
|
+
# ignored._
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
ids
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(ids = SKIP)
|
|
41
|
+
@ids = ids unless ids == SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
MeAlbumsRequest.new(ids)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeEpisodesRequest Model.
|
|
8
|
+
class MeEpisodesRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum of
|
|
14
|
+
# 50 items can be specified in one request. _**Note**: if the `ids`
|
|
15
|
+
# parameter is present in the query string, any IDs listed here in the body
|
|
16
|
+
# will be ignored._
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :ids
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['ids'] = 'ids'
|
|
24
|
+
@_hash
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# An array for optional fields
|
|
28
|
+
def self.optionals
|
|
29
|
+
[]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# An array for nullable fields
|
|
33
|
+
def self.nullables
|
|
34
|
+
[]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def initialize(ids = nil)
|
|
38
|
+
@ids = ids
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
ids = hash.key?('ids') ? hash['ids'] : nil
|
|
47
|
+
|
|
48
|
+
# Create object from extracted values.
|
|
49
|
+
MeEpisodesRequest.new(ids)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeEpisodesRequest1 Model.
|
|
8
|
+
class MeEpisodesRequest1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum of
|
|
14
|
+
# 50 items can be specified in one request. _**Note**: if the `ids`
|
|
15
|
+
# parameter is present in the query string, any IDs listed here in the body
|
|
16
|
+
# will be ignored._
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :ids
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['ids'] = 'ids'
|
|
24
|
+
@_hash
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# An array for optional fields
|
|
28
|
+
def self.optionals
|
|
29
|
+
%w[
|
|
30
|
+
ids
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for nullable fields
|
|
35
|
+
def self.nullables
|
|
36
|
+
[]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def initialize(ids = SKIP)
|
|
40
|
+
@ids = ids unless ids == SKIP
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
49
|
+
|
|
50
|
+
# Create object from extracted values.
|
|
51
|
+
MeEpisodesRequest1.new(ids)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeFollowingRequest Model.
|
|
8
|
+
class MeFollowingRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the artist or user [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids).
|
|
14
|
+
# For example: `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`.
|
|
15
|
+
# A maximum of 50 IDs can be sent in one request. _**Note**: if the `ids`
|
|
16
|
+
# parameter is present in the query string, any IDs listed here in the body
|
|
17
|
+
# will be ignored._
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(ids = nil)
|
|
39
|
+
@ids = ids
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Creates an instance of the object from a hash.
|
|
43
|
+
def self.from_hash(hash)
|
|
44
|
+
return nil unless hash
|
|
45
|
+
|
|
46
|
+
# Extract variables from the hash.
|
|
47
|
+
ids = hash.key?('ids') ? hash['ids'] : nil
|
|
48
|
+
|
|
49
|
+
# Create object from extracted values.
|
|
50
|
+
MeFollowingRequest.new(ids)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeFollowingRequest1 Model.
|
|
8
|
+
class MeFollowingRequest1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the artist or user [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
|
+
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of
|
|
15
|
+
# 50 IDs can be sent in one request. _**Note**: if the `ids` parameter is
|
|
16
|
+
# present in the query string, any IDs listed here in the body will be
|
|
17
|
+
# ignored._
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
ids
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(ids = SKIP)
|
|
41
|
+
@ids = ids unless ids == SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
MeFollowingRequest1.new(ids)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MePlayerPlayRequest Model.
|
|
8
|
+
class MePlayerPlayRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Optional. Spotify URI of the context to play.
|
|
13
|
+
# Valid contexts are albums, artists & playlists.
|
|
14
|
+
# `{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}`
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :context_uri
|
|
17
|
+
|
|
18
|
+
# Optional. A JSON array of the Spotify track URIs to play.
|
|
19
|
+
# For example: `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh",
|
|
20
|
+
# "spotify:track:1301WleyT98MSxVHPZCA6M"]}`
|
|
21
|
+
# @return [Array[String]]
|
|
22
|
+
attr_accessor :uris
|
|
23
|
+
|
|
24
|
+
# Optional. Indicates from where in the context playback should start. Only
|
|
25
|
+
# available when context_uri corresponds to an album or playlist object
|
|
26
|
+
# "position" is zero based and can’t be negative. Example: `"offset":
|
|
27
|
+
# {"position": 5}`
|
|
28
|
+
# "uri" is a string representing the uri of the item to start at. Example:
|
|
29
|
+
# `"offset": {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M"}`
|
|
30
|
+
# @return [Object]
|
|
31
|
+
attr_accessor :offset
|
|
32
|
+
|
|
33
|
+
# Indicates from what position to start playback. Must be a positive number.
|
|
34
|
+
# Passing in a position that is greater than the length of the track will
|
|
35
|
+
# cause the player to start playing the next song.
|
|
36
|
+
# @return [Integer]
|
|
37
|
+
attr_accessor :position_ms
|
|
38
|
+
|
|
39
|
+
# A mapping from model property names to API property names.
|
|
40
|
+
def self.names
|
|
41
|
+
@_hash = {} if @_hash.nil?
|
|
42
|
+
@_hash['context_uri'] = 'context_uri'
|
|
43
|
+
@_hash['uris'] = 'uris'
|
|
44
|
+
@_hash['offset'] = 'offset'
|
|
45
|
+
@_hash['position_ms'] = 'position_ms'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
context_uri
|
|
53
|
+
uris
|
|
54
|
+
offset
|
|
55
|
+
position_ms
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
[]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def initialize(context_uri = SKIP, uris = SKIP, offset = SKIP,
|
|
65
|
+
position_ms = SKIP)
|
|
66
|
+
@context_uri = context_uri unless context_uri == SKIP
|
|
67
|
+
@uris = uris unless uris == SKIP
|
|
68
|
+
@offset = offset unless offset == SKIP
|
|
69
|
+
@position_ms = position_ms unless position_ms == SKIP
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Creates an instance of the object from a hash.
|
|
73
|
+
def self.from_hash(hash)
|
|
74
|
+
return nil unless hash
|
|
75
|
+
|
|
76
|
+
# Extract variables from the hash.
|
|
77
|
+
context_uri = hash.key?('context_uri') ? hash['context_uri'] : SKIP
|
|
78
|
+
uris = hash.key?('uris') ? hash['uris'] : SKIP
|
|
79
|
+
offset = hash.key?('offset') ? hash['offset'] : SKIP
|
|
80
|
+
position_ms = hash.key?('position_ms') ? hash['position_ms'] : SKIP
|
|
81
|
+
|
|
82
|
+
# Create object from extracted values.
|
|
83
|
+
MePlayerPlayRequest.new(context_uri,
|
|
84
|
+
uris,
|
|
85
|
+
offset,
|
|
86
|
+
position_ms)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MePlayerRequest Model.
|
|
8
|
+
class MePlayerRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array containing the ID of the device on which playback should be
|
|
13
|
+
# started/transferred.<br/>For
|
|
14
|
+
# example:`{device_ids:["74ASZWbe4lXaubB36ztrGX"]}`<br/>_**Note**: Although
|
|
15
|
+
# an array is accepted, only a single device_id is currently supported.
|
|
16
|
+
# Supplying more than one will return `400 Bad Request`_
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :device_ids
|
|
19
|
+
|
|
20
|
+
# **true**: ensure playback happens on new device.<br/>**false** or not
|
|
21
|
+
# provided: keep the current playback state.
|
|
22
|
+
# @return [TrueClass | FalseClass]
|
|
23
|
+
attr_accessor :play
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['device_ids'] = 'device_ids'
|
|
29
|
+
@_hash['play'] = 'play'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
play
|
|
37
|
+
]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for nullable fields
|
|
41
|
+
def self.nullables
|
|
42
|
+
[]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def initialize(device_ids = nil, play = SKIP)
|
|
46
|
+
@device_ids = device_ids
|
|
47
|
+
@play = play unless play == SKIP
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
device_ids = hash.key?('device_ids') ? hash['device_ids'] : nil
|
|
56
|
+
play = hash.key?('play') ? hash['play'] : SKIP
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
MePlayerRequest.new(device_ids,
|
|
60
|
+
play)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeShowsRequest Model.
|
|
8
|
+
class MeShowsRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and
|
|
14
|
+
# -ids).
|
|
15
|
+
# A maximum of 50 items can be specified in one request. *Note: if the `ids`
|
|
16
|
+
# parameter is present in the query string, any IDs listed here in the body
|
|
17
|
+
# will be ignored.*
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
ids
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(ids = SKIP)
|
|
41
|
+
@ids = ids unless ids == SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
MeShowsRequest.new(ids)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeTracksRequest Model.
|
|
8
|
+
class MeTracksRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
|
+
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50
|
|
15
|
+
# items can be specified in one request. _**Note**: if the `ids` parameter
|
|
16
|
+
# is present in the query string, any IDs listed here in the body will be
|
|
17
|
+
# ignored._
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(ids = nil)
|
|
39
|
+
@ids = ids
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Creates an instance of the object from a hash.
|
|
43
|
+
def self.from_hash(hash)
|
|
44
|
+
return nil unless hash
|
|
45
|
+
|
|
46
|
+
# Extract variables from the hash.
|
|
47
|
+
ids = hash.key?('ids') ? hash['ids'] : nil
|
|
48
|
+
|
|
49
|
+
# Create object from extracted values.
|
|
50
|
+
MeTracksRequest.new(ids)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spotify_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SpotifyWebApi
|
|
7
|
+
# MeTracksRequest1 Model.
|
|
8
|
+
class MeTracksRequest1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A JSON array of the [Spotify
|
|
13
|
+
# IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
|
+
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50
|
|
15
|
+
# items can be specified in one request. _**Note**: if the `ids` parameter
|
|
16
|
+
# is present in the query string, any IDs listed here in the body will be
|
|
17
|
+
# ignored._
|
|
18
|
+
# @return [Array[String]]
|
|
19
|
+
attr_accessor :ids
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['ids'] = 'ids'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
ids
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(ids = SKIP)
|
|
41
|
+
@ids = ids unless ids == SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
MeTracksRequest1.new(ids)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|