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
|
@@ -18,30 +18,14 @@ module Spotted
|
|
|
18
18
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
19
19
|
# 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 :
|
|
25
|
-
|
|
26
|
-
# An
|
|
27
|
-
# [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
|
28
|
-
# If a country code is specified, only content that is available in that market
|
|
29
|
-
# will be returned.<br/> If a valid user access token is specified in the request
|
|
30
|
-
# header, the country associated with the user account will take priority over
|
|
31
|
-
# this parameter.<br/> _**Note**: If neither market or user country are provided,
|
|
32
|
-
# the content is considered unavailable for the client._<br/> Users can view the
|
|
33
|
-
# country that is associated with their account in the
|
|
34
|
-
# [account settings](https://www.spotify.com/account/overview/).
|
|
35
|
-
sig { returns(T.nilable(String)) }
|
|
36
|
-
attr_reader :market
|
|
37
|
-
|
|
38
|
-
sig { params(market: String).void }
|
|
39
|
-
attr_writer :market
|
|
23
|
+
sig { params(ids: T::Array[String]).void }
|
|
24
|
+
attr_writer :ids
|
|
40
25
|
|
|
41
26
|
sig do
|
|
42
27
|
params(
|
|
43
|
-
|
|
44
|
-
market: String,
|
|
28
|
+
ids: T::Array[String],
|
|
45
29
|
request_options: Spotted::RequestOptions::OrHash
|
|
46
30
|
).returns(T.attached_class)
|
|
47
31
|
end
|
|
@@ -51,28 +35,14 @@ module Spotted
|
|
|
51
35
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
52
36
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
53
37
|
# be ignored._
|
|
54
|
-
|
|
55
|
-
# An
|
|
56
|
-
# [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
|
57
|
-
# If a country code is specified, only content that is available in that market
|
|
58
|
-
# will be returned.<br/> If a valid user access token is specified in the request
|
|
59
|
-
# header, the country associated with the user account will take priority over
|
|
60
|
-
# this parameter.<br/> _**Note**: If neither market or user country are provided,
|
|
61
|
-
# the content is considered unavailable for the client._<br/> Users can view the
|
|
62
|
-
# country that is associated with their account in the
|
|
63
|
-
# [account settings](https://www.spotify.com/account/overview/).
|
|
64
|
-
market: nil,
|
|
38
|
+
ids: nil,
|
|
65
39
|
request_options: {}
|
|
66
40
|
)
|
|
67
41
|
end
|
|
68
42
|
|
|
69
43
|
sig do
|
|
70
44
|
override.returns(
|
|
71
|
-
{
|
|
72
|
-
body_ids: T::Array[String],
|
|
73
|
-
market: String,
|
|
74
|
-
request_options: Spotted::RequestOptions
|
|
75
|
-
}
|
|
45
|
+
{ ids: T::Array[String], request_options: Spotted::RequestOptions }
|
|
76
46
|
)
|
|
77
47
|
end
|
|
78
48
|
def to_hash
|
|
@@ -18,14 +18,14 @@ module Spotted
|
|
|
18
18
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
19
19
|
# 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
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
36
36
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
37
37
|
# 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
|
|
@@ -21,10 +21,10 @@ module Spotted
|
|
|
21
21
|
# Items are added in the order they appear in the uris array. For example:
|
|
22
22
|
# `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
|
|
23
23
|
sig { returns(T.nilable(Integer)) }
|
|
24
|
-
attr_reader :
|
|
24
|
+
attr_reader :position
|
|
25
25
|
|
|
26
|
-
sig { params(
|
|
27
|
-
attr_writer :
|
|
26
|
+
sig { params(position: Integer).void }
|
|
27
|
+
attr_writer :position
|
|
28
28
|
|
|
29
29
|
# A JSON array of the
|
|
30
30
|
# [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For
|
|
@@ -34,15 +34,15 @@ module Spotted
|
|
|
34
34
|
# parameter is present in the query string, any URIs listed here in the body will
|
|
35
35
|
# be ignored._
|
|
36
36
|
sig { returns(T.nilable(T::Array[String])) }
|
|
37
|
-
attr_reader :
|
|
37
|
+
attr_reader :uris
|
|
38
38
|
|
|
39
|
-
sig { params(
|
|
40
|
-
attr_writer :
|
|
39
|
+
sig { params(uris: T::Array[String]).void }
|
|
40
|
+
attr_writer :uris
|
|
41
41
|
|
|
42
42
|
sig do
|
|
43
43
|
params(
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
position: Integer,
|
|
45
|
+
uris: T::Array[String],
|
|
46
46
|
request_options: Spotted::RequestOptions::OrHash
|
|
47
47
|
).returns(T.attached_class)
|
|
48
48
|
end
|
|
@@ -52,7 +52,7 @@ module Spotted
|
|
|
52
52
|
# position: `position=2`. If omitted, the items will be appended to the playlist.
|
|
53
53
|
# Items are added in the order they appear in the uris array. For example:
|
|
54
54
|
# `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
|
|
55
|
-
|
|
55
|
+
position: nil,
|
|
56
56
|
# A JSON array of the
|
|
57
57
|
# [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For
|
|
58
58
|
# example:
|
|
@@ -60,7 +60,7 @@ module Spotted
|
|
|
60
60
|
# maximum of 100 items can be added in one request. _**Note**: if the `uris`
|
|
61
61
|
# parameter is present in the query string, any URIs listed here in the body will
|
|
62
62
|
# be ignored._
|
|
63
|
-
|
|
63
|
+
uris: nil,
|
|
64
64
|
request_options: {}
|
|
65
65
|
)
|
|
66
66
|
end
|
|
@@ -68,8 +68,8 @@ module Spotted
|
|
|
68
68
|
sig do
|
|
69
69
|
override.returns(
|
|
70
70
|
{
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
position: Integer,
|
|
72
|
+
uris: T::Array[String],
|
|
73
73
|
request_options: Spotted::RequestOptions
|
|
74
74
|
}
|
|
75
75
|
)
|
|
@@ -15,12 +15,6 @@ module Spotted
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
19
|
-
attr_reader :body_uris
|
|
20
|
-
|
|
21
|
-
sig { params(body_uris: T::Array[String]).void }
|
|
22
|
-
attr_writer :body_uris
|
|
23
|
-
|
|
24
18
|
# The position where the items should be inserted.<br/>To reorder the items to the
|
|
25
19
|
# end of the playlist, simply set _insert_before_ to the position after the last
|
|
26
20
|
# item.<br/>Examples:<br/>To reorder the first item to the last position in a
|
|
@@ -58,18 +52,23 @@ module Spotted
|
|
|
58
52
|
sig { params(snapshot_id: String).void }
|
|
59
53
|
attr_writer :snapshot_id
|
|
60
54
|
|
|
55
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
56
|
+
attr_reader :uris
|
|
57
|
+
|
|
58
|
+
sig { params(uris: T::Array[String]).void }
|
|
59
|
+
attr_writer :uris
|
|
60
|
+
|
|
61
61
|
sig do
|
|
62
62
|
params(
|
|
63
|
-
body_uris: T::Array[String],
|
|
64
63
|
insert_before: Integer,
|
|
65
64
|
range_length: Integer,
|
|
66
65
|
range_start: Integer,
|
|
67
66
|
snapshot_id: String,
|
|
67
|
+
uris: T::Array[String],
|
|
68
68
|
request_options: Spotted::RequestOptions::OrHash
|
|
69
69
|
).returns(T.attached_class)
|
|
70
70
|
end
|
|
71
71
|
def self.new(
|
|
72
|
-
body_uris: nil,
|
|
73
72
|
# The position where the items should be inserted.<br/>To reorder the items to the
|
|
74
73
|
# end of the playlist, simply set _insert_before_ to the position after the last
|
|
75
74
|
# item.<br/>Examples:<br/>To reorder the first item to the last position in a
|
|
@@ -87,6 +86,7 @@ module Spotted
|
|
|
87
86
|
range_start: nil,
|
|
88
87
|
# The playlist's snapshot ID against which you want to make the changes.
|
|
89
88
|
snapshot_id: nil,
|
|
89
|
+
uris: nil,
|
|
90
90
|
request_options: {}
|
|
91
91
|
)
|
|
92
92
|
end
|
|
@@ -94,11 +94,11 @@ module Spotted
|
|
|
94
94
|
sig do
|
|
95
95
|
override.returns(
|
|
96
96
|
{
|
|
97
|
-
body_uris: T::Array[String],
|
|
98
97
|
insert_before: Integer,
|
|
99
98
|
range_length: Integer,
|
|
100
99
|
range_start: Integer,
|
|
101
100
|
snapshot_id: String,
|
|
101
|
+
uris: T::Array[String],
|
|
102
102
|
request_options: Spotted::RequestOptions
|
|
103
103
|
}
|
|
104
104
|
)
|
data/rbi/spotted/models.rbi
CHANGED
|
@@ -130,15 +130,7 @@ module Spotted
|
|
|
130
130
|
|
|
131
131
|
TrackRetrieveParams = Spotted::Models::TrackRetrieveParams
|
|
132
132
|
|
|
133
|
-
UnwrapWebhookEvent =
|
|
134
|
-
T.let(
|
|
135
|
-
Spotted::Models::UnwrapWebhookEvent,
|
|
136
|
-
Spotted::Internal::Type::Converter
|
|
137
|
-
)
|
|
138
|
-
|
|
139
133
|
UserRetrieveProfileParams = Spotted::Models::UserRetrieveProfileParams
|
|
140
134
|
|
|
141
135
|
Users = Spotted::Models::Users
|
|
142
|
-
|
|
143
|
-
WebhookUnwrapParams = Spotted::Models::WebhookUnwrapParams
|
|
144
136
|
end
|
|
@@ -58,17 +58,17 @@ module Spotted
|
|
|
58
58
|
# Remove one or more albums from the current user's 'Your Music' library.
|
|
59
59
|
sig do
|
|
60
60
|
params(
|
|
61
|
-
|
|
61
|
+
ids: T::Array[String],
|
|
62
62
|
request_options: Spotted::RequestOptions::OrHash
|
|
63
63
|
).void
|
|
64
64
|
end
|
|
65
65
|
def remove(
|
|
66
|
-
#
|
|
66
|
+
# A JSON array of the
|
|
67
67
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
68
68
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
69
69
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
70
70
|
# the query string, any IDs listed here in the body will be ignored._
|
|
71
|
-
|
|
71
|
+
ids: nil,
|
|
72
72
|
request_options: {}
|
|
73
73
|
)
|
|
74
74
|
end
|
|
@@ -76,17 +76,17 @@ module Spotted
|
|
|
76
76
|
# Save one or more albums to the current user's 'Your Music' library.
|
|
77
77
|
sig do
|
|
78
78
|
params(
|
|
79
|
-
|
|
79
|
+
ids: T::Array[String],
|
|
80
80
|
request_options: Spotted::RequestOptions::OrHash
|
|
81
81
|
).void
|
|
82
82
|
end
|
|
83
83
|
def save(
|
|
84
|
-
#
|
|
84
|
+
# A JSON array of the
|
|
85
85
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
86
86
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
87
87
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
88
88
|
# the query string, any IDs listed here in the body will be ignored._
|
|
89
|
-
|
|
89
|
+
ids: nil,
|
|
90
90
|
request_options: {}
|
|
91
91
|
)
|
|
92
92
|
end
|
|
@@ -66,17 +66,17 @@ module Spotted
|
|
|
66
66
|
# [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
|
|
67
67
|
sig do
|
|
68
68
|
params(
|
|
69
|
-
|
|
69
|
+
ids: T::Array[String],
|
|
70
70
|
request_options: Spotted::RequestOptions::OrHash
|
|
71
71
|
).void
|
|
72
72
|
end
|
|
73
73
|
def remove(
|
|
74
|
-
#
|
|
74
|
+
# A JSON array of the
|
|
75
75
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
|
|
76
76
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
77
77
|
# is present in the query string, any IDs listed here in the body will be
|
|
78
78
|
# ignored._
|
|
79
|
-
|
|
79
|
+
ids: nil,
|
|
80
80
|
request_options: {}
|
|
81
81
|
)
|
|
82
82
|
end
|
|
@@ -87,17 +87,17 @@ module Spotted
|
|
|
87
87
|
# [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
|
|
88
88
|
sig do
|
|
89
89
|
params(
|
|
90
|
-
|
|
90
|
+
ids: T::Array[String],
|
|
91
91
|
request_options: Spotted::RequestOptions::OrHash
|
|
92
92
|
).void
|
|
93
93
|
end
|
|
94
94
|
def save(
|
|
95
|
-
#
|
|
95
|
+
# A JSON array of the
|
|
96
96
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
|
|
97
97
|
# of 50 items can be specified in one request. _**Note**: if the `ids` parameter
|
|
98
98
|
# is present in the query string, any IDs listed here in the body will be
|
|
99
99
|
# ignored._
|
|
100
|
-
|
|
100
|
+
ids:,
|
|
101
101
|
request_options: {}
|
|
102
102
|
)
|
|
103
103
|
end
|
|
@@ -49,20 +49,17 @@ module Spotted
|
|
|
49
49
|
# users.
|
|
50
50
|
sig do
|
|
51
51
|
params(
|
|
52
|
-
|
|
53
|
-
type: Spotted::Me::FollowingFollowParams::Type::OrSymbol,
|
|
52
|
+
ids: T::Array[String],
|
|
54
53
|
request_options: Spotted::RequestOptions::OrHash
|
|
55
54
|
).void
|
|
56
55
|
end
|
|
57
56
|
def follow(
|
|
58
|
-
#
|
|
57
|
+
# A JSON array of the artist or user
|
|
59
58
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
60
59
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
61
60
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
62
61
|
# the query string, any IDs listed here in the body will be ignored._
|
|
63
|
-
|
|
64
|
-
# Query param: The ID type.
|
|
65
|
-
type:,
|
|
62
|
+
ids:,
|
|
66
63
|
request_options: {}
|
|
67
64
|
)
|
|
68
65
|
end
|
|
@@ -71,20 +68,17 @@ module Spotted
|
|
|
71
68
|
# users.
|
|
72
69
|
sig do
|
|
73
70
|
params(
|
|
74
|
-
|
|
75
|
-
body_ids: T::Array[String],
|
|
71
|
+
ids: T::Array[String],
|
|
76
72
|
request_options: Spotted::RequestOptions::OrHash
|
|
77
73
|
).void
|
|
78
74
|
end
|
|
79
75
|
def unfollow(
|
|
80
|
-
#
|
|
81
|
-
type:,
|
|
82
|
-
# Body param: A JSON array of the artist or user
|
|
76
|
+
# A JSON array of the artist or user
|
|
83
77
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
84
78
|
# `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
|
|
85
79
|
# IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
|
|
86
80
|
# the query string, any IDs listed here in the body will be ignored._
|
|
87
|
-
|
|
81
|
+
ids: nil,
|
|
88
82
|
request_options: {}
|
|
89
83
|
)
|
|
90
84
|
end
|
|
@@ -47,28 +47,17 @@ module Spotted
|
|
|
47
47
|
# Delete one or more shows from current Spotify user's library.
|
|
48
48
|
sig do
|
|
49
49
|
params(
|
|
50
|
-
|
|
51
|
-
market: String,
|
|
50
|
+
ids: T::Array[String],
|
|
52
51
|
request_options: Spotted::RequestOptions::OrHash
|
|
53
52
|
).void
|
|
54
53
|
end
|
|
55
54
|
def remove(
|
|
56
|
-
#
|
|
55
|
+
# A JSON array of the
|
|
57
56
|
# [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
|
|
58
57
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
59
58
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
60
59
|
# be ignored._
|
|
61
|
-
|
|
62
|
-
# Query param: An
|
|
63
|
-
# [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
|
64
|
-
# If a country code is specified, only content that is available in that market
|
|
65
|
-
# will be returned.<br/> If a valid user access token is specified in the request
|
|
66
|
-
# header, the country associated with the user account will take priority over
|
|
67
|
-
# this parameter.<br/> _**Note**: If neither market or user country are provided,
|
|
68
|
-
# the content is considered unavailable for the client._<br/> Users can view the
|
|
69
|
-
# country that is associated with their account in the
|
|
70
|
-
# [account settings](https://www.spotify.com/account/overview/).
|
|
71
|
-
market: nil,
|
|
60
|
+
ids: nil,
|
|
72
61
|
request_options: {}
|
|
73
62
|
)
|
|
74
63
|
end
|
|
@@ -76,17 +65,17 @@ module Spotted
|
|
|
76
65
|
# Save one or more shows to current Spotify user's library.
|
|
77
66
|
sig do
|
|
78
67
|
params(
|
|
79
|
-
|
|
68
|
+
ids: T::Array[String],
|
|
80
69
|
request_options: Spotted::RequestOptions::OrHash
|
|
81
70
|
).void
|
|
82
71
|
end
|
|
83
72
|
def save(
|
|
84
|
-
#
|
|
73
|
+
# A JSON array of the
|
|
85
74
|
# [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
|
|
86
75
|
# A maximum of 50 items can be specified in one request. _Note: if the `ids`
|
|
87
76
|
# parameter is present in the query string, any IDs listed here in the body will
|
|
88
77
|
# be ignored._
|
|
89
|
-
|
|
78
|
+
ids: nil,
|
|
90
79
|
request_options: {}
|
|
91
80
|
)
|
|
92
81
|
end
|
|
@@ -58,17 +58,17 @@ module Spotted
|
|
|
58
58
|
# Remove one or more tracks from the current user's 'Your Music' library.
|
|
59
59
|
sig do
|
|
60
60
|
params(
|
|
61
|
-
|
|
61
|
+
ids: T::Array[String],
|
|
62
62
|
request_options: Spotted::RequestOptions::OrHash
|
|
63
63
|
).void
|
|
64
64
|
end
|
|
65
65
|
def remove(
|
|
66
|
-
#
|
|
66
|
+
# A JSON array of the
|
|
67
67
|
# [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
|
|
68
68
|
# `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
|
|
69
69
|
# can be specified in one request. _**Note**: if the `ids` parameter is present in
|
|
70
70
|
# the query string, any IDs listed here in the body will be ignored._
|
|
71
|
-
|
|
71
|
+
ids: nil,
|
|
72
72
|
request_options: {}
|
|
73
73
|
)
|
|
74
74
|
end
|
|
@@ -16,38 +16,36 @@ module Spotted
|
|
|
16
16
|
sig do
|
|
17
17
|
params(
|
|
18
18
|
playlist_id: String,
|
|
19
|
-
body_uris: T::Array[String],
|
|
20
19
|
insert_before: Integer,
|
|
21
20
|
range_length: Integer,
|
|
22
21
|
range_start: Integer,
|
|
23
22
|
snapshot_id: String,
|
|
23
|
+
uris: T::Array[String],
|
|
24
24
|
request_options: Spotted::RequestOptions::OrHash
|
|
25
25
|
).returns(Spotted::Models::Playlists::TrackUpdateResponse)
|
|
26
26
|
end
|
|
27
27
|
def update(
|
|
28
|
-
#
|
|
29
|
-
#
|
|
28
|
+
# The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the
|
|
29
|
+
# playlist.
|
|
30
30
|
playlist_id,
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# _insert_before_ to 10.<br/>To reorder the last item in a playlist with 10 items
|
|
38
|
-
# to the start of the playlist, set _range_start_ to 9, and _insert_before_ to 0.
|
|
31
|
+
# The position where the items should be inserted.<br/>To reorder the items to the
|
|
32
|
+
# end of the playlist, simply set _insert_before_ to the position after the last
|
|
33
|
+
# item.<br/>Examples:<br/>To reorder the first item to the last position in a
|
|
34
|
+
# playlist with 10 items, set _range_start_ to 0, and _insert_before_
|
|
35
|
+
# to 10.<br/>To reorder the last item in a playlist with 10 items to the start of
|
|
36
|
+
# the playlist, set _range_start_ to 9, and _insert_before_ to 0.
|
|
39
37
|
insert_before: nil,
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
38
|
+
# The amount of items to be reordered. Defaults to 1 if not set.<br/>The range of
|
|
39
|
+
# items to be reordered begins from the _range_start_ position, and includes the
|
|
40
|
+
# _range_length_ subsequent items.<br/>Example:<br/>To move the items at index
|
|
41
|
+
# 9-10 to the start of the playlist, _range_start_ is set to 9, and _range_length_
|
|
42
|
+
# is set to 2.
|
|
45
43
|
range_length: nil,
|
|
46
|
-
#
|
|
44
|
+
# The position of the first item to be reordered.
|
|
47
45
|
range_start: nil,
|
|
48
|
-
#
|
|
49
|
-
# changes.
|
|
46
|
+
# The playlist's snapshot ID against which you want to make the changes.
|
|
50
47
|
snapshot_id: nil,
|
|
48
|
+
uris: nil,
|
|
51
49
|
request_options: {}
|
|
52
50
|
)
|
|
53
51
|
end
|
|
@@ -111,30 +109,29 @@ module Spotted
|
|
|
111
109
|
sig do
|
|
112
110
|
params(
|
|
113
111
|
playlist_id: String,
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
position: Integer,
|
|
113
|
+
uris: T::Array[String],
|
|
116
114
|
request_options: Spotted::RequestOptions::OrHash
|
|
117
115
|
).returns(Spotted::Models::Playlists::TrackAddResponse)
|
|
118
116
|
end
|
|
119
117
|
def add(
|
|
120
|
-
#
|
|
121
|
-
#
|
|
118
|
+
# The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the
|
|
119
|
+
# playlist.
|
|
122
120
|
playlist_id,
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
# example:
|
|
121
|
+
# The position to insert the items, a zero-based index. For example, to insert the
|
|
122
|
+
# items in the first position: `position=0` ; to insert the items in the third
|
|
123
|
+
# position: `position=2`. If omitted, the items will be appended to the playlist.
|
|
124
|
+
# Items are added in the order they appear in the uris array. For example:
|
|
128
125
|
# `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
|
|
129
|
-
|
|
130
|
-
#
|
|
126
|
+
position: nil,
|
|
127
|
+
# A JSON array of the
|
|
131
128
|
# [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For
|
|
132
129
|
# example:
|
|
133
130
|
# `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M", "spotify:episode:512ojhOuo1ktJprKbVcKyQ"]}`<br/>A
|
|
134
131
|
# maximum of 100 items can be added in one request. _**Note**: if the `uris`
|
|
135
132
|
# parameter is present in the query string, any URIs listed here in the body will
|
|
136
133
|
# be ignored._
|
|
137
|
-
|
|
134
|
+
uris: nil,
|
|
138
135
|
request_options: {}
|
|
139
136
|
)
|
|
140
137
|
end
|
data/sig/spotted/client.rbs
CHANGED
|
@@ -17,7 +17,10 @@ module Spotted
|
|
|
17
17
|
|
|
18
18
|
DEFAULT_MAX_CONNECTIONS: Integer
|
|
19
19
|
|
|
20
|
-
def self.connect: (
|
|
20
|
+
def self.connect: (
|
|
21
|
+
cert_store: OpenSSL::X509::Store,
|
|
22
|
+
url: URI::Generic
|
|
23
|
+
) -> top
|
|
21
24
|
|
|
22
25
|
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
|
23
26
|
|
|
@@ -2,24 +2,23 @@ module Spotted
|
|
|
2
2
|
module Models
|
|
3
3
|
module Me
|
|
4
4
|
type album_remove_params =
|
|
5
|
-
{
|
|
6
|
-
& Spotted::Internal::Type::request_parameters
|
|
5
|
+
{ ids: ::Array[String] } & Spotted::Internal::Type::request_parameters
|
|
7
6
|
|
|
8
7
|
class AlbumRemoveParams < Spotted::Internal::Type::BaseModel
|
|
9
8
|
extend Spotted::Internal::Type::RequestParameters::Converter
|
|
10
9
|
include Spotted::Internal::Type::RequestParameters
|
|
11
10
|
|
|
12
|
-
attr_reader
|
|
11
|
+
attr_reader ids: ::Array[String]?
|
|
13
12
|
|
|
14
|
-
def
|
|
13
|
+
def ids=: (::Array[String]) -> ::Array[String]
|
|
15
14
|
|
|
16
15
|
def initialize: (
|
|
17
|
-
?
|
|
16
|
+
?ids: ::Array[String],
|
|
18
17
|
?request_options: Spotted::request_opts
|
|
19
18
|
) -> void
|
|
20
19
|
|
|
21
20
|
def to_hash: -> {
|
|
22
|
-
|
|
21
|
+
ids: ::Array[String],
|
|
23
22
|
request_options: Spotted::RequestOptions
|
|
24
23
|
}
|
|
25
24
|
end
|