spotted 0.7.0 → 0.8.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: 10cfaba8957c1e8930eb381fd327e70c41da0d114d5f73e0a5fe0b168ef7b244
4
- data.tar.gz: fac104842ea48c1073368c9ea445b991d72ccffb290d79515ae1fee4445624a1
3
+ metadata.gz: 69011802cc24ebf07c3e3d147833884b4ed56bb7237c0fd6da89c0206ffd58c3
4
+ data.tar.gz: 17fb6b912a0ec3914a5ff7f1921a0411eaf5b04d325c45e78f709bf6b1e59d71
5
5
  SHA512:
6
- metadata.gz: 92b9f43db633729708a2d6203177b349cf691f59c40f056dae2f8e2e50e84d27d92006c4cf7173e1db1b6779df1776ffd655485063037372fe7f9a68bca67b99
7
- data.tar.gz: d125086d85ab467eb38ca68f4ba612e3be5a5756b1b8a83c9b6569b022c32fdca8d84295fdf686ecb183d75cbfa42937d2e72eb9273719c85d073b3c52ee8bd3
6
+ metadata.gz: 546c738d922c2d58202bad6bc2b87f1f0a98ed6bf6b3304dda7bbd824e096fcf50a00ac0261b9eb7b3854c9a62b8eb80f81ba5f31d6a92d52e7afad0e155c35d
7
+ data.tar.gz: b73b1d99987f83e64182ffbb4a45e5ee9e8abab95ae7973cdeb186ca32850d4e2dc946a9100d99602f784bc6d196aaae9453773c805b744fda85444a7ef9c4f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (2025-11-10)
4
+
5
+ Full Changelog: [v0.7.0...v0.8.0](https://github.com/cjavdev/spotted/compare/v0.7.0...v0.8.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([690bf2a](https://github.com/cjavdev/spotted/commit/690bf2a31ea2eeec80a5aa1c486be05c6accdbdb))
10
+
3
11
  ## 0.7.0 (2025-11-10)
4
12
 
5
13
  Full Changelog: [v0.6.0...v0.7.0](https://github.com/cjavdev/spotted/compare/v0.6.0...v0.7.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.7.0"
20
+ gem "spotted", "~> 0.8.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Spotted
4
4
  module Models
5
- # @see Spotted::Resources::Search#retrieve
6
- class SearchRetrieveParams < Spotted::Internal::Type::BaseModel
5
+ # @see Spotted::Resources::Search#search
6
+ class SearchSearchParams < Spotted::Internal::Type::BaseModel
7
7
  extend Spotted::Internal::Type::RequestParameters::Converter
8
8
  include Spotted::Internal::Type::RequestParameters
9
9
 
@@ -31,8 +31,8 @@ module Spotted
31
31
  # hits from all the specified item types. For example: `q=abacab&type=album,track`
32
32
  # returns both albums and tracks matching "abacab".
33
33
  #
34
- # @return [Array<Symbol, Spotted::Models::SearchRetrieveParams::Type>]
35
- required :type, -> { Spotted::Internal::Type::ArrayOf[enum: Spotted::SearchRetrieveParams::Type] }
34
+ # @return [Array<Symbol, Spotted::Models::SearchSearchParams::Type>]
35
+ required :type, -> { Spotted::Internal::Type::ArrayOf[enum: Spotted::SearchSearchParams::Type] }
36
36
 
37
37
  # @!attribute include_external
38
38
  # If `include_external=audio` is specified it signals that the client can play
@@ -40,8 +40,8 @@ module Spotted
40
40
  # response. By default externally hosted audio content is marked as unplayable in
41
41
  # the response.
42
42
  #
43
- # @return [Symbol, Spotted::Models::SearchRetrieveParams::IncludeExternal, nil]
44
- optional :include_external, enum: -> { Spotted::SearchRetrieveParams::IncludeExternal }
43
+ # @return [Symbol, Spotted::Models::SearchSearchParams::IncludeExternal, nil]
44
+ optional :include_external, enum: -> { Spotted::SearchSearchParams::IncludeExternal }
45
45
 
46
46
  # @!attribute limit
47
47
  # The maximum number of results to return in each item type.
@@ -72,13 +72,13 @@ module Spotted
72
72
 
73
73
  # @!method initialize(q:, type:, include_external: nil, limit: nil, market: nil, offset: nil, request_options: {})
74
74
  # Some parameter documentations has been truncated, see
75
- # {Spotted::Models::SearchRetrieveParams} for more details.
75
+ # {Spotted::Models::SearchSearchParams} for more details.
76
76
  #
77
77
  # @param q [String] Your search query.
78
78
  #
79
- # @param type [Array<Symbol, Spotted::Models::SearchRetrieveParams::Type>] A comma-separated list of item types to search across. Search results include hi
79
+ # @param type [Array<Symbol, Spotted::Models::SearchSearchParams::Type>] A comma-separated list of item types to search across. Search results include hi
80
80
  #
81
- # @param include_external [Symbol, Spotted::Models::SearchRetrieveParams::IncludeExternal] If `include_external=audio` is specified it signals that the client can play ext
81
+ # @param include_external [Symbol, Spotted::Models::SearchSearchParams::IncludeExternal] If `include_external=audio` is specified it signals that the client can play ext
82
82
  #
83
83
  # @param limit [Integer] The maximum number of results to return in each item type.
84
84
  #
@@ -2,27 +2,27 @@
2
2
 
3
3
  module Spotted
4
4
  module Models
5
- # @see Spotted::Resources::Search#retrieve
6
- class SearchRetrieveResponse < Spotted::Internal::Type::BaseModel
5
+ # @see Spotted::Resources::Search#search
6
+ class SearchSearchResponse < Spotted::Internal::Type::BaseModel
7
7
  # @!attribute albums
8
8
  #
9
- # @return [Spotted::Models::SearchRetrieveResponse::Albums, nil]
10
- optional :albums, -> { Spotted::Models::SearchRetrieveResponse::Albums }
9
+ # @return [Spotted::Models::SearchSearchResponse::Albums, nil]
10
+ optional :albums, -> { Spotted::Models::SearchSearchResponse::Albums }
11
11
 
12
12
  # @!attribute artists
13
13
  #
14
- # @return [Spotted::Models::SearchRetrieveResponse::Artists, nil]
15
- optional :artists, -> { Spotted::Models::SearchRetrieveResponse::Artists }
14
+ # @return [Spotted::Models::SearchSearchResponse::Artists, nil]
15
+ optional :artists, -> { Spotted::Models::SearchSearchResponse::Artists }
16
16
 
17
17
  # @!attribute audiobooks
18
18
  #
19
- # @return [Spotted::Models::SearchRetrieveResponse::Audiobooks, nil]
20
- optional :audiobooks, -> { Spotted::Models::SearchRetrieveResponse::Audiobooks }
19
+ # @return [Spotted::Models::SearchSearchResponse::Audiobooks, nil]
20
+ optional :audiobooks, -> { Spotted::Models::SearchSearchResponse::Audiobooks }
21
21
 
22
22
  # @!attribute episodes
23
23
  #
24
- # @return [Spotted::Models::SearchRetrieveResponse::Episodes, nil]
25
- optional :episodes, -> { Spotted::Models::SearchRetrieveResponse::Episodes }
24
+ # @return [Spotted::Models::SearchSearchResponse::Episodes, nil]
25
+ optional :episodes, -> { Spotted::Models::SearchSearchResponse::Episodes }
26
26
 
27
27
  # @!attribute playlists
28
28
  #
@@ -31,24 +31,24 @@ module Spotted
31
31
 
32
32
  # @!attribute shows
33
33
  #
34
- # @return [Spotted::Models::SearchRetrieveResponse::Shows, nil]
35
- optional :shows, -> { Spotted::Models::SearchRetrieveResponse::Shows }
34
+ # @return [Spotted::Models::SearchSearchResponse::Shows, nil]
35
+ optional :shows, -> { Spotted::Models::SearchSearchResponse::Shows }
36
36
 
37
37
  # @!attribute tracks
38
38
  #
39
- # @return [Spotted::Models::SearchRetrieveResponse::Tracks, nil]
40
- optional :tracks, -> { Spotted::Models::SearchRetrieveResponse::Tracks }
39
+ # @return [Spotted::Models::SearchSearchResponse::Tracks, nil]
40
+ optional :tracks, -> { Spotted::Models::SearchSearchResponse::Tracks }
41
41
 
42
42
  # @!method initialize(albums: nil, artists: nil, audiobooks: nil, episodes: nil, playlists: nil, shows: nil, tracks: nil)
43
- # @param albums [Spotted::Models::SearchRetrieveResponse::Albums]
44
- # @param artists [Spotted::Models::SearchRetrieveResponse::Artists]
45
- # @param audiobooks [Spotted::Models::SearchRetrieveResponse::Audiobooks]
46
- # @param episodes [Spotted::Models::SearchRetrieveResponse::Episodes]
43
+ # @param albums [Spotted::Models::SearchSearchResponse::Albums]
44
+ # @param artists [Spotted::Models::SearchSearchResponse::Artists]
45
+ # @param audiobooks [Spotted::Models::SearchSearchResponse::Audiobooks]
46
+ # @param episodes [Spotted::Models::SearchSearchResponse::Episodes]
47
47
  # @param playlists [Spotted::Models::PagingPlaylistObject]
48
- # @param shows [Spotted::Models::SearchRetrieveResponse::Shows]
49
- # @param tracks [Spotted::Models::SearchRetrieveResponse::Tracks]
48
+ # @param shows [Spotted::Models::SearchSearchResponse::Shows]
49
+ # @param tracks [Spotted::Models::SearchSearchResponse::Tracks]
50
50
 
51
- # @see Spotted::Models::SearchRetrieveResponse#albums
51
+ # @see Spotted::Models::SearchSearchResponse#albums
52
52
  class Albums < Spotted::Internal::Type::BaseModel
53
53
  # @!attribute href
54
54
  # A link to the Web API endpoint returning the full result of the request
@@ -58,9 +58,9 @@ module Spotted
58
58
 
59
59
  # @!attribute items
60
60
  #
61
- # @return [Array<Spotted::Models::SearchRetrieveResponse::Albums::Item>]
61
+ # @return [Array<Spotted::Models::SearchSearchResponse::Albums::Item>]
62
62
  required :items,
63
- -> { Spotted::Internal::Type::ArrayOf[Spotted::Models::SearchRetrieveResponse::Albums::Item] }
63
+ -> { Spotted::Internal::Type::ArrayOf[Spotted::Models::SearchSearchResponse::Albums::Item] }
64
64
 
65
65
  # @!attribute limit
66
66
  # The maximum number of items in the response (as set in the query or by default).
@@ -94,11 +94,11 @@ module Spotted
94
94
 
95
95
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
96
96
  # Some parameter documentations has been truncated, see
97
- # {Spotted::Models::SearchRetrieveResponse::Albums} for more details.
97
+ # {Spotted::Models::SearchSearchResponse::Albums} for more details.
98
98
  #
99
99
  # @param href [String] A link to the Web API endpoint returning the full result of the request
100
100
  #
101
- # @param items [Array<Spotted::Models::SearchRetrieveResponse::Albums::Item>]
101
+ # @param items [Array<Spotted::Models::SearchSearchResponse::Albums::Item>]
102
102
  #
103
103
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
104
104
  #
@@ -121,8 +121,8 @@ module Spotted
121
121
  # @!attribute album_type
122
122
  # The type of the album.
123
123
  #
124
- # @return [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType]
125
- required :album_type, enum: -> { Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType }
124
+ # @return [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType]
125
+ required :album_type, enum: -> { Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType }
126
126
 
127
127
  # @!attribute artists
128
128
  # The artists of the album. Each artist object includes a link in `href` to more
@@ -174,9 +174,9 @@ module Spotted
174
174
  # @!attribute release_date_precision
175
175
  # The precision with which `release_date` value is known.
176
176
  #
177
- # @return [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision]
177
+ # @return [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision]
178
178
  required :release_date_precision,
179
- enum: -> { Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision }
179
+ enum: -> { Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision }
180
180
 
181
181
  # @!attribute total_tracks
182
182
  # The number of tracks in the album.
@@ -187,8 +187,8 @@ module Spotted
187
187
  # @!attribute type
188
188
  # The object type.
189
189
  #
190
- # @return [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::Type]
191
- required :type, enum: -> { Spotted::Models::SearchRetrieveResponse::Albums::Item::Type }
190
+ # @return [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::Type]
191
+ required :type, enum: -> { Spotted::Models::SearchSearchResponse::Albums::Item::Type }
192
192
 
193
193
  # @!attribute uri
194
194
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -205,11 +205,11 @@ module Spotted
205
205
 
206
206
  # @!method initialize(id:, album_type:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, type:, uri:, restrictions: nil)
207
207
  # Some parameter documentations has been truncated, see
208
- # {Spotted::Models::SearchRetrieveResponse::Albums::Item} for more details.
208
+ # {Spotted::Models::SearchSearchResponse::Albums::Item} for more details.
209
209
  #
210
210
  # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album
211
211
  #
212
- # @param album_type [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType] The type of the album.
212
+ # @param album_type [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType] The type of the album.
213
213
  #
214
214
  # @param artists [Array<Spotted::Models::SimplifiedArtistObject>] The artists of the album. Each artist object includes a link in `href` to more d
215
215
  #
@@ -225,11 +225,11 @@ module Spotted
225
225
  #
226
226
  # @param release_date [String] The date the album was first released.
227
227
  #
228
- # @param release_date_precision [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision] The precision with which `release_date` value is known.
228
+ # @param release_date_precision [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision] The precision with which `release_date` value is known.
229
229
  #
230
230
  # @param total_tracks [Integer] The number of tracks in the album.
231
231
  #
232
- # @param type [Symbol, Spotted::Models::SearchRetrieveResponse::Albums::Item::Type] The object type.
232
+ # @param type [Symbol, Spotted::Models::SearchSearchResponse::Albums::Item::Type] The object type.
233
233
  #
234
234
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu
235
235
  #
@@ -237,7 +237,7 @@ module Spotted
237
237
 
238
238
  # The type of the album.
239
239
  #
240
- # @see Spotted::Models::SearchRetrieveResponse::Albums::Item#album_type
240
+ # @see Spotted::Models::SearchSearchResponse::Albums::Item#album_type
241
241
  module AlbumType
242
242
  extend Spotted::Internal::Type::Enum
243
243
 
@@ -251,7 +251,7 @@ module Spotted
251
251
 
252
252
  # The precision with which `release_date` value is known.
253
253
  #
254
- # @see Spotted::Models::SearchRetrieveResponse::Albums::Item#release_date_precision
254
+ # @see Spotted::Models::SearchSearchResponse::Albums::Item#release_date_precision
255
255
  module ReleaseDatePrecision
256
256
  extend Spotted::Internal::Type::Enum
257
257
 
@@ -265,7 +265,7 @@ module Spotted
265
265
 
266
266
  # The object type.
267
267
  #
268
- # @see Spotted::Models::SearchRetrieveResponse::Albums::Item#type
268
+ # @see Spotted::Models::SearchSearchResponse::Albums::Item#type
269
269
  module Type
270
270
  extend Spotted::Internal::Type::Enum
271
271
 
@@ -277,7 +277,7 @@ module Spotted
277
277
  end
278
278
  end
279
279
 
280
- # @see Spotted::Models::SearchRetrieveResponse#artists
280
+ # @see Spotted::Models::SearchSearchResponse#artists
281
281
  class Artists < Spotted::Internal::Type::BaseModel
282
282
  # @!attribute href
283
283
  # A link to the Web API endpoint returning the full result of the request
@@ -322,7 +322,7 @@ module Spotted
322
322
 
323
323
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
324
324
  # Some parameter documentations has been truncated, see
325
- # {Spotted::Models::SearchRetrieveResponse::Artists} for more details.
325
+ # {Spotted::Models::SearchSearchResponse::Artists} for more details.
326
326
  #
327
327
  # @param href [String] A link to the Web API endpoint returning the full result of the request
328
328
  #
@@ -339,7 +339,7 @@ module Spotted
339
339
  # @param total [Integer] The total number of items available to return.
340
340
  end
341
341
 
342
- # @see Spotted::Models::SearchRetrieveResponse#audiobooks
342
+ # @see Spotted::Models::SearchSearchResponse#audiobooks
343
343
  class Audiobooks < Spotted::Internal::Type::BaseModel
344
344
  # @!attribute href
345
345
  # A link to the Web API endpoint returning the full result of the request
@@ -384,7 +384,7 @@ module Spotted
384
384
 
385
385
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
386
386
  # Some parameter documentations has been truncated, see
387
- # {Spotted::Models::SearchRetrieveResponse::Audiobooks} for more details.
387
+ # {Spotted::Models::SearchSearchResponse::Audiobooks} for more details.
388
388
  #
389
389
  # @param href [String] A link to the Web API endpoint returning the full result of the request
390
390
  #
@@ -401,7 +401,7 @@ module Spotted
401
401
  # @param total [Integer] The total number of items available to return.
402
402
  end
403
403
 
404
- # @see Spotted::Models::SearchRetrieveResponse#episodes
404
+ # @see Spotted::Models::SearchSearchResponse#episodes
405
405
  class Episodes < Spotted::Internal::Type::BaseModel
406
406
  # @!attribute href
407
407
  # A link to the Web API endpoint returning the full result of the request
@@ -446,7 +446,7 @@ module Spotted
446
446
 
447
447
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
448
448
  # Some parameter documentations has been truncated, see
449
- # {Spotted::Models::SearchRetrieveResponse::Episodes} for more details.
449
+ # {Spotted::Models::SearchSearchResponse::Episodes} for more details.
450
450
  #
451
451
  # @param href [String] A link to the Web API endpoint returning the full result of the request
452
452
  #
@@ -463,7 +463,7 @@ module Spotted
463
463
  # @param total [Integer] The total number of items available to return.
464
464
  end
465
465
 
466
- # @see Spotted::Models::SearchRetrieveResponse#shows
466
+ # @see Spotted::Models::SearchSearchResponse#shows
467
467
  class Shows < Spotted::Internal::Type::BaseModel
468
468
  # @!attribute href
469
469
  # A link to the Web API endpoint returning the full result of the request
@@ -508,7 +508,7 @@ module Spotted
508
508
 
509
509
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
510
510
  # Some parameter documentations has been truncated, see
511
- # {Spotted::Models::SearchRetrieveResponse::Shows} for more details.
511
+ # {Spotted::Models::SearchSearchResponse::Shows} for more details.
512
512
  #
513
513
  # @param href [String] A link to the Web API endpoint returning the full result of the request
514
514
  #
@@ -525,7 +525,7 @@ module Spotted
525
525
  # @param total [Integer] The total number of items available to return.
526
526
  end
527
527
 
528
- # @see Spotted::Models::SearchRetrieveResponse#tracks
528
+ # @see Spotted::Models::SearchSearchResponse#tracks
529
529
  class Tracks < Spotted::Internal::Type::BaseModel
530
530
  # @!attribute href
531
531
  # A link to the Web API endpoint returning the full result of the request
@@ -570,7 +570,7 @@ module Spotted
570
570
 
571
571
  # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
572
572
  # Some parameter documentations has been truncated, see
573
- # {Spotted::Models::SearchRetrieveResponse::Tracks} for more details.
573
+ # {Spotted::Models::SearchSearchResponse::Tracks} for more details.
574
574
  #
575
575
  # @param href [String] A link to the Web API endpoint returning the full result of the request
576
576
  #
@@ -136,7 +136,7 @@ module Spotted
136
136
 
137
137
  ResumePointObject = Spotted::Models::ResumePointObject
138
138
 
139
- SearchRetrieveParams = Spotted::Models::SearchRetrieveParams
139
+ SearchSearchParams = Spotted::Models::SearchSearchParams
140
140
 
141
141
  ShowBase = Spotted::Models::ShowBase
142
142
 
@@ -4,19 +4,19 @@ module Spotted
4
4
  module Resources
5
5
  class Search
6
6
  # Some parameter documentations has been truncated, see
7
- # {Spotted::Models::SearchRetrieveParams} for more details.
7
+ # {Spotted::Models::SearchSearchParams} for more details.
8
8
  #
9
9
  # Get Spotify catalog information about albums, artists, playlists, tracks, shows,
10
10
  # episodes or audiobooks that match a keyword string. Audiobooks are only
11
11
  # available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
12
12
  #
13
- # @overload retrieve(q:, type:, include_external: nil, limit: nil, market: nil, offset: nil, request_options: {})
13
+ # @overload search(q:, type:, include_external: nil, limit: nil, market: nil, offset: nil, request_options: {})
14
14
  #
15
15
  # @param q [String] Your search query.
16
16
  #
17
- # @param type [Array<Symbol, Spotted::Models::SearchRetrieveParams::Type>] A comma-separated list of item types to search across. Search results include hi
17
+ # @param type [Array<Symbol, Spotted::Models::SearchSearchParams::Type>] A comma-separated list of item types to search across. Search results include hi
18
18
  #
19
- # @param include_external [Symbol, Spotted::Models::SearchRetrieveParams::IncludeExternal] If `include_external=audio` is specified it signals that the client can play ext
19
+ # @param include_external [Symbol, Spotted::Models::SearchSearchParams::IncludeExternal] If `include_external=audio` is specified it signals that the client can play ext
20
20
  #
21
21
  # @param limit [Integer] The maximum number of results to return in each item type.
22
22
  #
@@ -26,16 +26,16 @@ module Spotted
26
26
  #
27
27
  # @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
28
28
  #
29
- # @return [Spotted::Models::SearchRetrieveResponse]
29
+ # @return [Spotted::Models::SearchSearchResponse]
30
30
  #
31
- # @see Spotted::Models::SearchRetrieveParams
32
- def retrieve(params)
33
- parsed, options = Spotted::SearchRetrieveParams.dump_request(params)
31
+ # @see Spotted::Models::SearchSearchParams
32
+ def search(params)
33
+ parsed, options = Spotted::SearchSearchParams.dump_request(params)
34
34
  @client.request(
35
35
  method: :get,
36
36
  path: "search",
37
37
  query: parsed,
38
- model: Spotted::Models::SearchRetrieveResponse,
38
+ model: Spotted::Models::SearchSearchResponse,
39
39
  options: options
40
40
  )
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotted
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
  end
data/lib/spotted.rb CHANGED
@@ -203,8 +203,8 @@ require_relative "spotted/models/recommendation_get_response"
203
203
  require_relative "spotted/models/recommendation_list_available_genre_seeds_params"
204
204
  require_relative "spotted/models/recommendation_list_available_genre_seeds_response"
205
205
  require_relative "spotted/models/resume_point_object"
206
- require_relative "spotted/models/search_retrieve_params"
207
- require_relative "spotted/models/search_retrieve_response"
206
+ require_relative "spotted/models/search_search_params"
207
+ require_relative "spotted/models/search_search_response"
208
208
  require_relative "spotted/models/show_list_episodes_params"
209
209
  require_relative "spotted/models/show_list_params"
210
210
  require_relative "spotted/models/show_list_response"
@@ -2,13 +2,13 @@
2
2
 
3
3
  module Spotted
4
4
  module Models
5
- class SearchRetrieveParams < Spotted::Internal::Type::BaseModel
5
+ class SearchSearchParams < Spotted::Internal::Type::BaseModel
6
6
  extend Spotted::Internal::Type::RequestParameters::Converter
7
7
  include Spotted::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
- T.any(Spotted::SearchRetrieveParams, Spotted::Internal::AnyHash)
11
+ T.any(Spotted::SearchSearchParams, Spotted::Internal::AnyHash)
12
12
  end
13
13
 
14
14
  # Your search query.
@@ -31,7 +31,7 @@ module Spotted
31
31
  # A comma-separated list of item types to search across. Search results include
32
32
  # hits from all the specified item types. For example: `q=abacab&type=album,track`
33
33
  # returns both albums and tracks matching "abacab".
34
- sig { returns(T::Array[Spotted::SearchRetrieveParams::Type::OrSymbol]) }
34
+ sig { returns(T::Array[Spotted::SearchSearchParams::Type::OrSymbol]) }
35
35
  attr_accessor :type
36
36
 
37
37
  # If `include_external=audio` is specified it signals that the client can play
@@ -40,7 +40,7 @@ module Spotted
40
40
  # the response.
41
41
  sig do
42
42
  returns(
43
- T.nilable(Spotted::SearchRetrieveParams::IncludeExternal::OrSymbol)
43
+ T.nilable(Spotted::SearchSearchParams::IncludeExternal::OrSymbol)
44
44
  )
45
45
  end
46
46
  attr_reader :include_external
@@ -48,7 +48,7 @@ module Spotted
48
48
  sig do
49
49
  params(
50
50
  include_external:
51
- Spotted::SearchRetrieveParams::IncludeExternal::OrSymbol
51
+ Spotted::SearchSearchParams::IncludeExternal::OrSymbol
52
52
  ).void
53
53
  end
54
54
  attr_writer :include_external
@@ -86,9 +86,9 @@ module Spotted
86
86
  sig do
87
87
  params(
88
88
  q: String,
89
- type: T::Array[Spotted::SearchRetrieveParams::Type::OrSymbol],
89
+ type: T::Array[Spotted::SearchSearchParams::Type::OrSymbol],
90
90
  include_external:
91
- Spotted::SearchRetrieveParams::IncludeExternal::OrSymbol,
91
+ Spotted::SearchSearchParams::IncludeExternal::OrSymbol,
92
92
  limit: Integer,
93
93
  market: String,
94
94
  offset: Integer,
@@ -143,9 +143,9 @@ module Spotted
143
143
  override.returns(
144
144
  {
145
145
  q: String,
146
- type: T::Array[Spotted::SearchRetrieveParams::Type::OrSymbol],
146
+ type: T::Array[Spotted::SearchSearchParams::Type::OrSymbol],
147
147
  include_external:
148
- Spotted::SearchRetrieveParams::IncludeExternal::OrSymbol,
148
+ Spotted::SearchSearchParams::IncludeExternal::OrSymbol,
149
149
  limit: Integer,
150
150
  market: String,
151
151
  offset: Integer,
@@ -160,24 +160,23 @@ module Spotted
160
160
  extend Spotted::Internal::Type::Enum
161
161
 
162
162
  TaggedSymbol =
163
- T.type_alias { T.all(Symbol, Spotted::SearchRetrieveParams::Type) }
163
+ T.type_alias { T.all(Symbol, Spotted::SearchSearchParams::Type) }
164
164
  OrSymbol = T.type_alias { T.any(Symbol, String) }
165
165
 
166
- ALBUM = T.let(:album, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
167
- ARTIST =
168
- T.let(:artist, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
166
+ ALBUM = T.let(:album, Spotted::SearchSearchParams::Type::TaggedSymbol)
167
+ ARTIST = T.let(:artist, Spotted::SearchSearchParams::Type::TaggedSymbol)
169
168
  PLAYLIST =
170
- T.let(:playlist, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
171
- TRACK = T.let(:track, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
172
- SHOW = T.let(:show, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
169
+ T.let(:playlist, Spotted::SearchSearchParams::Type::TaggedSymbol)
170
+ TRACK = T.let(:track, Spotted::SearchSearchParams::Type::TaggedSymbol)
171
+ SHOW = T.let(:show, Spotted::SearchSearchParams::Type::TaggedSymbol)
173
172
  EPISODE =
174
- T.let(:episode, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
173
+ T.let(:episode, Spotted::SearchSearchParams::Type::TaggedSymbol)
175
174
  AUDIOBOOK =
176
- T.let(:audiobook, Spotted::SearchRetrieveParams::Type::TaggedSymbol)
175
+ T.let(:audiobook, Spotted::SearchSearchParams::Type::TaggedSymbol)
177
176
 
178
177
  sig do
179
178
  override.returns(
180
- T::Array[Spotted::SearchRetrieveParams::Type::TaggedSymbol]
179
+ T::Array[Spotted::SearchSearchParams::Type::TaggedSymbol]
181
180
  )
182
181
  end
183
182
  def self.values
@@ -193,21 +192,19 @@ module Spotted
193
192
 
194
193
  TaggedSymbol =
195
194
  T.type_alias do
196
- T.all(Symbol, Spotted::SearchRetrieveParams::IncludeExternal)
195
+ T.all(Symbol, Spotted::SearchSearchParams::IncludeExternal)
197
196
  end
198
197
  OrSymbol = T.type_alias { T.any(Symbol, String) }
199
198
 
200
199
  AUDIO =
201
200
  T.let(
202
201
  :audio,
203
- Spotted::SearchRetrieveParams::IncludeExternal::TaggedSymbol
202
+ Spotted::SearchSearchParams::IncludeExternal::TaggedSymbol
204
203
  )
205
204
 
206
205
  sig do
207
206
  override.returns(
208
- T::Array[
209
- Spotted::SearchRetrieveParams::IncludeExternal::TaggedSymbol
210
- ]
207
+ T::Array[Spotted::SearchSearchParams::IncludeExternal::TaggedSymbol]
211
208
  )
212
209
  end
213
210
  def self.values