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.
@@ -2,60 +2,55 @@
2
2
 
3
3
  module Spotted
4
4
  module Models
5
- class SearchRetrieveResponse < Spotted::Internal::Type::BaseModel
5
+ class SearchSearchResponse < Spotted::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(
9
- Spotted::Models::SearchRetrieveResponse,
9
+ Spotted::Models::SearchSearchResponse,
10
10
  Spotted::Internal::AnyHash
11
11
  )
12
12
  end
13
13
 
14
- sig do
15
- returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Albums))
16
- end
14
+ sig { returns(T.nilable(Spotted::Models::SearchSearchResponse::Albums)) }
17
15
  attr_reader :albums
18
16
 
19
17
  sig do
20
18
  params(
21
- albums: Spotted::Models::SearchRetrieveResponse::Albums::OrHash
19
+ albums: Spotted::Models::SearchSearchResponse::Albums::OrHash
22
20
  ).void
23
21
  end
24
22
  attr_writer :albums
25
23
 
26
- sig do
27
- returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Artists))
28
- end
24
+ sig { returns(T.nilable(Spotted::Models::SearchSearchResponse::Artists)) }
29
25
  attr_reader :artists
30
26
 
31
27
  sig do
32
28
  params(
33
- artists: Spotted::Models::SearchRetrieveResponse::Artists::OrHash
29
+ artists: Spotted::Models::SearchSearchResponse::Artists::OrHash
34
30
  ).void
35
31
  end
36
32
  attr_writer :artists
37
33
 
38
34
  sig do
39
- returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Audiobooks))
35
+ returns(T.nilable(Spotted::Models::SearchSearchResponse::Audiobooks))
40
36
  end
41
37
  attr_reader :audiobooks
42
38
 
43
39
  sig do
44
40
  params(
45
- audiobooks:
46
- Spotted::Models::SearchRetrieveResponse::Audiobooks::OrHash
41
+ audiobooks: Spotted::Models::SearchSearchResponse::Audiobooks::OrHash
47
42
  ).void
48
43
  end
49
44
  attr_writer :audiobooks
50
45
 
51
46
  sig do
52
- returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Episodes))
47
+ returns(T.nilable(Spotted::Models::SearchSearchResponse::Episodes))
53
48
  end
54
49
  attr_reader :episodes
55
50
 
56
51
  sig do
57
52
  params(
58
- episodes: Spotted::Models::SearchRetrieveResponse::Episodes::OrHash
53
+ episodes: Spotted::Models::SearchSearchResponse::Episodes::OrHash
59
54
  ).void
60
55
  end
61
56
  attr_writer :episodes
@@ -66,38 +61,33 @@ module Spotted
66
61
  sig { params(playlists: Spotted::PagingPlaylistObject::OrHash).void }
67
62
  attr_writer :playlists
68
63
 
69
- sig { returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Shows)) }
64
+ sig { returns(T.nilable(Spotted::Models::SearchSearchResponse::Shows)) }
70
65
  attr_reader :shows
71
66
 
72
67
  sig do
73
- params(
74
- shows: Spotted::Models::SearchRetrieveResponse::Shows::OrHash
75
- ).void
68
+ params(shows: Spotted::Models::SearchSearchResponse::Shows::OrHash).void
76
69
  end
77
70
  attr_writer :shows
78
71
 
79
- sig do
80
- returns(T.nilable(Spotted::Models::SearchRetrieveResponse::Tracks))
81
- end
72
+ sig { returns(T.nilable(Spotted::Models::SearchSearchResponse::Tracks)) }
82
73
  attr_reader :tracks
83
74
 
84
75
  sig do
85
76
  params(
86
- tracks: Spotted::Models::SearchRetrieveResponse::Tracks::OrHash
77
+ tracks: Spotted::Models::SearchSearchResponse::Tracks::OrHash
87
78
  ).void
88
79
  end
89
80
  attr_writer :tracks
90
81
 
91
82
  sig do
92
83
  params(
93
- albums: Spotted::Models::SearchRetrieveResponse::Albums::OrHash,
94
- artists: Spotted::Models::SearchRetrieveResponse::Artists::OrHash,
95
- audiobooks:
96
- Spotted::Models::SearchRetrieveResponse::Audiobooks::OrHash,
97
- episodes: Spotted::Models::SearchRetrieveResponse::Episodes::OrHash,
84
+ albums: Spotted::Models::SearchSearchResponse::Albums::OrHash,
85
+ artists: Spotted::Models::SearchSearchResponse::Artists::OrHash,
86
+ audiobooks: Spotted::Models::SearchSearchResponse::Audiobooks::OrHash,
87
+ episodes: Spotted::Models::SearchSearchResponse::Episodes::OrHash,
98
88
  playlists: Spotted::PagingPlaylistObject::OrHash,
99
- shows: Spotted::Models::SearchRetrieveResponse::Shows::OrHash,
100
- tracks: Spotted::Models::SearchRetrieveResponse::Tracks::OrHash
89
+ shows: Spotted::Models::SearchSearchResponse::Shows::OrHash,
90
+ tracks: Spotted::Models::SearchSearchResponse::Tracks::OrHash
101
91
  ).returns(T.attached_class)
102
92
  end
103
93
  def self.new(
@@ -114,13 +104,13 @@ module Spotted
114
104
  sig do
115
105
  override.returns(
116
106
  {
117
- albums: Spotted::Models::SearchRetrieveResponse::Albums,
118
- artists: Spotted::Models::SearchRetrieveResponse::Artists,
119
- audiobooks: Spotted::Models::SearchRetrieveResponse::Audiobooks,
120
- episodes: Spotted::Models::SearchRetrieveResponse::Episodes,
107
+ albums: Spotted::Models::SearchSearchResponse::Albums,
108
+ artists: Spotted::Models::SearchSearchResponse::Artists,
109
+ audiobooks: Spotted::Models::SearchSearchResponse::Audiobooks,
110
+ episodes: Spotted::Models::SearchSearchResponse::Episodes,
121
111
  playlists: Spotted::PagingPlaylistObject,
122
- shows: Spotted::Models::SearchRetrieveResponse::Shows,
123
- tracks: Spotted::Models::SearchRetrieveResponse::Tracks
112
+ shows: Spotted::Models::SearchSearchResponse::Shows,
113
+ tracks: Spotted::Models::SearchSearchResponse::Tracks
124
114
  }
125
115
  )
126
116
  end
@@ -131,7 +121,7 @@ module Spotted
131
121
  OrHash =
132
122
  T.type_alias do
133
123
  T.any(
134
- Spotted::Models::SearchRetrieveResponse::Albums,
124
+ Spotted::Models::SearchSearchResponse::Albums,
135
125
  Spotted::Internal::AnyHash
136
126
  )
137
127
  end
@@ -141,9 +131,7 @@ module Spotted
141
131
  attr_accessor :href
142
132
 
143
133
  sig do
144
- returns(
145
- T::Array[Spotted::Models::SearchRetrieveResponse::Albums::Item]
146
- )
134
+ returns(T::Array[Spotted::Models::SearchSearchResponse::Albums::Item])
147
135
  end
148
136
  attr_accessor :items
149
137
 
@@ -172,7 +160,7 @@ module Spotted
172
160
  href: String,
173
161
  items:
174
162
  T::Array[
175
- Spotted::Models::SearchRetrieveResponse::Albums::Item::OrHash
163
+ Spotted::Models::SearchSearchResponse::Albums::Item::OrHash
176
164
  ],
177
165
  limit: Integer,
178
166
  next_: T.nilable(String),
@@ -203,7 +191,7 @@ module Spotted
203
191
  {
204
192
  href: String,
205
193
  items:
206
- T::Array[Spotted::Models::SearchRetrieveResponse::Albums::Item],
194
+ T::Array[Spotted::Models::SearchSearchResponse::Albums::Item],
207
195
  limit: Integer,
208
196
  next_: T.nilable(String),
209
197
  offset: Integer,
@@ -219,7 +207,7 @@ module Spotted
219
207
  OrHash =
220
208
  T.type_alias do
221
209
  T.any(
222
- Spotted::Models::SearchRetrieveResponse::Albums::Item,
210
+ Spotted::Models::SearchSearchResponse::Albums::Item,
223
211
  Spotted::Internal::AnyHash
224
212
  )
225
213
  end
@@ -232,7 +220,7 @@ module Spotted
232
220
  # The type of the album.
233
221
  sig do
234
222
  returns(
235
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol
223
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol
236
224
  )
237
225
  end
238
226
  attr_accessor :album_type
@@ -276,7 +264,7 @@ module Spotted
276
264
  # The precision with which `release_date` value is known.
277
265
  sig do
278
266
  returns(
279
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
267
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
280
268
  )
281
269
  end
282
270
  attr_accessor :release_date_precision
@@ -288,7 +276,7 @@ module Spotted
288
276
  # The object type.
289
277
  sig do
290
278
  returns(
291
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type::TaggedSymbol
279
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type::TaggedSymbol
292
280
  )
293
281
  end
294
282
  attr_accessor :type
@@ -311,7 +299,7 @@ module Spotted
311
299
  params(
312
300
  id: String,
313
301
  album_type:
314
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::OrSymbol,
302
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::OrSymbol,
315
303
  artists: T::Array[Spotted::SimplifiedArtistObject::OrHash],
316
304
  available_markets: T::Array[String],
317
305
  external_urls: Spotted::ExternalURLObject::OrHash,
@@ -320,10 +308,10 @@ module Spotted
320
308
  name: String,
321
309
  release_date: String,
322
310
  release_date_precision:
323
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::OrSymbol,
311
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::OrSymbol,
324
312
  total_tracks: Integer,
325
313
  type:
326
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type::OrSymbol,
314
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type::OrSymbol,
327
315
  uri: String,
328
316
  restrictions: Spotted::AlbumRestrictionObject::OrHash
329
317
  ).returns(T.attached_class)
@@ -372,7 +360,7 @@ module Spotted
372
360
  {
373
361
  id: String,
374
362
  album_type:
375
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol,
363
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol,
376
364
  artists: T::Array[Spotted::SimplifiedArtistObject],
377
365
  available_markets: T::Array[String],
378
366
  external_urls: Spotted::ExternalURLObject,
@@ -381,10 +369,10 @@ module Spotted
381
369
  name: String,
382
370
  release_date: String,
383
371
  release_date_precision:
384
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol,
372
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol,
385
373
  total_tracks: Integer,
386
374
  type:
387
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type::TaggedSymbol,
375
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type::TaggedSymbol,
388
376
  uri: String,
389
377
  restrictions: Spotted::AlbumRestrictionObject
390
378
  }
@@ -401,7 +389,7 @@ module Spotted
401
389
  T.type_alias do
402
390
  T.all(
403
391
  Symbol,
404
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType
392
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType
405
393
  )
406
394
  end
407
395
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -409,23 +397,23 @@ module Spotted
409
397
  ALBUM =
410
398
  T.let(
411
399
  :album,
412
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol
400
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol
413
401
  )
414
402
  SINGLE =
415
403
  T.let(
416
404
  :single,
417
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol
405
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol
418
406
  )
419
407
  COMPILATION =
420
408
  T.let(
421
409
  :compilation,
422
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol
410
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol
423
411
  )
424
412
 
425
413
  sig do
426
414
  override.returns(
427
415
  T::Array[
428
- Spotted::Models::SearchRetrieveResponse::Albums::Item::AlbumType::TaggedSymbol
416
+ Spotted::Models::SearchSearchResponse::Albums::Item::AlbumType::TaggedSymbol
429
417
  ]
430
418
  )
431
419
  end
@@ -441,7 +429,7 @@ module Spotted
441
429
  T.type_alias do
442
430
  T.all(
443
431
  Symbol,
444
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision
432
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision
445
433
  )
446
434
  end
447
435
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -449,23 +437,23 @@ module Spotted
449
437
  YEAR =
450
438
  T.let(
451
439
  :year,
452
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
440
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
453
441
  )
454
442
  MONTH =
455
443
  T.let(
456
444
  :month,
457
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
445
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
458
446
  )
459
447
  DAY =
460
448
  T.let(
461
449
  :day,
462
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
450
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
463
451
  )
464
452
 
465
453
  sig do
466
454
  override.returns(
467
455
  T::Array[
468
- Spotted::Models::SearchRetrieveResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
456
+ Spotted::Models::SearchSearchResponse::Albums::Item::ReleaseDatePrecision::TaggedSymbol
469
457
  ]
470
458
  )
471
459
  end
@@ -481,7 +469,7 @@ module Spotted
481
469
  T.type_alias do
482
470
  T.all(
483
471
  Symbol,
484
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type
472
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type
485
473
  )
486
474
  end
487
475
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -489,13 +477,13 @@ module Spotted
489
477
  ALBUM =
490
478
  T.let(
491
479
  :album,
492
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type::TaggedSymbol
480
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type::TaggedSymbol
493
481
  )
494
482
 
495
483
  sig do
496
484
  override.returns(
497
485
  T::Array[
498
- Spotted::Models::SearchRetrieveResponse::Albums::Item::Type::TaggedSymbol
486
+ Spotted::Models::SearchSearchResponse::Albums::Item::Type::TaggedSymbol
499
487
  ]
500
488
  )
501
489
  end
@@ -509,7 +497,7 @@ module Spotted
509
497
  OrHash =
510
498
  T.type_alias do
511
499
  T.any(
512
- Spotted::Models::SearchRetrieveResponse::Artists,
500
+ Spotted::Models::SearchSearchResponse::Artists,
513
501
  Spotted::Internal::AnyHash
514
502
  )
515
503
  end
@@ -590,7 +578,7 @@ module Spotted
590
578
  OrHash =
591
579
  T.type_alias do
592
580
  T.any(
593
- Spotted::Models::SearchRetrieveResponse::Audiobooks,
581
+ Spotted::Models::SearchSearchResponse::Audiobooks,
594
582
  Spotted::Internal::AnyHash
595
583
  )
596
584
  end
@@ -671,7 +659,7 @@ module Spotted
671
659
  OrHash =
672
660
  T.type_alias do
673
661
  T.any(
674
- Spotted::Models::SearchRetrieveResponse::Episodes,
662
+ Spotted::Models::SearchSearchResponse::Episodes,
675
663
  Spotted::Internal::AnyHash
676
664
  )
677
665
  end
@@ -752,7 +740,7 @@ module Spotted
752
740
  OrHash =
753
741
  T.type_alias do
754
742
  T.any(
755
- Spotted::Models::SearchRetrieveResponse::Shows,
743
+ Spotted::Models::SearchSearchResponse::Shows,
756
744
  Spotted::Internal::AnyHash
757
745
  )
758
746
  end
@@ -833,7 +821,7 @@ module Spotted
833
821
  OrHash =
834
822
  T.type_alias do
835
823
  T.any(
836
- Spotted::Models::SearchRetrieveResponse::Tracks,
824
+ Spotted::Models::SearchSearchResponse::Tracks,
837
825
  Spotted::Internal::AnyHash
838
826
  )
839
827
  end
@@ -100,7 +100,7 @@ module Spotted
100
100
 
101
101
  ResumePointObject = Spotted::Models::ResumePointObject
102
102
 
103
- SearchRetrieveParams = Spotted::Models::SearchRetrieveParams
103
+ SearchSearchParams = Spotted::Models::SearchSearchParams
104
104
 
105
105
  ShowBase = Spotted::Models::ShowBase
106
106
 
@@ -9,16 +9,16 @@ module Spotted
9
9
  sig do
10
10
  params(
11
11
  q: String,
12
- type: T::Array[Spotted::SearchRetrieveParams::Type::OrSymbol],
12
+ type: T::Array[Spotted::SearchSearchParams::Type::OrSymbol],
13
13
  include_external:
14
- Spotted::SearchRetrieveParams::IncludeExternal::OrSymbol,
14
+ Spotted::SearchSearchParams::IncludeExternal::OrSymbol,
15
15
  limit: Integer,
16
16
  market: String,
17
17
  offset: Integer,
18
18
  request_options: Spotted::RequestOptions::OrHash
19
- ).returns(Spotted::Models::SearchRetrieveResponse)
19
+ ).returns(Spotted::Models::SearchSearchResponse)
20
20
  end
21
- def retrieve(
21
+ def search(
22
22
  # Your search query.
23
23
  #
24
24
  # You can narrow down your search using field filters. The available filters are
@@ -1,29 +1,29 @@
1
1
  module Spotted
2
2
  module Models
3
- type search_retrieve_params =
3
+ type search_search_params =
4
4
  {
5
5
  q: String,
6
- type: ::Array[Spotted::Models::SearchRetrieveParams::type_],
7
- include_external: Spotted::Models::SearchRetrieveParams::include_external,
6
+ type: ::Array[Spotted::Models::SearchSearchParams::type_],
7
+ include_external: Spotted::Models::SearchSearchParams::include_external,
8
8
  limit: Integer,
9
9
  market: String,
10
10
  offset: Integer
11
11
  }
12
12
  & Spotted::Internal::Type::request_parameters
13
13
 
14
- class SearchRetrieveParams < Spotted::Internal::Type::BaseModel
14
+ class SearchSearchParams < Spotted::Internal::Type::BaseModel
15
15
  extend Spotted::Internal::Type::RequestParameters::Converter
16
16
  include Spotted::Internal::Type::RequestParameters
17
17
 
18
18
  attr_accessor q: String
19
19
 
20
- attr_accessor type: ::Array[Spotted::Models::SearchRetrieveParams::type_]
20
+ attr_accessor type: ::Array[Spotted::Models::SearchSearchParams::type_]
21
21
 
22
- attr_reader include_external: Spotted::Models::SearchRetrieveParams::include_external?
22
+ attr_reader include_external: Spotted::Models::SearchSearchParams::include_external?
23
23
 
24
24
  def include_external=: (
25
- Spotted::Models::SearchRetrieveParams::include_external
26
- ) -> Spotted::Models::SearchRetrieveParams::include_external
25
+ Spotted::Models::SearchSearchParams::include_external
26
+ ) -> Spotted::Models::SearchSearchParams::include_external
27
27
 
28
28
  attr_reader limit: Integer?
29
29
 
@@ -39,8 +39,8 @@ module Spotted
39
39
 
40
40
  def initialize: (
41
41
  q: String,
42
- type: ::Array[Spotted::Models::SearchRetrieveParams::type_],
43
- ?include_external: Spotted::Models::SearchRetrieveParams::include_external,
42
+ type: ::Array[Spotted::Models::SearchSearchParams::type_],
43
+ ?include_external: Spotted::Models::SearchSearchParams::include_external,
44
44
  ?limit: Integer,
45
45
  ?market: String,
46
46
  ?offset: Integer,
@@ -49,8 +49,8 @@ module Spotted
49
49
 
50
50
  def to_hash: -> {
51
51
  q: String,
52
- type: ::Array[Spotted::Models::SearchRetrieveParams::type_],
53
- include_external: Spotted::Models::SearchRetrieveParams::include_external,
52
+ type: ::Array[Spotted::Models::SearchSearchParams::type_],
53
+ include_external: Spotted::Models::SearchSearchParams::include_external,
54
54
  limit: Integer,
55
55
  market: String,
56
56
  offset: Integer,
@@ -71,7 +71,7 @@ module Spotted
71
71
  EPISODE: :episode
72
72
  AUDIOBOOK: :audiobook
73
73
 
74
- def self?.values: -> ::Array[Spotted::Models::SearchRetrieveParams::type_]
74
+ def self?.values: -> ::Array[Spotted::Models::SearchSearchParams::type_]
75
75
  end
76
76
 
77
77
  type include_external = :audio
@@ -81,7 +81,7 @@ module Spotted
81
81
 
82
82
  AUDIO: :audio
83
83
 
84
- def self?.values: -> ::Array[Spotted::Models::SearchRetrieveParams::include_external]
84
+ def self?.values: -> ::Array[Spotted::Models::SearchSearchParams::include_external]
85
85
  end
86
86
  end
87
87
  end