spotted 0.5.0 → 0.6.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 +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/spotted/client.rb +0 -4
- data/lib/spotted/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/spotted/models/me/album_remove_params.rb +4 -4
- data/lib/spotted/models/me/album_save_params.rb +4 -4
- data/lib/spotted/models/me/episode_remove_params.rb +4 -4
- data/lib/spotted/models/me/episode_save_params.rb +4 -4
- data/lib/spotted/models/me/following_follow_params.rb +4 -23
- data/lib/spotted/models/me/following_unfollow_params.rb +4 -23
- data/lib/spotted/models/me/show_remove_params.rb +4 -20
- data/lib/spotted/models/me/show_save_params.rb +4 -4
- data/lib/spotted/models/me/track_remove_params.rb +4 -4
- data/lib/spotted/models/playlists/track_add_params.rb +7 -7
- data/lib/spotted/models/playlists/track_update_params.rb +8 -8
- data/lib/spotted/models.rb +0 -5
- data/lib/spotted/resources/me/albums.rb +6 -22
- data/lib/spotted/resources/me/episodes.rb +6 -16
- data/lib/spotted/resources/me/following.rb +7 -21
- data/lib/spotted/resources/me/shows.rb +6 -24
- data/lib/spotted/resources/me/tracks.rb +3 -11
- data/lib/spotted/resources/playlists/tracks.rb +13 -17
- data/lib/spotted/version.rb +1 -1
- data/lib/spotted.rb +1 -3
- data/manifest.yaml +1 -0
- data/rbi/spotted/client.rbi +0 -3
- data/rbi/spotted/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/spotted/models/me/album_remove_params.rbi +6 -9
- data/rbi/spotted/models/me/album_save_params.rbi +6 -9
- data/rbi/spotted/models/me/episode_remove_params.rbi +6 -9
- data/rbi/spotted/models/me/episode_save_params.rbi +4 -7
- data/rbi/spotted/models/me/following_follow_params.rbi +4 -42
- data/rbi/spotted/models/me/following_unfollow_params.rbi +6 -47
- data/rbi/spotted/models/me/show_remove_params.rbi +6 -36
- data/rbi/spotted/models/me/show_save_params.rbi +6 -9
- data/rbi/spotted/models/me/track_remove_params.rbi +6 -9
- data/rbi/spotted/models/playlists/track_add_params.rbi +12 -12
- data/rbi/spotted/models/playlists/track_update_params.rbi +9 -9
- data/rbi/spotted/models.rbi +0 -8
- data/rbi/spotted/resources/me/albums.rbi +6 -6
- data/rbi/spotted/resources/me/episodes.rbi +6 -6
- data/rbi/spotted/resources/me/following.rbi +6 -12
- data/rbi/spotted/resources/me/shows.rbi +6 -17
- data/rbi/spotted/resources/me/tracks.rbi +3 -3
- data/rbi/spotted/resources/playlists/tracks.rbi +28 -31
- data/sig/spotted/client.rbs +0 -2
- data/sig/spotted/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/spotted/models/me/album_remove_params.rbs +5 -6
- data/sig/spotted/models/me/album_save_params.rbs +5 -6
- data/sig/spotted/models/me/episode_remove_params.rbs +5 -6
- data/sig/spotted/models/me/episode_save_params.rbs +4 -5
- data/sig/spotted/models/me/following_follow_params.rbs +4 -23
- data/sig/spotted/models/me/following_unfollow_params.rbs +5 -24
- data/sig/spotted/models/me/show_remove_params.rbs +5 -12
- data/sig/spotted/models/me/show_save_params.rbs +5 -6
- data/sig/spotted/models/me/track_remove_params.rbs +5 -6
- data/sig/spotted/models/playlists/track_add_params.rbs +9 -9
- data/sig/spotted/models/playlists/track_update_params.rbs +8 -8
- data/sig/spotted/models.rbs +0 -4
- data/sig/spotted/resources/me/albums.rbs +2 -2
- data/sig/spotted/resources/me/episodes.rbs +2 -2
- data/sig/spotted/resources/me/following.rbs +2 -4
- data/sig/spotted/resources/me/shows.rbs +2 -3
- data/sig/spotted/resources/me/tracks.rbs +1 -1
- data/sig/spotted/resources/playlists/tracks.rbs +3 -3
- metadata +2 -11
- data/lib/spotted/models/unwrap_webhook_event.rb +0 -8
- data/lib/spotted/models/webhook_unwrap_params.rb +0 -14
- data/lib/spotted/resources/webhooks.rb +0 -22
- data/rbi/spotted/models/unwrap_webhook_event.rbi +0 -7
- data/rbi/spotted/models/webhook_unwrap_params.rbi +0 -27
- data/rbi/spotted/resources/webhooks.rbi +0 -19
- data/sig/spotted/models/unwrap_webhook_event.rbs +0 -5
- data/sig/spotted/models/webhook_unwrap_params.rbs +0 -15
- data/sig/spotted/resources/webhooks.rbs +0 -9
|
@@ -67,11 +67,9 @@ module Spotted
|
|
|
67
67
|
# Add the current user as a follower of one or more artists or other Spotify
|
|
68
68
|
# users.
|
|
69
69
|
#
|
|
70
|
-
# @overload follow(
|
|
70
|
+
# @overload follow(ids:, request_options: {})
|
|
71
71
|
#
|
|
72
|
-
# @param
|
|
73
|
-
#
|
|
74
|
-
# @param type [Symbol, Spotted::Models::Me::FollowingFollowParams::Type] Query param: The ID type.
|
|
72
|
+
# @param ids [Array<String>] A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts
|
|
75
73
|
#
|
|
76
74
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
77
75
|
#
|
|
@@ -80,15 +78,7 @@ module Spotted
|
|
|
80
78
|
# @see Spotted::Models::Me::FollowingFollowParams
|
|
81
79
|
def follow(params)
|
|
82
80
|
parsed, options = Spotted::Me::FollowingFollowParams.dump_request(params)
|
|
83
|
-
|
|
84
|
-
@client.request(
|
|
85
|
-
method: :put,
|
|
86
|
-
path: "me/following",
|
|
87
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
88
|
-
body: parsed.except(*query_params),
|
|
89
|
-
model: NilClass,
|
|
90
|
-
options: options
|
|
91
|
-
)
|
|
81
|
+
@client.request(method: :put, path: "me/following", body: parsed, model: NilClass, options: options)
|
|
92
82
|
end
|
|
93
83
|
|
|
94
84
|
# Some parameter documentations has been truncated, see
|
|
@@ -97,25 +87,21 @@ module Spotted
|
|
|
97
87
|
# Remove the current user as a follower of one or more artists or other Spotify
|
|
98
88
|
# users.
|
|
99
89
|
#
|
|
100
|
-
# @overload unfollow(
|
|
101
|
-
#
|
|
102
|
-
# @param type [Symbol, Spotted::Models::Me::FollowingUnfollowParams::Type] Query param: The ID type: either `artist` or `user`.
|
|
90
|
+
# @overload unfollow(ids: nil, request_options: {})
|
|
103
91
|
#
|
|
104
|
-
# @param
|
|
92
|
+
# @param ids [Array<String>] A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts
|
|
105
93
|
#
|
|
106
94
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
107
95
|
#
|
|
108
96
|
# @return [nil]
|
|
109
97
|
#
|
|
110
98
|
# @see Spotted::Models::Me::FollowingUnfollowParams
|
|
111
|
-
def unfollow(params)
|
|
99
|
+
def unfollow(params = {})
|
|
112
100
|
parsed, options = Spotted::Me::FollowingUnfollowParams.dump_request(params)
|
|
113
|
-
query_params = [:query_ids, :type]
|
|
114
101
|
@client.request(
|
|
115
102
|
method: :delete,
|
|
116
103
|
path: "me/following",
|
|
117
|
-
|
|
118
|
-
body: parsed.except(*query_params),
|
|
104
|
+
body: parsed,
|
|
119
105
|
model: NilClass,
|
|
120
106
|
options: options
|
|
121
107
|
)
|
|
@@ -64,11 +64,9 @@ module Spotted
|
|
|
64
64
|
#
|
|
65
65
|
# Delete one or more shows from current Spotify user's library.
|
|
66
66
|
#
|
|
67
|
-
# @overload remove(
|
|
67
|
+
# @overload remove(ids: nil, request_options: {})
|
|
68
68
|
#
|
|
69
|
-
# @param
|
|
70
|
-
#
|
|
71
|
-
# @param market [String] Query param: An [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/
|
|
69
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](https://developer.spotify.com/documentation/we
|
|
72
70
|
#
|
|
73
71
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
74
72
|
#
|
|
@@ -77,15 +75,7 @@ module Spotted
|
|
|
77
75
|
# @see Spotted::Models::Me::ShowRemoveParams
|
|
78
76
|
def remove(params = {})
|
|
79
77
|
parsed, options = Spotted::Me::ShowRemoveParams.dump_request(params)
|
|
80
|
-
|
|
81
|
-
@client.request(
|
|
82
|
-
method: :delete,
|
|
83
|
-
path: "me/shows",
|
|
84
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
85
|
-
body: parsed.except(*query_params),
|
|
86
|
-
model: NilClass,
|
|
87
|
-
options: options
|
|
88
|
-
)
|
|
78
|
+
@client.request(method: :delete, path: "me/shows", body: parsed, model: NilClass, options: options)
|
|
89
79
|
end
|
|
90
80
|
|
|
91
81
|
# Some parameter documentations has been truncated, see
|
|
@@ -93,9 +83,9 @@ module Spotted
|
|
|
93
83
|
#
|
|
94
84
|
# Save one or more shows to current Spotify user's library.
|
|
95
85
|
#
|
|
96
|
-
# @overload save(
|
|
86
|
+
# @overload save(ids: nil, request_options: {})
|
|
97
87
|
#
|
|
98
|
-
# @param
|
|
88
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](https://developer.spotify.com/documentation/we
|
|
99
89
|
#
|
|
100
90
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
101
91
|
#
|
|
@@ -104,15 +94,7 @@ module Spotted
|
|
|
104
94
|
# @see Spotted::Models::Me::ShowSaveParams
|
|
105
95
|
def save(params = {})
|
|
106
96
|
parsed, options = Spotted::Me::ShowSaveParams.dump_request(params)
|
|
107
|
-
|
|
108
|
-
@client.request(
|
|
109
|
-
method: :put,
|
|
110
|
-
path: "me/shows",
|
|
111
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
112
|
-
body: parsed.except(*query_params),
|
|
113
|
-
model: NilClass,
|
|
114
|
-
options: options
|
|
115
|
-
)
|
|
97
|
+
@client.request(method: :put, path: "me/shows", body: parsed, model: NilClass, options: options)
|
|
116
98
|
end
|
|
117
99
|
|
|
118
100
|
# @api private
|
|
@@ -66,9 +66,9 @@ module Spotted
|
|
|
66
66
|
#
|
|
67
67
|
# Remove one or more tracks from the current user's 'Your Music' library.
|
|
68
68
|
#
|
|
69
|
-
# @overload remove(
|
|
69
|
+
# @overload remove(ids: nil, request_options: {})
|
|
70
70
|
#
|
|
71
|
-
# @param
|
|
71
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
72
72
|
#
|
|
73
73
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
74
74
|
#
|
|
@@ -77,15 +77,7 @@ module Spotted
|
|
|
77
77
|
# @see Spotted::Models::Me::TrackRemoveParams
|
|
78
78
|
def remove(params = {})
|
|
79
79
|
parsed, options = Spotted::Me::TrackRemoveParams.dump_request(params)
|
|
80
|
-
|
|
81
|
-
@client.request(
|
|
82
|
-
method: :delete,
|
|
83
|
-
path: "me/tracks",
|
|
84
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
85
|
-
body: parsed.except(*query_params),
|
|
86
|
-
model: NilClass,
|
|
87
|
-
options: options
|
|
88
|
-
)
|
|
80
|
+
@client.request(method: :delete, path: "me/tracks", body: parsed, model: NilClass, options: options)
|
|
89
81
|
end
|
|
90
82
|
|
|
91
83
|
# Some parameter documentations has been truncated, see
|
|
@@ -17,19 +17,19 @@ module Spotted
|
|
|
17
17
|
# have different parameters. These operations can't be applied together in a
|
|
18
18
|
# single request.
|
|
19
19
|
#
|
|
20
|
-
# @overload update(playlist_id,
|
|
20
|
+
# @overload update(playlist_id, insert_before: nil, range_length: nil, range_start: nil, snapshot_id: nil, uris: nil, request_options: {})
|
|
21
21
|
#
|
|
22
|
-
# @param playlist_id [String]
|
|
22
|
+
# @param playlist_id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli
|
|
23
23
|
#
|
|
24
|
-
# @param
|
|
24
|
+
# @param insert_before [Integer] The position where the items should be inserted.<br/>To reorder the items to the
|
|
25
25
|
#
|
|
26
|
-
# @param
|
|
26
|
+
# @param range_length [Integer] The amount of items to be reordered. Defaults to 1 if not set.<br/>The range of
|
|
27
27
|
#
|
|
28
|
-
# @param
|
|
28
|
+
# @param range_start [Integer] The position of the first item to be reordered.
|
|
29
29
|
#
|
|
30
|
-
# @param
|
|
30
|
+
# @param snapshot_id [String] The playlist's snapshot ID against which you want to make the changes.
|
|
31
31
|
#
|
|
32
|
-
# @param
|
|
32
|
+
# @param uris [Array<String>]
|
|
33
33
|
#
|
|
34
34
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
35
|
#
|
|
@@ -38,12 +38,10 @@ module Spotted
|
|
|
38
38
|
# @see Spotted::Models::Playlists::TrackUpdateParams
|
|
39
39
|
def update(playlist_id, params = {})
|
|
40
40
|
parsed, options = Spotted::Playlists::TrackUpdateParams.dump_request(params)
|
|
41
|
-
query_params = [:query_uris]
|
|
42
41
|
@client.request(
|
|
43
42
|
method: :put,
|
|
44
43
|
path: ["playlists/%1$s/tracks", playlist_id],
|
|
45
|
-
|
|
46
|
-
body: parsed.except(*query_params),
|
|
44
|
+
body: parsed,
|
|
47
45
|
model: Spotted::Models::Playlists::TrackUpdateResponse,
|
|
48
46
|
options: options
|
|
49
47
|
)
|
|
@@ -90,13 +88,13 @@ module Spotted
|
|
|
90
88
|
#
|
|
91
89
|
# Add one or more items to a user's playlist.
|
|
92
90
|
#
|
|
93
|
-
# @overload add(playlist_id,
|
|
91
|
+
# @overload add(playlist_id, position: nil, uris: nil, request_options: {})
|
|
94
92
|
#
|
|
95
|
-
# @param playlist_id [String]
|
|
93
|
+
# @param playlist_id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli
|
|
96
94
|
#
|
|
97
|
-
# @param
|
|
95
|
+
# @param position [Integer] The position to insert the items, a zero-based index. For example, to insert the
|
|
98
96
|
#
|
|
99
|
-
# @param
|
|
97
|
+
# @param uris [Array<String>] A JSON array of the [Spotify URIs](/documentation/web-api/concepts/spotify-uris-
|
|
100
98
|
#
|
|
101
99
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
102
100
|
#
|
|
@@ -105,12 +103,10 @@ module Spotted
|
|
|
105
103
|
# @see Spotted::Models::Playlists::TrackAddParams
|
|
106
104
|
def add(playlist_id, params = {})
|
|
107
105
|
parsed, options = Spotted::Playlists::TrackAddParams.dump_request(params)
|
|
108
|
-
query_params = [:query_position, :query_uris]
|
|
109
106
|
@client.request(
|
|
110
107
|
method: :post,
|
|
111
108
|
path: ["playlists/%1$s/tracks", playlist_id],
|
|
112
|
-
|
|
113
|
-
body: parsed.except(*query_params),
|
|
109
|
+
body: parsed,
|
|
114
110
|
model: Spotted::Models::Playlists::TrackAddResponse,
|
|
115
111
|
options: options
|
|
116
112
|
)
|
data/lib/spotted/version.rb
CHANGED
data/lib/spotted.rb
CHANGED
|
@@ -10,6 +10,7 @@ require "erb"
|
|
|
10
10
|
require "etc"
|
|
11
11
|
require "json"
|
|
12
12
|
require "net/http"
|
|
13
|
+
require "openssl"
|
|
13
14
|
require "pathname"
|
|
14
15
|
require "rbconfig"
|
|
15
16
|
require "securerandom"
|
|
@@ -220,13 +221,11 @@ require_relative "spotted/models/track_list_response"
|
|
|
220
221
|
require_relative "spotted/models/track_object"
|
|
221
222
|
require_relative "spotted/models/track_restriction_object"
|
|
222
223
|
require_relative "spotted/models/track_retrieve_params"
|
|
223
|
-
require_relative "spotted/models/unwrap_webhook_event"
|
|
224
224
|
require_relative "spotted/models/user_retrieve_profile_params"
|
|
225
225
|
require_relative "spotted/models/user_retrieve_profile_response"
|
|
226
226
|
require_relative "spotted/models/users/playlist_create_params"
|
|
227
227
|
require_relative "spotted/models/users/playlist_create_response"
|
|
228
228
|
require_relative "spotted/models/users/playlist_list_params"
|
|
229
|
-
require_relative "spotted/models/webhook_unwrap_params"
|
|
230
229
|
require_relative "spotted/models"
|
|
231
230
|
require_relative "spotted/resources/albums"
|
|
232
231
|
require_relative "spotted/resources/artists"
|
|
@@ -259,4 +258,3 @@ require_relative "spotted/resources/shows"
|
|
|
259
258
|
require_relative "spotted/resources/tracks"
|
|
260
259
|
require_relative "spotted/resources/users"
|
|
261
260
|
require_relative "spotted/resources/users/playlists"
|
|
262
|
-
require_relative "spotted/resources/webhooks"
|
data/manifest.yaml
CHANGED
data/rbi/spotted/client.rbi
CHANGED
|
@@ -26,8 +26,12 @@ module Spotted
|
|
|
26
26
|
|
|
27
27
|
class << self
|
|
28
28
|
# @api private
|
|
29
|
-
sig
|
|
30
|
-
|
|
29
|
+
sig do
|
|
30
|
+
params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
|
|
31
|
+
Net::HTTP
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def connect(cert_store:, url:)
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
# @api private
|
|
@@ -18,14 +18,14 @@ module Spotted
|
|
|
18
18
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
19
19
|
# the query string, any IDs listed here in the body will be ignored._
|
|
20
20
|
sig { returns(T.nilable(T::Array[String])) }
|
|
21
|
-
attr_reader :
|
|
21
|
+
attr_reader :ids
|
|
22
22
|
|
|
23
|
-
sig { params(
|
|
24
|
-
attr_writer :
|
|
23
|
+
sig { params(ids: T::Array[String]).void }
|
|
24
|
+
attr_writer :ids
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
27
|
params(
|
|
28
|
-
|
|
28
|
+
ids: T::Array[String],
|
|
29
29
|
request_options: Spotted::RequestOptions::OrHash
|
|
30
30
|
).returns(T.attached_class)
|
|
31
31
|
end
|
|
@@ -35,17 +35,14 @@ module Spotted
|
|
|
35
35
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
36
36
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
37
37
|
# the query string, any IDs listed here in the body will be ignored._
|
|
38
|
-
|
|
38
|
+
ids: nil,
|
|
39
39
|
request_options: {}
|
|
40
40
|
)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
sig do
|
|
44
44
|
override.returns(
|
|
45
|
-
{
|
|
46
|
-
body_ids: T::Array[String],
|
|
47
|
-
request_options: Spotted::RequestOptions
|
|
48
|
-
}
|
|
45
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
49
46
|
)
|
|
50
47
|
end
|
|
51
48
|
def to_hash
|
|
@@ -18,14 +18,14 @@ module Spotted
|
|
|
18
18
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
19
19
|
# the query string, any IDs listed here in the body will be ignored._
|
|
20
20
|
sig { returns(T.nilable(T::Array[String])) }
|
|
21
|
-
attr_reader :
|
|
21
|
+
attr_reader :ids
|
|
22
22
|
|
|
23
|
-
sig { params(
|
|
24
|
-
attr_writer :
|
|
23
|
+
sig { params(ids: T::Array[String]).void }
|
|
24
|
+
attr_writer :ids
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
27
|
params(
|
|
28
|
-
|
|
28
|
+
ids: T::Array[String],
|
|
29
29
|
request_options: Spotted::RequestOptions::OrHash
|
|
30
30
|
).returns(T.attached_class)
|
|
31
31
|
end
|
|
@@ -35,17 +35,14 @@ module Spotted
|
|
|
35
35
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
36
36
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
37
37
|
# the query string, any IDs listed here in the body will be ignored._
|
|
38
|
-
|
|
38
|
+
ids: nil,
|
|
39
39
|
request_options: {}
|
|
40
40
|
)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
sig do
|
|
44
44
|
override.returns(
|
|
45
|
-
{
|
|
46
|
-
body_ids: T::Array[String],
|
|
47
|
-
request_options: Spotted::RequestOptions
|
|
48
|
-
}
|
|
45
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
49
46
|
)
|
|
50
47
|
end
|
|
51
48
|
def to_hash
|
|
@@ -18,14 +18,14 @@ module Spotted
|
|
|
18
18
|
# is present in the query string, any IDs listed here in the body will be
|
|
19
19
|
# ignored._
|
|
20
20
|
sig { returns(T.nilable(T::Array[String])) }
|
|
21
|
-
attr_reader :
|
|
21
|
+
attr_reader :ids
|
|
22
22
|
|
|
23
|
-
sig { params(
|
|
24
|
-
attr_writer :
|
|
23
|
+
sig { params(ids: T::Array[String]).void }
|
|
24
|
+
attr_writer :ids
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
27
|
params(
|
|
28
|
-
|
|
28
|
+
ids: T::Array[String],
|
|
29
29
|
request_options: Spotted::RequestOptions::OrHash
|
|
30
30
|
).returns(T.attached_class)
|
|
31
31
|
end
|
|
@@ -35,17 +35,14 @@ module Spotted
|
|
|
35
35
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
36
36
|
# is present in the query string, any IDs listed here in the body will be
|
|
37
37
|
# ignored._
|
|
38
|
-
|
|
38
|
+
ids: nil,
|
|
39
39
|
request_options: {}
|
|
40
40
|
)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
sig do
|
|
44
44
|
override.returns(
|
|
45
|
-
{
|
|
46
|
-
body_ids: T::Array[String],
|
|
47
|
-
request_options: Spotted::RequestOptions
|
|
48
|
-
}
|
|
45
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
49
46
|
)
|
|
50
47
|
end
|
|
51
48
|
def to_hash
|
|
@@ -18,11 +18,11 @@ module Spotted
|
|
|
18
18
|
# is present in the query string, any IDs listed here in the body will be
|
|
19
19
|
# ignored._
|
|
20
20
|
sig { returns(T::Array[String]) }
|
|
21
|
-
attr_accessor :
|
|
21
|
+
attr_accessor :ids
|
|
22
22
|
|
|
23
23
|
sig do
|
|
24
24
|
params(
|
|
25
|
-
|
|
25
|
+
ids: T::Array[String],
|
|
26
26
|
request_options: Spotted::RequestOptions::OrHash
|
|
27
27
|
).returns(T.attached_class)
|
|
28
28
|
end
|
|
@@ -32,17 +32,14 @@ module Spotted
|
|
|
32
32
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
33
33
|
# is present in the query string, any IDs listed here in the body will be
|
|
34
34
|
# ignored._
|
|
35
|
-
|
|
35
|
+
ids:,
|
|
36
36
|
request_options: {}
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
sig do
|
|
41
41
|
override.returns(
|
|
42
|
-
{
|
|
43
|
-
body_ids: T::Array[String],
|
|
44
|
-
request_options: Spotted::RequestOptions
|
|
45
|
-
}
|
|
42
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
46
43
|
)
|
|
47
44
|
end
|
|
48
45
|
def to_hash
|
|
@@ -21,16 +21,11 @@ module Spotted
|
|
|
21
21
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
22
22
|
# the query string, any IDs listed here in the body will be ignored._
|
|
23
23
|
sig { returns(T::Array[String]) }
|
|
24
|
-
attr_accessor :
|
|
25
|
-
|
|
26
|
-
# The ID type.
|
|
27
|
-
sig { returns(Spotted::Me::FollowingFollowParams::Type::OrSymbol) }
|
|
28
|
-
attr_accessor :type
|
|
24
|
+
attr_accessor :ids
|
|
29
25
|
|
|
30
26
|
sig do
|
|
31
27
|
params(
|
|
32
|
-
|
|
33
|
-
type: Spotted::Me::FollowingFollowParams::Type::OrSymbol,
|
|
28
|
+
ids: T::Array[String],
|
|
34
29
|
request_options: Spotted::RequestOptions::OrHash
|
|
35
30
|
).returns(T.attached_class)
|
|
36
31
|
end
|
|
@@ -40,51 +35,18 @@ module Spotted
|
|
|
40
35
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
41
36
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
42
37
|
# the query string, any IDs listed here in the body will be ignored._
|
|
43
|
-
|
|
44
|
-
# The ID type.
|
|
45
|
-
type:,
|
|
38
|
+
ids:,
|
|
46
39
|
request_options: {}
|
|
47
40
|
)
|
|
48
41
|
end
|
|
49
42
|
|
|
50
43
|
sig do
|
|
51
44
|
override.returns(
|
|
52
|
-
{
|
|
53
|
-
body_ids: T::Array[String],
|
|
54
|
-
type: Spotted::Me::FollowingFollowParams::Type::OrSymbol,
|
|
55
|
-
request_options: Spotted::RequestOptions
|
|
56
|
-
}
|
|
45
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
57
46
|
)
|
|
58
47
|
end
|
|
59
48
|
def to_hash
|
|
60
49
|
end
|
|
61
|
-
|
|
62
|
-
# The ID type.
|
|
63
|
-
module Type
|
|
64
|
-
extend Spotted::Internal::Type::Enum
|
|
65
|
-
|
|
66
|
-
TaggedSymbol =
|
|
67
|
-
T.type_alias do
|
|
68
|
-
T.all(Symbol, Spotted::Me::FollowingFollowParams::Type)
|
|
69
|
-
end
|
|
70
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
71
|
-
|
|
72
|
-
ARTIST =
|
|
73
|
-
T.let(
|
|
74
|
-
:artist,
|
|
75
|
-
Spotted::Me::FollowingFollowParams::Type::TaggedSymbol
|
|
76
|
-
)
|
|
77
|
-
USER =
|
|
78
|
-
T.let(:user, Spotted::Me::FollowingFollowParams::Type::TaggedSymbol)
|
|
79
|
-
|
|
80
|
-
sig do
|
|
81
|
-
override.returns(
|
|
82
|
-
T::Array[Spotted::Me::FollowingFollowParams::Type::TaggedSymbol]
|
|
83
|
-
)
|
|
84
|
-
end
|
|
85
|
-
def self.values
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
50
|
end
|
|
89
51
|
end
|
|
90
52
|
end
|
|
@@ -21,76 +21,35 @@ module Spotted
|
|
|
21
21
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
22
22
|
# the query string, any IDs listed here in the body will be ignored._
|
|
23
23
|
sig { returns(T.nilable(T::Array[String])) }
|
|
24
|
-
attr_reader :
|
|
24
|
+
attr_reader :ids
|
|
25
25
|
|
|
26
|
-
sig { params(
|
|
27
|
-
attr_writer :
|
|
28
|
-
|
|
29
|
-
# The ID type: either `artist` or `user`.
|
|
30
|
-
sig { returns(Spotted::Me::FollowingUnfollowParams::Type::OrSymbol) }
|
|
31
|
-
attr_accessor :type
|
|
26
|
+
sig { params(ids: T::Array[String]).void }
|
|
27
|
+
attr_writer :ids
|
|
32
28
|
|
|
33
29
|
sig do
|
|
34
30
|
params(
|
|
35
|
-
|
|
36
|
-
body_ids: T::Array[String],
|
|
31
|
+
ids: T::Array[String],
|
|
37
32
|
request_options: Spotted::RequestOptions::OrHash
|
|
38
33
|
).returns(T.attached_class)
|
|
39
34
|
end
|
|
40
35
|
def self.new(
|
|
41
|
-
# The ID type: either `artist` or `user`.
|
|
42
|
-
type:,
|
|
43
36
|
# A JSON array of the artist or user
|
|
44
37
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
45
38
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
46
39
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
47
40
|
# the query string, any IDs listed here in the body will be ignored._
|
|
48
|
-
|
|
41
|
+
ids: nil,
|
|
49
42
|
request_options: {}
|
|
50
43
|
)
|
|
51
44
|
end
|
|
52
45
|
|
|
53
46
|
sig do
|
|
54
47
|
override.returns(
|
|
55
|
-
{
|
|
56
|
-
body_ids: T::Array[String],
|
|
57
|
-
type: Spotted::Me::FollowingUnfollowParams::Type::OrSymbol,
|
|
58
|
-
request_options: Spotted::RequestOptions
|
|
59
|
-
}
|
|
48
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
60
49
|
)
|
|
61
50
|
end
|
|
62
51
|
def to_hash
|
|
63
52
|
end
|
|
64
|
-
|
|
65
|
-
# The ID type: either `artist` or `user`.
|
|
66
|
-
module Type
|
|
67
|
-
extend Spotted::Internal::Type::Enum
|
|
68
|
-
|
|
69
|
-
TaggedSymbol =
|
|
70
|
-
T.type_alias do
|
|
71
|
-
T.all(Symbol, Spotted::Me::FollowingUnfollowParams::Type)
|
|
72
|
-
end
|
|
73
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
74
|
-
|
|
75
|
-
ARTIST =
|
|
76
|
-
T.let(
|
|
77
|
-
:artist,
|
|
78
|
-
Spotted::Me::FollowingUnfollowParams::Type::TaggedSymbol
|
|
79
|
-
)
|
|
80
|
-
USER =
|
|
81
|
-
T.let(
|
|
82
|
-
:user,
|
|
83
|
-
Spotted::Me::FollowingUnfollowParams::Type::TaggedSymbol
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
sig do
|
|
87
|
-
override.returns(
|
|
88
|
-
T::Array[Spotted::Me::FollowingUnfollowParams::Type::TaggedSymbol]
|
|
89
|
-
)
|
|
90
|
-
end
|
|
91
|
-
def self.values
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
53
|
end
|
|
95
54
|
end
|
|
96
55
|
end
|