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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/spotted/client.rb +0 -4
  5. data/lib/spotted/internal/transport/pooled_net_requester.rb +6 -2
  6. data/lib/spotted/models/me/album_remove_params.rb +4 -4
  7. data/lib/spotted/models/me/album_save_params.rb +4 -4
  8. data/lib/spotted/models/me/episode_remove_params.rb +4 -4
  9. data/lib/spotted/models/me/episode_save_params.rb +4 -4
  10. data/lib/spotted/models/me/following_follow_params.rb +4 -23
  11. data/lib/spotted/models/me/following_unfollow_params.rb +4 -23
  12. data/lib/spotted/models/me/show_remove_params.rb +4 -20
  13. data/lib/spotted/models/me/show_save_params.rb +4 -4
  14. data/lib/spotted/models/me/track_remove_params.rb +4 -4
  15. data/lib/spotted/models/playlists/track_add_params.rb +7 -7
  16. data/lib/spotted/models/playlists/track_update_params.rb +8 -8
  17. data/lib/spotted/models.rb +0 -5
  18. data/lib/spotted/resources/me/albums.rb +6 -22
  19. data/lib/spotted/resources/me/episodes.rb +6 -16
  20. data/lib/spotted/resources/me/following.rb +7 -21
  21. data/lib/spotted/resources/me/shows.rb +6 -24
  22. data/lib/spotted/resources/me/tracks.rb +3 -11
  23. data/lib/spotted/resources/playlists/tracks.rb +13 -17
  24. data/lib/spotted/version.rb +1 -1
  25. data/lib/spotted.rb +1 -3
  26. data/manifest.yaml +1 -0
  27. data/rbi/spotted/client.rbi +0 -3
  28. data/rbi/spotted/internal/transport/pooled_net_requester.rbi +6 -2
  29. data/rbi/spotted/models/me/album_remove_params.rbi +6 -9
  30. data/rbi/spotted/models/me/album_save_params.rbi +6 -9
  31. data/rbi/spotted/models/me/episode_remove_params.rbi +6 -9
  32. data/rbi/spotted/models/me/episode_save_params.rbi +4 -7
  33. data/rbi/spotted/models/me/following_follow_params.rbi +4 -42
  34. data/rbi/spotted/models/me/following_unfollow_params.rbi +6 -47
  35. data/rbi/spotted/models/me/show_remove_params.rbi +6 -36
  36. data/rbi/spotted/models/me/show_save_params.rbi +6 -9
  37. data/rbi/spotted/models/me/track_remove_params.rbi +6 -9
  38. data/rbi/spotted/models/playlists/track_add_params.rbi +12 -12
  39. data/rbi/spotted/models/playlists/track_update_params.rbi +9 -9
  40. data/rbi/spotted/models.rbi +0 -8
  41. data/rbi/spotted/resources/me/albums.rbi +6 -6
  42. data/rbi/spotted/resources/me/episodes.rbi +6 -6
  43. data/rbi/spotted/resources/me/following.rbi +6 -12
  44. data/rbi/spotted/resources/me/shows.rbi +6 -17
  45. data/rbi/spotted/resources/me/tracks.rbi +3 -3
  46. data/rbi/spotted/resources/playlists/tracks.rbi +28 -31
  47. data/sig/spotted/client.rbs +0 -2
  48. data/sig/spotted/internal/transport/pooled_net_requester.rbs +4 -1
  49. data/sig/spotted/models/me/album_remove_params.rbs +5 -6
  50. data/sig/spotted/models/me/album_save_params.rbs +5 -6
  51. data/sig/spotted/models/me/episode_remove_params.rbs +5 -6
  52. data/sig/spotted/models/me/episode_save_params.rbs +4 -5
  53. data/sig/spotted/models/me/following_follow_params.rbs +4 -23
  54. data/sig/spotted/models/me/following_unfollow_params.rbs +5 -24
  55. data/sig/spotted/models/me/show_remove_params.rbs +5 -12
  56. data/sig/spotted/models/me/show_save_params.rbs +5 -6
  57. data/sig/spotted/models/me/track_remove_params.rbs +5 -6
  58. data/sig/spotted/models/playlists/track_add_params.rbs +9 -9
  59. data/sig/spotted/models/playlists/track_update_params.rbs +8 -8
  60. data/sig/spotted/models.rbs +0 -4
  61. data/sig/spotted/resources/me/albums.rbs +2 -2
  62. data/sig/spotted/resources/me/episodes.rbs +2 -2
  63. data/sig/spotted/resources/me/following.rbs +2 -4
  64. data/sig/spotted/resources/me/shows.rbs +2 -3
  65. data/sig/spotted/resources/me/tracks.rbs +1 -1
  66. data/sig/spotted/resources/playlists/tracks.rbs +3 -3
  67. metadata +2 -11
  68. data/lib/spotted/models/unwrap_webhook_event.rb +0 -8
  69. data/lib/spotted/models/webhook_unwrap_params.rb +0 -14
  70. data/lib/spotted/resources/webhooks.rb +0 -22
  71. data/rbi/spotted/models/unwrap_webhook_event.rbi +0 -7
  72. data/rbi/spotted/models/webhook_unwrap_params.rbi +0 -27
  73. data/rbi/spotted/resources/webhooks.rbi +0 -19
  74. data/sig/spotted/models/unwrap_webhook_event.rbs +0 -5
  75. data/sig/spotted/models/webhook_unwrap_params.rbs +0 -15
  76. 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(body_ids:, type:, request_options: {})
70
+ # @overload follow(ids:, request_options: {})
71
71
  #
72
- # @param body_ids [Array<String>] Body param: A JSON array of the artist or user [Spotify IDs](/documentation/web-
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
- query_params = [:query_ids, :type]
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(type:, body_ids: nil, request_options: {})
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 body_ids [Array<String>] Body param: A JSON array of the artist or user [Spotify IDs](/documentation/web-
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
- query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
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(body_ids: nil, market: nil, request_options: {})
67
+ # @overload remove(ids: nil, request_options: {})
68
68
  #
69
- # @param body_ids [Array<String>] Body param: A JSON array of the [Spotify IDs](https://developer.spotify.com/docu
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
- query_params = [:query_ids, :market]
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(body_ids: nil, request_options: {})
86
+ # @overload save(ids: nil, request_options: {})
97
87
  #
98
- # @param body_ids [Array<String>] Body param: A JSON array of the [Spotify IDs](https://developer.spotify.com/docu
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
- query_params = [:query_ids]
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(body_ids: nil, request_options: {})
69
+ # @overload remove(ids: nil, request_options: {})
70
70
  #
71
- # @param body_ids [Array<String>] Body param: A JSON array of the [Spotify IDs](/documentation/web-api/concepts/sp
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
- query_params = [:query_ids]
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, body_uris: nil, insert_before: nil, range_length: nil, range_start: nil, snapshot_id: nil, request_options: {})
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] Path param: The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) o
22
+ # @param playlist_id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli
23
23
  #
24
- # @param body_uris [Array<String>] Body 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 insert_before [Integer] Body param: The position where the items should be inserted.<br/>To reorder the
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 range_length [Integer] Body param: The amount of items to be reordered. Defaults to 1 if not set.<br/>T
28
+ # @param range_start [Integer] The position of the first item to be reordered.
29
29
  #
30
- # @param range_start [Integer] Body param: The position of the first item to be reordered.
30
+ # @param snapshot_id [String] The playlist's snapshot ID against which you want to make the changes.
31
31
  #
32
- # @param snapshot_id [String] Body param: The playlist's snapshot ID against which you want to make the change
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
- query: parsed.slice(*query_params).transform_keys(query_uris: "uris"),
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, body_position: nil, body_uris: nil, request_options: {})
91
+ # @overload add(playlist_id, position: nil, uris: nil, request_options: {})
94
92
  #
95
- # @param playlist_id [String] Path param: The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) o
93
+ # @param playlist_id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli
96
94
  #
97
- # @param body_position [Integer] Body param: The position to insert the items, a zero-based index. For example, t
95
+ # @param position [Integer] The position to insert the items, a zero-based index. For example, to insert the
98
96
  #
99
- # @param body_uris [Array<String>] Body param: A JSON array of the [Spotify URIs](/documentation/web-api/concepts/s
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
- query: parsed.slice(*query_params).transform_keys(query_position: "position", query_uris: "uris"),
113
- body: parsed.except(*query_params),
109
+ body: parsed,
114
110
  model: Spotted::Models::Playlists::TrackAddResponse,
115
111
  options: options
116
112
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotted
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
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
@@ -6,6 +6,7 @@ dependencies:
6
6
  - etc
7
7
  - json
8
8
  - net/http
9
+ - openssl
9
10
  - pathname
10
11
  - rbconfig
11
12
  - securerandom
@@ -61,9 +61,6 @@ module Spotted
61
61
  sig { returns(Spotted::Resources::Recommendations) }
62
62
  attr_reader :recommendations
63
63
 
64
- sig { returns(Spotted::Resources::Webhooks) }
65
- attr_reader :webhooks
66
-
67
64
  sig { returns(Spotted::Resources::Markets) }
68
65
  attr_reader :markets
69
66
 
@@ -26,8 +26,12 @@ module Spotted
26
26
 
27
27
  class << self
28
28
  # @api private
29
- sig { params(url: URI::Generic).returns(Net::HTTP) }
30
- def connect(url)
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 :body_ids
21
+ attr_reader :ids
22
22
 
23
- sig { params(body_ids: T::Array[String]).void }
24
- attr_writer :body_ids
23
+ sig { params(ids: T::Array[String]).void }
24
+ attr_writer :ids
25
25
 
26
26
  sig do
27
27
  params(
28
- body_ids: T::Array[String],
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
- body_ids: nil,
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 :body_ids
21
+ attr_reader :ids
22
22
 
23
- sig { params(body_ids: T::Array[String]).void }
24
- attr_writer :body_ids
23
+ sig { params(ids: T::Array[String]).void }
24
+ attr_writer :ids
25
25
 
26
26
  sig do
27
27
  params(
28
- body_ids: T::Array[String],
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
- body_ids: nil,
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 :body_ids
21
+ attr_reader :ids
22
22
 
23
- sig { params(body_ids: T::Array[String]).void }
24
- attr_writer :body_ids
23
+ sig { params(ids: T::Array[String]).void }
24
+ attr_writer :ids
25
25
 
26
26
  sig do
27
27
  params(
28
- body_ids: T::Array[String],
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
- body_ids: nil,
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 :body_ids
21
+ attr_accessor :ids
22
22
 
23
23
  sig do
24
24
  params(
25
- body_ids: T::Array[String],
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
- body_ids:,
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 :body_ids
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
- body_ids: T::Array[String],
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
- body_ids:,
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 :body_ids
24
+ attr_reader :ids
25
25
 
26
- sig { params(body_ids: T::Array[String]).void }
27
- attr_writer :body_ids
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
- type: Spotted::Me::FollowingUnfollowParams::Type::OrSymbol,
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
- body_ids: nil,
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