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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 723ec8e22c6c14d0cb4bda97e14ad0e5c6536ccafb0cdfb186ed087069524158
|
|
4
|
+
data.tar.gz: 8c66a7363419c3f3638e70c8623582e5d38383041e7a11bd9ff0c587b5753948
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55a9e547fc79b6b28c3a9d668104c4c2b0683e683f110890d3b76190954538d5ac81238703446ef0f810d53a930596dd51f3a4978173b107de77e2ce6f1d00ad
|
|
7
|
+
data.tar.gz: 90c914e72f57c59be8c66ea5fc11173a9c9fcb317f4a97c5ce184d53419dd3ffcb3827e3028eabd0d2e25b66a1be7a9d839f7863b2ee660a246b3bc5f4148ddd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2025-11-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/cjavdev/spotted/compare/v0.5.0...v0.6.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([3d95bc3](https://github.com/cjavdev/spotted/commit/3d95bc327b7762e7926e39bf6949ddc0de4b0908))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* better thread safety via early initializing SSL store during HTTP client creation ([eb7a596](https://github.com/cjavdev/spotted/commit/eb7a596117993c2466b45a9c0ce20e70ba9f994a))
|
|
15
|
+
|
|
3
16
|
## 0.5.0 (2025-11-05)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.4.0...v0.5.0](https://github.com/cjavdev/spotted/compare/v0.4.0...v0.5.0)
|
data/README.md
CHANGED
data/lib/spotted/client.rb
CHANGED
|
@@ -66,9 +66,6 @@ module Spotted
|
|
|
66
66
|
# @return [Spotted::Resources::Recommendations]
|
|
67
67
|
attr_reader :recommendations
|
|
68
68
|
|
|
69
|
-
# @return [Spotted::Resources::Webhooks]
|
|
70
|
-
attr_reader :webhooks
|
|
71
|
-
|
|
72
69
|
# @return [Spotted::Resources::Markets]
|
|
73
70
|
attr_reader :markets
|
|
74
71
|
|
|
@@ -166,7 +163,6 @@ module Spotted
|
|
|
166
163
|
@audio_features = Spotted::Resources::AudioFeatures.new(client: self)
|
|
167
164
|
@audio_analysis = Spotted::Resources::AudioAnalysis.new(client: self)
|
|
168
165
|
@recommendations = Spotted::Resources::Recommendations.new(client: self)
|
|
169
|
-
@webhooks = Spotted::Resources::Webhooks.new(client: self)
|
|
170
166
|
@markets = Spotted::Resources::Markets.new(client: self)
|
|
171
167
|
end
|
|
172
168
|
end
|
|
@@ -16,10 +16,11 @@ module Spotted
|
|
|
16
16
|
class << self
|
|
17
17
|
# @api private
|
|
18
18
|
#
|
|
19
|
+
# @param cert_store [OpenSSL::X509::Store]
|
|
19
20
|
# @param url [URI::Generic]
|
|
20
21
|
#
|
|
21
22
|
# @return [Net::HTTP]
|
|
22
|
-
def connect(url)
|
|
23
|
+
def connect(cert_store:, url:)
|
|
23
24
|
port =
|
|
24
25
|
case [url.port, url.scheme]
|
|
25
26
|
in [Integer, _]
|
|
@@ -33,6 +34,8 @@ module Spotted
|
|
|
33
34
|
Net::HTTP.new(url.host, port).tap do
|
|
34
35
|
_1.use_ssl = %w[https wss].include?(url.scheme)
|
|
35
36
|
_1.max_retries = 0
|
|
37
|
+
|
|
38
|
+
(_1.cert_store = cert_store) if _1.use_ssl?
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
|
|
@@ -102,7 +105,7 @@ module Spotted
|
|
|
102
105
|
pool =
|
|
103
106
|
@mutex.synchronize do
|
|
104
107
|
@pools[origin] ||= ConnectionPool.new(size: @size) do
|
|
105
|
-
self.class.connect(url)
|
|
108
|
+
self.class.connect(cert_store: @cert_store, url: url)
|
|
106
109
|
end
|
|
107
110
|
end
|
|
108
111
|
|
|
@@ -192,6 +195,7 @@ module Spotted
|
|
|
192
195
|
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
|
|
193
196
|
@mutex = Mutex.new
|
|
194
197
|
@size = size
|
|
198
|
+
@cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
|
195
199
|
@pools = {}
|
|
196
200
|
end
|
|
197
201
|
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
14
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# the query string, any IDs listed here in the body will be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::AlbumRemoveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
14
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# the query string, any IDs listed here in the body will be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::AlbumSaveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
|
|
14
14
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::EpisodeRemoveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
|
|
14
14
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>]
|
|
19
|
-
required :
|
|
19
|
+
required :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids:, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::EpisodeSaveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the artist or user
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
14
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
@@ -16,34 +16,15 @@ module Spotted
|
|
|
16
16
|
# the query string, any IDs listed here in the body will be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>]
|
|
19
|
-
required :
|
|
19
|
+
required :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!
|
|
22
|
-
# The ID type.
|
|
23
|
-
#
|
|
24
|
-
# @return [Symbol, Spotted::Models::Me::FollowingFollowParams::Type]
|
|
25
|
-
required :type, enum: -> { Spotted::Me::FollowingFollowParams::Type }
|
|
26
|
-
|
|
27
|
-
# @!method initialize(body_ids:, type:, request_options: {})
|
|
21
|
+
# @!method initialize(ids:, request_options: {})
|
|
28
22
|
# Some parameter documentations has been truncated, see
|
|
29
23
|
# {Spotted::Models::Me::FollowingFollowParams} for more details.
|
|
30
24
|
#
|
|
31
|
-
# @param
|
|
32
|
-
#
|
|
33
|
-
# @param type [Symbol, Spotted::Models::Me::FollowingFollowParams::Type] The ID type.
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts
|
|
34
26
|
#
|
|
35
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
-
|
|
37
|
-
# The ID type.
|
|
38
|
-
module Type
|
|
39
|
-
extend Spotted::Internal::Type::Enum
|
|
40
|
-
|
|
41
|
-
ARTIST = :artist
|
|
42
|
-
USER = :user
|
|
43
|
-
|
|
44
|
-
# @!method self.values
|
|
45
|
-
# @return [Array<Symbol>]
|
|
46
|
-
end
|
|
47
28
|
end
|
|
48
29
|
end
|
|
49
30
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the artist or user
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
14
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
@@ -16,34 +16,15 @@ module Spotted
|
|
|
16
16
|
# the query string, any IDs listed here in the body will be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!
|
|
22
|
-
# The ID type: either `artist` or `user`.
|
|
23
|
-
#
|
|
24
|
-
# @return [Symbol, Spotted::Models::Me::FollowingUnfollowParams::Type]
|
|
25
|
-
required :type, enum: -> { Spotted::Me::FollowingUnfollowParams::Type }
|
|
26
|
-
|
|
27
|
-
# @!method initialize(type:, body_ids: nil, request_options: {})
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
28
22
|
# Some parameter documentations has been truncated, see
|
|
29
23
|
# {Spotted::Models::Me::FollowingUnfollowParams} for more details.
|
|
30
24
|
#
|
|
31
|
-
# @param
|
|
32
|
-
#
|
|
33
|
-
# @param body_ids [Array<String>] A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts
|
|
34
26
|
#
|
|
35
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
-
|
|
37
|
-
# The ID type: either `artist` or `user`.
|
|
38
|
-
module Type
|
|
39
|
-
extend Spotted::Internal::Type::Enum
|
|
40
|
-
|
|
41
|
-
ARTIST = :artist
|
|
42
|
-
USER = :user
|
|
43
|
-
|
|
44
|
-
# @!method self.values
|
|
45
|
-
# @return [Array<Symbol>]
|
|
46
|
-
end
|
|
47
28
|
end
|
|
48
29
|
end
|
|
49
30
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
|
|
14
14
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
@@ -16,29 +16,13 @@ module Spotted
|
|
|
16
16
|
# be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!
|
|
22
|
-
# An
|
|
23
|
-
# [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
|
24
|
-
# If a country code is specified, only content that is available in that market
|
|
25
|
-
# will be returned.<br/> If a valid user access token is specified in the request
|
|
26
|
-
# header, the country associated with the user account will take priority over
|
|
27
|
-
# this parameter.<br/> _**Note**: If neither market or user country are provided,
|
|
28
|
-
# the content is considered unavailable for the client._<br/> Users can view the
|
|
29
|
-
# country that is associated with their account in the
|
|
30
|
-
# [account settings](https://www.spotify.com/account/overview/).
|
|
31
|
-
#
|
|
32
|
-
# @return [String, nil]
|
|
33
|
-
optional :market, String
|
|
34
|
-
|
|
35
|
-
# @!method initialize(body_ids: nil, market: nil, request_options: {})
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
36
22
|
# Some parameter documentations has been truncated, see
|
|
37
23
|
# {Spotted::Models::Me::ShowRemoveParams} for more details.
|
|
38
24
|
#
|
|
39
|
-
# @param
|
|
40
|
-
#
|
|
41
|
-
# @param market [String] An [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_al
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](https://developer.spotify.com/documentation/we
|
|
42
26
|
#
|
|
43
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
44
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
|
|
14
14
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::ShowSaveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](https://developer.spotify.com/documentation/we
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute ids
|
|
12
12
|
# A JSON array of the
|
|
13
13
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
14
14
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
@@ -16,13 +16,13 @@ module Spotted
|
|
|
16
16
|
# the query string, any IDs listed here in the body will be ignored._
|
|
17
17
|
#
|
|
18
18
|
# @return [Array<String>, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :ids, Spotted::Internal::Type::ArrayOf[String]
|
|
20
20
|
|
|
21
|
-
# @!method initialize(
|
|
21
|
+
# @!method initialize(ids: nil, request_options: {})
|
|
22
22
|
# Some parameter documentations has been truncated, see
|
|
23
23
|
# {Spotted::Models::Me::TrackRemoveParams} for more details.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -8,7 +8,7 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute position
|
|
12
12
|
# The position to insert the items, a zero-based index. For example, to insert the
|
|
13
13
|
# items in the first position: `position=0` ; to insert the items in the third
|
|
14
14
|
# position: `position=2`. If omitted, the items will be appended to the playlist.
|
|
@@ -16,9 +16,9 @@ module Spotted
|
|
|
16
16
|
# `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
|
|
17
17
|
#
|
|
18
18
|
# @return [Integer, nil]
|
|
19
|
-
optional :
|
|
19
|
+
optional :position, Integer
|
|
20
20
|
|
|
21
|
-
# @!attribute
|
|
21
|
+
# @!attribute uris
|
|
22
22
|
# A JSON array of the
|
|
23
23
|
# [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For
|
|
24
24
|
# example:
|
|
@@ -28,15 +28,15 @@ module Spotted
|
|
|
28
28
|
# be ignored._
|
|
29
29
|
#
|
|
30
30
|
# @return [Array<String>, nil]
|
|
31
|
-
optional :
|
|
31
|
+
optional :uris, Spotted::Internal::Type::ArrayOf[String]
|
|
32
32
|
|
|
33
|
-
# @!method initialize(
|
|
33
|
+
# @!method initialize(position: nil, uris: nil, request_options: {})
|
|
34
34
|
# Some parameter documentations has been truncated, see
|
|
35
35
|
# {Spotted::Models::Playlists::TrackAddParams} for more details.
|
|
36
36
|
#
|
|
37
|
-
# @param
|
|
37
|
+
# @param position [Integer] The position to insert the items, a zero-based index. For example, to insert the
|
|
38
38
|
#
|
|
39
|
-
# @param
|
|
39
|
+
# @param uris [Array<String>] A JSON array of the [Spotify URIs](/documentation/web-api/concepts/spotify-uris-
|
|
40
40
|
#
|
|
41
41
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
42
42
|
end
|
|
@@ -8,11 +8,6 @@ module Spotted
|
|
|
8
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Spotted::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute body_uris
|
|
12
|
-
#
|
|
13
|
-
# @return [Array<String>, nil]
|
|
14
|
-
optional :body_uris, Spotted::Internal::Type::ArrayOf[String], api_name: :uris
|
|
15
|
-
|
|
16
11
|
# @!attribute insert_before
|
|
17
12
|
# The position where the items should be inserted.<br/>To reorder the items to the
|
|
18
13
|
# end of the playlist, simply set _insert_before_ to the position after the last
|
|
@@ -46,12 +41,15 @@ module Spotted
|
|
|
46
41
|
# @return [String, nil]
|
|
47
42
|
optional :snapshot_id, String
|
|
48
43
|
|
|
49
|
-
# @!
|
|
44
|
+
# @!attribute uris
|
|
45
|
+
#
|
|
46
|
+
# @return [Array<String>, nil]
|
|
47
|
+
optional :uris, Spotted::Internal::Type::ArrayOf[String]
|
|
48
|
+
|
|
49
|
+
# @!method initialize(insert_before: nil, range_length: nil, range_start: nil, snapshot_id: nil, uris: nil, request_options: {})
|
|
50
50
|
# Some parameter documentations has been truncated, see
|
|
51
51
|
# {Spotted::Models::Playlists::TrackUpdateParams} for more details.
|
|
52
52
|
#
|
|
53
|
-
# @param body_uris [Array<String>]
|
|
54
|
-
#
|
|
55
53
|
# @param insert_before [Integer] The position where the items should be inserted.<br/>To reorder the items to the
|
|
56
54
|
#
|
|
57
55
|
# @param range_length [Integer] The amount of items to be reordered. Defaults to 1 if not set.<br/>The range of
|
|
@@ -60,6 +58,8 @@ module Spotted
|
|
|
60
58
|
#
|
|
61
59
|
# @param snapshot_id [String] The playlist's snapshot ID against which you want to make the changes.
|
|
62
60
|
#
|
|
61
|
+
# @param uris [Array<String>]
|
|
62
|
+
#
|
|
63
63
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
|
|
64
64
|
end
|
|
65
65
|
end
|
data/lib/spotted/models.rb
CHANGED
|
@@ -166,12 +166,7 @@ module Spotted
|
|
|
166
166
|
|
|
167
167
|
TrackRetrieveParams = Spotted::Models::TrackRetrieveParams
|
|
168
168
|
|
|
169
|
-
# @type [Spotted::Internal::Type::Converter]
|
|
170
|
-
UnwrapWebhookEvent = Spotted::Models::UnwrapWebhookEvent
|
|
171
|
-
|
|
172
169
|
UserRetrieveProfileParams = Spotted::Models::UserRetrieveProfileParams
|
|
173
170
|
|
|
174
171
|
Users = Spotted::Models::Users
|
|
175
|
-
|
|
176
|
-
WebhookUnwrapParams = Spotted::Models::WebhookUnwrapParams
|
|
177
172
|
end
|
|
@@ -66,9 +66,9 @@ module Spotted
|
|
|
66
66
|
#
|
|
67
67
|
# Remove one or more albums 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::AlbumRemoveParams
|
|
78
78
|
def remove(params = {})
|
|
79
79
|
parsed, options = Spotted::Me::AlbumRemoveParams.dump_request(params)
|
|
80
|
-
|
|
81
|
-
@client.request(
|
|
82
|
-
method: :delete,
|
|
83
|
-
path: "me/albums",
|
|
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/albums", body: parsed, model: NilClass, options: options)
|
|
89
81
|
end
|
|
90
82
|
|
|
91
83
|
# Some parameter documentations has been truncated, see
|
|
@@ -93,9 +85,9 @@ module Spotted
|
|
|
93
85
|
#
|
|
94
86
|
# Save one or more albums to the current user's 'Your Music' library.
|
|
95
87
|
#
|
|
96
|
-
# @overload save(
|
|
88
|
+
# @overload save(ids: nil, request_options: {})
|
|
97
89
|
#
|
|
98
|
-
# @param
|
|
90
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
99
91
|
#
|
|
100
92
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
101
93
|
#
|
|
@@ -104,15 +96,7 @@ module Spotted
|
|
|
104
96
|
# @see Spotted::Models::Me::AlbumSaveParams
|
|
105
97
|
def save(params = {})
|
|
106
98
|
parsed, options = Spotted::Me::AlbumSaveParams.dump_request(params)
|
|
107
|
-
|
|
108
|
-
@client.request(
|
|
109
|
-
method: :put,
|
|
110
|
-
path: "me/albums",
|
|
111
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
112
|
-
body: parsed.except(*query_params),
|
|
113
|
-
model: NilClass,
|
|
114
|
-
options: options
|
|
115
|
-
)
|
|
99
|
+
@client.request(method: :put, path: "me/albums", body: parsed, model: NilClass, options: options)
|
|
116
100
|
end
|
|
117
101
|
|
|
118
102
|
# @api private
|
|
@@ -74,9 +74,9 @@ module Spotted
|
|
|
74
74
|
# feedback that you have, or issues that you discover, in our
|
|
75
75
|
# [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
|
|
76
76
|
#
|
|
77
|
-
# @overload remove(
|
|
77
|
+
# @overload remove(ids: nil, request_options: {})
|
|
78
78
|
#
|
|
79
|
-
# @param
|
|
79
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
80
80
|
#
|
|
81
81
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
82
82
|
#
|
|
@@ -85,12 +85,10 @@ module Spotted
|
|
|
85
85
|
# @see Spotted::Models::Me::EpisodeRemoveParams
|
|
86
86
|
def remove(params = {})
|
|
87
87
|
parsed, options = Spotted::Me::EpisodeRemoveParams.dump_request(params)
|
|
88
|
-
query_params = [:query_ids]
|
|
89
88
|
@client.request(
|
|
90
89
|
method: :delete,
|
|
91
90
|
path: "me/episodes",
|
|
92
|
-
|
|
93
|
-
body: parsed.except(*query_params),
|
|
91
|
+
body: parsed,
|
|
94
92
|
model: NilClass,
|
|
95
93
|
options: options
|
|
96
94
|
)
|
|
@@ -104,9 +102,9 @@ module Spotted
|
|
|
104
102
|
# you have, or issues that you discover, in our
|
|
105
103
|
# [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
|
|
106
104
|
#
|
|
107
|
-
# @overload save(
|
|
105
|
+
# @overload save(ids:, request_options: {})
|
|
108
106
|
#
|
|
109
|
-
# @param
|
|
107
|
+
# @param ids [Array<String>] A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-i
|
|
110
108
|
#
|
|
111
109
|
# @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
112
110
|
#
|
|
@@ -115,15 +113,7 @@ module Spotted
|
|
|
115
113
|
# @see Spotted::Models::Me::EpisodeSaveParams
|
|
116
114
|
def save(params)
|
|
117
115
|
parsed, options = Spotted::Me::EpisodeSaveParams.dump_request(params)
|
|
118
|
-
|
|
119
|
-
@client.request(
|
|
120
|
-
method: :put,
|
|
121
|
-
path: "me/episodes",
|
|
122
|
-
query: parsed.slice(*query_params).transform_keys(query_ids: "ids"),
|
|
123
|
-
body: parsed.except(*query_params),
|
|
124
|
-
model: NilClass,
|
|
125
|
-
options: options
|
|
126
|
-
)
|
|
116
|
+
@client.request(method: :put, path: "me/episodes", body: parsed, model: NilClass, options: options)
|
|
127
117
|
end
|
|
128
118
|
|
|
129
119
|
# @api private
|