spotted 0.13.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15d9cc86c685d2cf5d62843b853329ddf7db14d2519092c14cb1ac0915b173fc
4
- data.tar.gz: c489d89f46b1fd3425d7e0e5e96b1af3ce1e215a15ea4e4d661644d120f37abd
3
+ metadata.gz: f7005dad5f471d604237848a7ce98546357491fdaad3424e774236db10f51b05
4
+ data.tar.gz: 2c3c90d12d62c2813e8dbc6821a150715e84246ee568b6efa67c3d272da02015
5
5
  SHA512:
6
- metadata.gz: 58ed4e51208a546c19f9a684e485a58245982a08e58c09d864d573ac701ecce2614e81a12a3e38e30bd09cf63138975219e42c3f0a2fc0531b7ac4fcde4684ba
7
- data.tar.gz: 69b48d868e6f7f794f602f5126e4170e0129a3e90e416269f75cc88509130e55e35cbf674f16eba652e461c80f660ddd4039e5bb34db18f2bb35594811197481
6
+ metadata.gz: 34a0683ab235b101abcf8b6f0f876048ee6c219b1bb087cc688fa65817c7994c97f4b124c033c192115fb81524cfada2dd10f4de635e2ad77d68871b8bcdf4d7
7
+ data.tar.gz: eb391607a59e015319712a8cf4a3e18ee70f848925879f737f2483673b8e71d62c352db9632edbc213f227f2cb8e9587124657d4164529207ed5351b596f294d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2025-11-20)
4
+
5
+ Full Changelog: [v0.13.0...v0.14.0](https://github.com/cjavdev/spotted/compare/v0.13.0...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([e2a086d](https://github.com/cjavdev/spotted/commit/e2a086d135a753fbd652720f881f737aca9aefb3))
10
+
3
11
  ## 0.13.0 (2025-11-20)
4
12
 
5
13
  Full Changelog: [v0.12.0...v0.13.0](https://github.com/cjavdev/spotted/compare/v0.12.0...v0.13.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "spotted", "~> 0.13.0"
20
+ gem "spotted", "~> 0.14.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotted
4
+ module Models
5
+ module Playlists
6
+ # @see Spotted::Resources::Playlists::Images#update
7
+ class ImageUpdateParams < Spotted::Internal::Type::BaseModel
8
+ extend Spotted::Internal::Type::RequestParameters::Converter
9
+ include Spotted::Internal::Type::RequestParameters
10
+
11
+ # @!attribute body
12
+ # Base64 encoded JPEG image data, maximum payload size is 256 KB.
13
+ #
14
+ # @return [Pathname, StringIO, IO, String, Spotted::FilePart]
15
+ required :body, Spotted::Internal::Type::FileInput
16
+
17
+ # @!method initialize(body:, request_options: {})
18
+ # @param body [Pathname, StringIO, IO, String, Spotted::FilePart] Base64 encoded JPEG image data, maximum payload size is 256 KB.
19
+ #
20
+ # @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}]
21
+ end
22
+ end
23
+ end
24
+ end
@@ -4,6 +4,34 @@ module Spotted
4
4
  module Resources
5
5
  class Playlists
6
6
  class Images
7
+ # Some parameter documentations has been truncated, see
8
+ # {Spotted::Models::Playlists::ImageUpdateParams} for more details.
9
+ #
10
+ # Replace the image used to represent a specific playlist.
11
+ #
12
+ # @overload update(playlist_id, body:, request_options: {})
13
+ #
14
+ # @param playlist_id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli
15
+ #
16
+ # @param body [Pathname, StringIO, IO, String, Spotted::FilePart] Base64 encoded JPEG image data, maximum payload size is 256 KB.
17
+ #
18
+ # @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
19
+ #
20
+ # @return [StringIO]
21
+ #
22
+ # @see Spotted::Models::Playlists::ImageUpdateParams
23
+ def update(playlist_id, params)
24
+ parsed, options = Spotted::Playlists::ImageUpdateParams.dump_request(params)
25
+ @client.request(
26
+ method: :put,
27
+ path: ["playlists/%1$s/images", playlist_id],
28
+ headers: {"content-type" => "image/jpeg", "accept" => "application/binary"},
29
+ body: parsed[:body],
30
+ model: StringIO,
31
+ options: options
32
+ )
33
+ end
34
+
7
35
  # Some parameter documentations has been truncated, see
8
36
  # {Spotted::Models::Playlists::ImageListParams} for more details.
9
37
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotted
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.0"
5
5
  end
data/lib/spotted.rb CHANGED
@@ -187,6 +187,7 @@ require_relative "spotted/models/playlists/follower_follow_params"
187
187
  require_relative "spotted/models/playlists/follower_unfollow_params"
188
188
  require_relative "spotted/models/playlists/image_list_params"
189
189
  require_relative "spotted/models/playlists/image_list_response"
190
+ require_relative "spotted/models/playlists/image_update_params"
190
191
  require_relative "spotted/models/playlists/track_add_params"
191
192
  require_relative "spotted/models/playlists/track_add_response"
192
193
  require_relative "spotted/models/playlists/track_list_params"
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Spotted
4
+ module Models
5
+ module Playlists
6
+ class ImageUpdateParams < Spotted::Internal::Type::BaseModel
7
+ extend Spotted::Internal::Type::RequestParameters::Converter
8
+ include Spotted::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Spotted::Playlists::ImageUpdateParams,
14
+ Spotted::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Base64 encoded JPEG image data, maximum payload size is 256 KB.
19
+ sig { returns(Spotted::Internal::FileInput) }
20
+ attr_accessor :body
21
+
22
+ sig do
23
+ params(
24
+ body: Spotted::Internal::FileInput,
25
+ request_options: Spotted::RequestOptions::OrHash
26
+ ).returns(T.attached_class)
27
+ end
28
+ def self.new(
29
+ # Base64 encoded JPEG image data, maximum payload size is 256 KB.
30
+ body:,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ sig do
36
+ override.returns(
37
+ {
38
+ body: Spotted::Internal::FileInput,
39
+ request_options: Spotted::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -4,6 +4,24 @@ module Spotted
4
4
  module Resources
5
5
  class Playlists
6
6
  class Images
7
+ # Replace the image used to represent a specific playlist.
8
+ sig do
9
+ params(
10
+ playlist_id: String,
11
+ body: Spotted::Internal::FileInput,
12
+ request_options: Spotted::RequestOptions::OrHash
13
+ ).returns(StringIO)
14
+ end
15
+ def update(
16
+ # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the
17
+ # playlist.
18
+ playlist_id,
19
+ # Base64 encoded JPEG image data, maximum payload size is 256 KB.
20
+ body:,
21
+ request_options: {}
22
+ )
23
+ end
24
+
7
25
  # Get the current image associated with a specific playlist.
8
26
  sig do
9
27
  params(
@@ -0,0 +1,26 @@
1
+ module Spotted
2
+ module Models
3
+ module Playlists
4
+ type image_update_params =
5
+ { body: Spotted::Internal::file_input }
6
+ & Spotted::Internal::Type::request_parameters
7
+
8
+ class ImageUpdateParams < Spotted::Internal::Type::BaseModel
9
+ extend Spotted::Internal::Type::RequestParameters::Converter
10
+ include Spotted::Internal::Type::RequestParameters
11
+
12
+ attr_accessor body: Spotted::Internal::file_input
13
+
14
+ def initialize: (
15
+ body: Spotted::Internal::file_input,
16
+ ?request_options: Spotted::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ body: Spotted::Internal::file_input,
21
+ request_options: Spotted::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -2,6 +2,12 @@ module Spotted
2
2
  module Resources
3
3
  class Playlists
4
4
  class Images
5
+ def update: (
6
+ String playlist_id,
7
+ body: Spotted::Internal::file_input,
8
+ ?request_options: Spotted::request_opts
9
+ ) -> StringIO
10
+
5
11
  def list: (
6
12
  String playlist_id,
7
13
  ?request_options: Spotted::request_opts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spotted
@@ -191,6 +191,7 @@ files:
191
191
  - lib/spotted/models/playlists/follower_unfollow_params.rb
192
192
  - lib/spotted/models/playlists/image_list_params.rb
193
193
  - lib/spotted/models/playlists/image_list_response.rb
194
+ - lib/spotted/models/playlists/image_update_params.rb
194
195
  - lib/spotted/models/playlists/track_add_params.rb
195
196
  - lib/spotted/models/playlists/track_add_response.rb
196
197
  - lib/spotted/models/playlists/track_list_params.rb
@@ -416,6 +417,7 @@ files:
416
417
  - rbi/spotted/models/playlists/follower_unfollow_params.rbi
417
418
  - rbi/spotted/models/playlists/image_list_params.rbi
418
419
  - rbi/spotted/models/playlists/image_list_response.rbi
420
+ - rbi/spotted/models/playlists/image_update_params.rbi
419
421
  - rbi/spotted/models/playlists/track_add_params.rbi
420
422
  - rbi/spotted/models/playlists/track_add_response.rbi
421
423
  - rbi/spotted/models/playlists/track_list_params.rbi
@@ -640,6 +642,7 @@ files:
640
642
  - sig/spotted/models/playlists/follower_unfollow_params.rbs
641
643
  - sig/spotted/models/playlists/image_list_params.rbs
642
644
  - sig/spotted/models/playlists/image_list_response.rbs
645
+ - sig/spotted/models/playlists/image_update_params.rbs
643
646
  - sig/spotted/models/playlists/track_add_params.rbs
644
647
  - sig/spotted/models/playlists/track_add_response.rbs
645
648
  - sig/spotted/models/playlists/track_list_params.rbs