spotted 0.11.0 → 0.12.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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/spotted/client.rb +60 -1
  5. data/lib/spotted/models/album_bulk_retrieve_response.rb +13 -25
  6. data/lib/spotted/models/album_retrieve_response.rb +13 -25
  7. data/lib/spotted/models/artist_list_albums_response.rb +5 -17
  8. data/lib/spotted/models/audio_analysis_retrieve_response.rb +3 -8
  9. data/lib/spotted/models/audiobook_base.rb +4 -16
  10. data/lib/spotted/models/audiobook_bulk_retrieve_response.rb +8 -8
  11. data/lib/spotted/models/audiobook_retrieve_response.rb +8 -8
  12. data/lib/spotted/models/browse/category_list_response.rb +9 -9
  13. data/lib/spotted/models/browse_get_new_releases_response.rb +14 -26
  14. data/lib/spotted/models/chapter_bulk_retrieve_response.rb +5 -17
  15. data/lib/spotted/models/chapter_retrieve_response.rb +5 -17
  16. data/lib/spotted/models/episode_object.rb +5 -17
  17. data/lib/spotted/models/me/album_list_response.rb +13 -25
  18. data/lib/spotted/models/me/audiobook_list_response.rb +8 -8
  19. data/lib/spotted/models/me/following_bulk_retrieve_params.rb +5 -15
  20. data/lib/spotted/models/paging_playlist_object.rb +8 -8
  21. data/lib/spotted/models/playlist_retrieve_response.rb +8 -8
  22. data/lib/spotted/models/search_query_response.rb +54 -66
  23. data/lib/spotted/models/show_base.rb +4 -16
  24. data/lib/spotted/models/show_retrieve_response.rb +8 -8
  25. data/lib/spotted/models/simplified_chapter_object.rb +5 -17
  26. data/lib/spotted/models/simplified_episode_object.rb +5 -17
  27. data/lib/spotted/models/track_object.rb +5 -17
  28. data/lib/spotted/models/users/playlist_create_response.rb +8 -8
  29. data/lib/spotted/resources/me/following.rb +3 -3
  30. data/lib/spotted/resources/playlists/images.rb +3 -3
  31. data/lib/spotted/version.rb +1 -1
  32. data/rbi/spotted/models/album_bulk_retrieve_response.rbi +21 -52
  33. data/rbi/spotted/models/album_retrieve_response.rbi +21 -43
  34. data/rbi/spotted/models/artist_list_albums_response.rbi +7 -36
  35. data/rbi/spotted/models/audio_analysis_retrieve_response.rbi +3 -8
  36. data/rbi/spotted/models/audiobook_base.rbi +7 -25
  37. data/rbi/spotted/models/audiobook_bulk_retrieve_response.rbi +16 -9
  38. data/rbi/spotted/models/audiobook_retrieve_response.rbi +14 -9
  39. data/rbi/spotted/models/browse/category_list_response.rbi +31 -19
  40. data/rbi/spotted/models/browse_get_new_releases_response.rbi +38 -62
  41. data/rbi/spotted/models/chapter_bulk_retrieve_response.rbi +7 -43
  42. data/rbi/spotted/models/chapter_retrieve_response.rbi +7 -36
  43. data/rbi/spotted/models/episode_object.rbi +7 -24
  44. data/rbi/spotted/models/me/album_list_response.rbi +23 -52
  45. data/rbi/spotted/models/me/audiobook_list_response.rbi +18 -9
  46. data/rbi/spotted/models/me/following_bulk_retrieve_params.rbi +5 -34
  47. data/rbi/spotted/models/paging_playlist_object.rbi +14 -9
  48. data/rbi/spotted/models/playlist_retrieve_response.rbi +14 -9
  49. data/rbi/spotted/models/search_query_response.rbi +96 -101
  50. data/rbi/spotted/models/show_base.rbi +7 -23
  51. data/rbi/spotted/models/show_retrieve_response.rbi +14 -9
  52. data/rbi/spotted/models/simplified_chapter_object.rbi +7 -27
  53. data/rbi/spotted/models/simplified_episode_object.rbi +7 -27
  54. data/rbi/spotted/models/track_object.rbi +7 -26
  55. data/rbi/spotted/models/users/playlist_create_response.rbi +14 -9
  56. data/rbi/spotted/resources/me/following.rbi +3 -3
  57. data/rbi/spotted/resources/playlists/images.rbi +1 -1
  58. data/sig/spotted/models/album_bulk_retrieve_response.rbs +17 -23
  59. data/sig/spotted/models/album_retrieve_response.rbs +17 -23
  60. data/sig/spotted/models/artist_list_albums_response.rbs +5 -15
  61. data/sig/spotted/models/audio_analysis_retrieve_response.rbs +3 -8
  62. data/sig/spotted/models/audiobook_base.rbs +5 -15
  63. data/sig/spotted/models/audiobook_bulk_retrieve_response.rbs +12 -8
  64. data/sig/spotted/models/audiobook_retrieve_response.rbs +12 -8
  65. data/sig/spotted/models/browse/category_list_response.rbs +12 -8
  66. data/sig/spotted/models/browse_get_new_releases_response.rbs +17 -23
  67. data/sig/spotted/models/chapter_bulk_retrieve_response.rbs +5 -15
  68. data/sig/spotted/models/chapter_retrieve_response.rbs +5 -15
  69. data/sig/spotted/models/episode_object.rbs +5 -15
  70. data/sig/spotted/models/me/album_list_response.rbs +17 -23
  71. data/sig/spotted/models/me/audiobook_list_response.rbs +12 -8
  72. data/sig/spotted/models/me/following_bulk_retrieve_params.rbs +4 -18
  73. data/sig/spotted/models/paging_playlist_object.rbs +12 -8
  74. data/sig/spotted/models/playlist_retrieve_response.rbs +12 -8
  75. data/sig/spotted/models/search_query_response.rbs +75 -63
  76. data/sig/spotted/models/show_base.rbs +5 -15
  77. data/sig/spotted/models/show_retrieve_response.rbs +12 -8
  78. data/sig/spotted/models/simplified_chapter_object.rbs +5 -15
  79. data/sig/spotted/models/simplified_episode_object.rbs +5 -15
  80. data/sig/spotted/models/track_object.rbs +5 -15
  81. data/sig/spotted/models/users/playlist_create_response.rbs +12 -8
  82. data/sig/spotted/resources/me/following.rbs +1 -1
  83. data/sig/spotted/resources/playlists/images.rbs +1 -1
  84. metadata +2 -2
@@ -56,12 +56,6 @@ module Spotted
56
56
  # @return [String]
57
57
  required :href, String
58
58
 
59
- # @!attribute items
60
- #
61
- # @return [Array<Spotted::Models::SearchQueryResponse::Albums::Item>]
62
- required :items,
63
- -> { Spotted::Internal::Type::ArrayOf[Spotted::Models::SearchQueryResponse::Albums::Item] }
64
-
65
59
  # @!attribute limit
66
60
  # The maximum number of items in the response (as set in the query or by default).
67
61
  #
@@ -92,14 +86,18 @@ module Spotted
92
86
  # @return [Integer]
93
87
  required :total, Integer
94
88
 
95
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
89
+ # @!attribute items
90
+ #
91
+ # @return [Array<Spotted::Models::SearchQueryResponse::Albums::Item>, nil]
92
+ optional :items,
93
+ -> { Spotted::Internal::Type::ArrayOf[Spotted::Models::SearchQueryResponse::Albums::Item] }
94
+
95
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
96
96
  # Some parameter documentations has been truncated, see
97
97
  # {Spotted::Models::SearchQueryResponse::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::SearchQueryResponse::Albums::Item>]
102
- #
103
101
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
104
102
  #
105
103
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -109,6 +107,8 @@ module Spotted
109
107
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
110
108
  #
111
109
  # @param total [Integer] The total number of items available to return.
110
+ #
111
+ # @param items [Array<Spotted::Models::SearchQueryResponse::Albums::Item>]
112
112
 
113
113
  class Item < Spotted::Internal::Type::BaseModel
114
114
  # @!attribute id
@@ -187,8 +187,8 @@ module Spotted
187
187
  # @!attribute type
188
188
  # The object type.
189
189
  #
190
- # @return [Symbol, Spotted::Models::SearchQueryResponse::Albums::Item::Type]
191
- required :type, enum: -> { Spotted::Models::SearchQueryResponse::Albums::Item::Type }
190
+ # @return [Symbol, :album]
191
+ required :type, const: :album
192
192
 
193
193
  # @!attribute uri
194
194
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -203,7 +203,7 @@ module Spotted
203
203
  # @return [Spotted::Models::AlbumRestrictionObject, nil]
204
204
  optional :restrictions, -> { Spotted::AlbumRestrictionObject }
205
205
 
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)
206
+ # @!method initialize(id:, album_type:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, uri:, restrictions: nil, type: :album)
207
207
  # Some parameter documentations has been truncated, see
208
208
  # {Spotted::Models::SearchQueryResponse::Albums::Item} for more details.
209
209
  #
@@ -229,11 +229,11 @@ module Spotted
229
229
  #
230
230
  # @param total_tracks [Integer] The number of tracks in the album.
231
231
  #
232
- # @param type [Symbol, Spotted::Models::SearchQueryResponse::Albums::Item::Type] The object type.
233
- #
234
232
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu
235
233
  #
236
234
  # @param restrictions [Spotted::Models::AlbumRestrictionObject] Included in the response when a content restriction is applied.
235
+ #
236
+ # @param type [Symbol, :album] The object type.
237
237
 
238
238
  # The type of the album.
239
239
  #
@@ -262,18 +262,6 @@ module Spotted
262
262
  # @!method self.values
263
263
  # @return [Array<Symbol>]
264
264
  end
265
-
266
- # The object type.
267
- #
268
- # @see Spotted::Models::SearchQueryResponse::Albums::Item#type
269
- module Type
270
- extend Spotted::Internal::Type::Enum
271
-
272
- ALBUM = :album
273
-
274
- # @!method self.values
275
- # @return [Array<Symbol>]
276
- end
277
265
  end
278
266
  end
279
267
 
@@ -285,11 +273,6 @@ module Spotted
285
273
  # @return [String]
286
274
  required :href, String
287
275
 
288
- # @!attribute items
289
- #
290
- # @return [Array<Spotted::Models::ArtistObject>]
291
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::ArtistObject] }
292
-
293
276
  # @!attribute limit
294
277
  # The maximum number of items in the response (as set in the query or by default).
295
278
  #
@@ -320,14 +303,17 @@ module Spotted
320
303
  # @return [Integer]
321
304
  required :total, Integer
322
305
 
323
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
306
+ # @!attribute items
307
+ #
308
+ # @return [Array<Spotted::Models::ArtistObject>, nil]
309
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::ArtistObject] }
310
+
311
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
324
312
  # Some parameter documentations has been truncated, see
325
313
  # {Spotted::Models::SearchQueryResponse::Artists} for more details.
326
314
  #
327
315
  # @param href [String] A link to the Web API endpoint returning the full result of the request
328
316
  #
329
- # @param items [Array<Spotted::Models::ArtistObject>]
330
- #
331
317
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
332
318
  #
333
319
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -337,6 +323,8 @@ module Spotted
337
323
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
338
324
  #
339
325
  # @param total [Integer] The total number of items available to return.
326
+ #
327
+ # @param items [Array<Spotted::Models::ArtistObject>]
340
328
  end
341
329
 
342
330
  # @see Spotted::Models::SearchQueryResponse#audiobooks
@@ -347,11 +335,6 @@ module Spotted
347
335
  # @return [String]
348
336
  required :href, String
349
337
 
350
- # @!attribute items
351
- #
352
- # @return [Array<Spotted::Models::AudiobookBase>]
353
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::AudiobookBase] }
354
-
355
338
  # @!attribute limit
356
339
  # The maximum number of items in the response (as set in the query or by default).
357
340
  #
@@ -382,14 +365,17 @@ module Spotted
382
365
  # @return [Integer]
383
366
  required :total, Integer
384
367
 
385
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
368
+ # @!attribute items
369
+ #
370
+ # @return [Array<Spotted::Models::AudiobookBase>, nil]
371
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::AudiobookBase] }
372
+
373
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
386
374
  # Some parameter documentations has been truncated, see
387
375
  # {Spotted::Models::SearchQueryResponse::Audiobooks} for more details.
388
376
  #
389
377
  # @param href [String] A link to the Web API endpoint returning the full result of the request
390
378
  #
391
- # @param items [Array<Spotted::Models::AudiobookBase>]
392
- #
393
379
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
394
380
  #
395
381
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -399,6 +385,8 @@ module Spotted
399
385
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
400
386
  #
401
387
  # @param total [Integer] The total number of items available to return.
388
+ #
389
+ # @param items [Array<Spotted::Models::AudiobookBase>]
402
390
  end
403
391
 
404
392
  # @see Spotted::Models::SearchQueryResponse#episodes
@@ -409,11 +397,6 @@ module Spotted
409
397
  # @return [String]
410
398
  required :href, String
411
399
 
412
- # @!attribute items
413
- #
414
- # @return [Array<Spotted::Models::SimplifiedEpisodeObject>]
415
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedEpisodeObject] }
416
-
417
400
  # @!attribute limit
418
401
  # The maximum number of items in the response (as set in the query or by default).
419
402
  #
@@ -444,14 +427,17 @@ module Spotted
444
427
  # @return [Integer]
445
428
  required :total, Integer
446
429
 
447
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
430
+ # @!attribute items
431
+ #
432
+ # @return [Array<Spotted::Models::SimplifiedEpisodeObject>, nil]
433
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedEpisodeObject] }
434
+
435
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
448
436
  # Some parameter documentations has been truncated, see
449
437
  # {Spotted::Models::SearchQueryResponse::Episodes} for more details.
450
438
  #
451
439
  # @param href [String] A link to the Web API endpoint returning the full result of the request
452
440
  #
453
- # @param items [Array<Spotted::Models::SimplifiedEpisodeObject>]
454
- #
455
441
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
456
442
  #
457
443
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -461,6 +447,8 @@ module Spotted
461
447
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
462
448
  #
463
449
  # @param total [Integer] The total number of items available to return.
450
+ #
451
+ # @param items [Array<Spotted::Models::SimplifiedEpisodeObject>]
464
452
  end
465
453
 
466
454
  # @see Spotted::Models::SearchQueryResponse#shows
@@ -471,11 +459,6 @@ module Spotted
471
459
  # @return [String]
472
460
  required :href, String
473
461
 
474
- # @!attribute items
475
- #
476
- # @return [Array<Spotted::Models::ShowBase>]
477
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::ShowBase] }
478
-
479
462
  # @!attribute limit
480
463
  # The maximum number of items in the response (as set in the query or by default).
481
464
  #
@@ -506,14 +489,17 @@ module Spotted
506
489
  # @return [Integer]
507
490
  required :total, Integer
508
491
 
509
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
492
+ # @!attribute items
493
+ #
494
+ # @return [Array<Spotted::Models::ShowBase>, nil]
495
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::ShowBase] }
496
+
497
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
510
498
  # Some parameter documentations has been truncated, see
511
499
  # {Spotted::Models::SearchQueryResponse::Shows} for more details.
512
500
  #
513
501
  # @param href [String] A link to the Web API endpoint returning the full result of the request
514
502
  #
515
- # @param items [Array<Spotted::Models::ShowBase>]
516
- #
517
503
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
518
504
  #
519
505
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -523,6 +509,8 @@ module Spotted
523
509
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
524
510
  #
525
511
  # @param total [Integer] The total number of items available to return.
512
+ #
513
+ # @param items [Array<Spotted::Models::ShowBase>]
526
514
  end
527
515
 
528
516
  # @see Spotted::Models::SearchQueryResponse#tracks
@@ -533,11 +521,6 @@ module Spotted
533
521
  # @return [String]
534
522
  required :href, String
535
523
 
536
- # @!attribute items
537
- #
538
- # @return [Array<Spotted::Models::TrackObject>]
539
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::TrackObject] }
540
-
541
524
  # @!attribute limit
542
525
  # The maximum number of items in the response (as set in the query or by default).
543
526
  #
@@ -568,14 +551,17 @@ module Spotted
568
551
  # @return [Integer]
569
552
  required :total, Integer
570
553
 
571
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
554
+ # @!attribute items
555
+ #
556
+ # @return [Array<Spotted::Models::TrackObject>, nil]
557
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::TrackObject] }
558
+
559
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
572
560
  # Some parameter documentations has been truncated, see
573
561
  # {Spotted::Models::SearchQueryResponse::Tracks} for more details.
574
562
  #
575
563
  # @param href [String] A link to the Web API endpoint returning the full result of the request
576
564
  #
577
- # @param items [Array<Spotted::Models::TrackObject>]
578
- #
579
565
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
580
566
  #
581
567
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -585,6 +571,8 @@ module Spotted
585
571
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
586
572
  #
587
573
  # @param total [Integer] The total number of items available to return.
574
+ #
575
+ # @param items [Array<Spotted::Models::TrackObject>]
588
576
  end
589
577
  end
590
578
  end
@@ -101,8 +101,8 @@ module Spotted
101
101
  # @!attribute type
102
102
  # The object type.
103
103
  #
104
- # @return [Symbol, Spotted::Models::ShowBase::Type]
105
- required :type, enum: -> { Spotted::ShowBase::Type }
104
+ # @return [Symbol, :show]
105
+ required :type, const: :show
106
106
 
107
107
  # @!attribute uri
108
108
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -111,7 +111,7 @@ module Spotted
111
111
  # @return [String]
112
112
  required :uri, String
113
113
 
114
- # @!method initialize(id:, available_markets:, copyrights:, description:, explicit:, external_urls:, href:, html_description:, images:, is_externally_hosted:, languages:, media_type:, name:, publisher:, total_episodes:, type:, uri:)
114
+ # @!method initialize(id:, available_markets:, copyrights:, description:, explicit:, external_urls:, href:, html_description:, images:, is_externally_hosted:, languages:, media_type:, name:, publisher:, total_episodes:, uri:, type: :show)
115
115
  # Some parameter documentations has been truncated, see
116
116
  # {Spotted::Models::ShowBase} for more details.
117
117
  #
@@ -145,21 +145,9 @@ module Spotted
145
145
  #
146
146
  # @param total_episodes [Integer] The total number of episodes in the show.
147
147
  #
148
- # @param type [Symbol, Spotted::Models::ShowBase::Type] The object type.
149
- #
150
148
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the show
151
-
152
- # The object type.
153
149
  #
154
- # @see Spotted::Models::ShowBase#type
155
- module Type
156
- extend Spotted::Internal::Type::Enum
157
-
158
- SHOW = :show
159
-
160
- # @!method self.values
161
- # @return [Array<Symbol>]
162
- end
150
+ # @param type [Symbol, :show] The object type.
163
151
  end
164
152
  end
165
153
  end
@@ -23,11 +23,6 @@ module Spotted
23
23
  # @return [String]
24
24
  required :href, String
25
25
 
26
- # @!attribute items
27
- #
28
- # @return [Array<Spotted::Models::SimplifiedEpisodeObject>]
29
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedEpisodeObject] }
30
-
31
26
  # @!attribute limit
32
27
  # The maximum number of items in the response (as set in the query or by default).
33
28
  #
@@ -58,7 +53,12 @@ module Spotted
58
53
  # @return [Integer]
59
54
  required :total, Integer
60
55
 
61
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
56
+ # @!attribute items
57
+ #
58
+ # @return [Array<Spotted::Models::SimplifiedEpisodeObject>, nil]
59
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedEpisodeObject] }
60
+
61
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
62
62
  # Some parameter documentations has been truncated, see
63
63
  # {Spotted::Models::ShowRetrieveResponse::Episodes} for more details.
64
64
  #
@@ -66,8 +66,6 @@ module Spotted
66
66
  #
67
67
  # @param href [String] A link to the Web API endpoint returning the full result of the request
68
68
  #
69
- # @param items [Array<Spotted::Models::SimplifiedEpisodeObject>]
70
- #
71
69
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
72
70
  #
73
71
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -77,6 +75,8 @@ module Spotted
77
75
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
78
76
  #
79
77
  # @param total [Integer] The total number of items available to return.
78
+ #
79
+ # @param items [Array<Spotted::Models::SimplifiedEpisodeObject>]
80
80
  end
81
81
  end
82
82
  end
@@ -105,8 +105,8 @@ module Spotted
105
105
  # @!attribute type
106
106
  # The object type.
107
107
  #
108
- # @return [Symbol, Spotted::Models::SimplifiedChapterObject::Type]
109
- required :type, enum: -> { Spotted::SimplifiedChapterObject::Type }
108
+ # @return [Symbol, :episode]
109
+ required :type, const: :episode
110
110
 
111
111
  # @!attribute uri
112
112
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -135,7 +135,7 @@ module Spotted
135
135
  # @return [Spotted::Models::ResumePointObject, nil]
136
136
  optional :resume_point, -> { Spotted::ResumePointObject }
137
137
 
138
- # @!method initialize(id:, audio_preview_url:, chapter_number:, description:, duration_ms:, explicit:, external_urls:, href:, html_description:, images:, is_playable:, languages:, name:, release_date:, release_date_precision:, type:, uri:, available_markets: nil, restrictions: nil, resume_point: nil)
138
+ # @!method initialize(id:, audio_preview_url:, chapter_number:, description:, duration_ms:, explicit:, external_urls:, href:, html_description:, images:, is_playable:, languages:, name:, release_date:, release_date_precision:, uri:, available_markets: nil, restrictions: nil, resume_point: nil, type: :episode)
139
139
  # Some parameter documentations has been truncated, see
140
140
  # {Spotted::Models::SimplifiedChapterObject} for more details.
141
141
  #
@@ -169,8 +169,6 @@ module Spotted
169
169
  #
170
170
  # @param release_date_precision [Symbol, Spotted::Models::SimplifiedChapterObject::ReleaseDatePrecision] The precision with which `release_date` value is known.
171
171
  #
172
- # @param type [Symbol, Spotted::Models::SimplifiedChapterObject::Type] The object type.
173
- #
174
172
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chap
175
173
  #
176
174
  # @param available_markets [Array<String>] A list of the countries in which the chapter can be played, identified by their
@@ -178,6 +176,8 @@ module Spotted
178
176
  # @param restrictions [Spotted::Models::ChapterRestrictionObject] Included in the response when a content restriction is applied.
179
177
  #
180
178
  # @param resume_point [Spotted::Models::ResumePointObject] The user's most recent position in the chapter. Set if the supplied access token
179
+ #
180
+ # @param type [Symbol, :episode] The object type.
181
181
 
182
182
  # The precision with which `release_date` value is known.
183
183
  #
@@ -192,18 +192,6 @@ module Spotted
192
192
  # @!method self.values
193
193
  # @return [Array<Symbol>]
194
194
  end
195
-
196
- # The object type.
197
- #
198
- # @see Spotted::Models::SimplifiedChapterObject#type
199
- module Type
200
- extend Spotted::Internal::Type::Enum
201
-
202
- EPISODE = :episode
203
-
204
- # @!method self.values
205
- # @return [Array<Symbol>]
206
- end
207
195
  end
208
196
  end
209
197
  end
@@ -104,8 +104,8 @@ module Spotted
104
104
  # @!attribute type
105
105
  # The object type.
106
106
  #
107
- # @return [Symbol, Spotted::Models::SimplifiedEpisodeObject::Type]
108
- required :type, enum: -> { Spotted::SimplifiedEpisodeObject::Type }
107
+ # @return [Symbol, :episode]
108
+ required :type, const: :episode
109
109
 
110
110
  # @!attribute uri
111
111
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -137,7 +137,7 @@ module Spotted
137
137
  # @return [Spotted::Models::ResumePointObject, nil]
138
138
  optional :resume_point, -> { Spotted::ResumePointObject }
139
139
 
140
- # @!method initialize(id:, audio_preview_url:, description:, duration_ms:, explicit:, external_urls:, href:, html_description:, images:, is_externally_hosted:, is_playable:, languages:, name:, release_date:, release_date_precision:, type:, uri:, language: nil, restrictions: nil, resume_point: nil)
140
+ # @!method initialize(id:, audio_preview_url:, description:, duration_ms:, explicit:, external_urls:, href:, html_description:, images:, is_externally_hosted:, is_playable:, languages:, name:, release_date:, release_date_precision:, uri:, language: nil, restrictions: nil, resume_point: nil, type: :episode)
141
141
  # Some parameter documentations has been truncated, see
142
142
  # {Spotted::Models::SimplifiedEpisodeObject} for more details.
143
143
  #
@@ -171,8 +171,6 @@ module Spotted
171
171
  #
172
172
  # @param release_date_precision [Symbol, Spotted::Models::SimplifiedEpisodeObject::ReleaseDatePrecision] The precision with which `release_date` value is known.
173
173
  #
174
- # @param type [Symbol, Spotted::Models::SimplifiedEpisodeObject::Type] The object type.
175
- #
176
174
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the epis
177
175
  #
178
176
  # @param language [String] The language used in the episode, identified by a [ISO 639](https://en.wikipedia
@@ -180,6 +178,8 @@ module Spotted
180
178
  # @param restrictions [Spotted::Models::EpisodeRestrictionObject] Included in the response when a content restriction is applied.
181
179
  #
182
180
  # @param resume_point [Spotted::Models::ResumePointObject] The user's most recent position in the episode. Set if the supplied access token
181
+ #
182
+ # @param type [Symbol, :episode] The object type.
183
183
 
184
184
  # The precision with which `release_date` value is known.
185
185
  #
@@ -194,18 +194,6 @@ module Spotted
194
194
  # @!method self.values
195
195
  # @return [Array<Symbol>]
196
196
  end
197
-
198
- # The object type.
199
- #
200
- # @see Spotted::Models::SimplifiedEpisodeObject#type
201
- module Type
202
- extend Spotted::Internal::Type::Enum
203
-
204
- EPISODE = :episode
205
-
206
- # @!method self.values
207
- # @return [Array<Symbol>]
208
- end
209
197
  end
210
198
  end
211
199
  end
@@ -267,8 +267,8 @@ module Spotted
267
267
  # @!attribute type
268
268
  # The object type.
269
269
  #
270
- # @return [Symbol, Spotted::Models::TrackObject::Album::Type]
271
- required :type, enum: -> { Spotted::TrackObject::Album::Type }
270
+ # @return [Symbol, :album]
271
+ required :type, const: :album
272
272
 
273
273
  # @!attribute uri
274
274
  # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
@@ -283,7 +283,7 @@ module Spotted
283
283
  # @return [Spotted::Models::AlbumRestrictionObject, nil]
284
284
  optional :restrictions, -> { Spotted::AlbumRestrictionObject }
285
285
 
286
- # @!method initialize(id:, album_type:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, type:, uri:, restrictions: nil)
286
+ # @!method initialize(id:, album_type:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, uri:, restrictions: nil, type: :album)
287
287
  # Some parameter documentations has been truncated, see
288
288
  # {Spotted::Models::TrackObject::Album} for more details.
289
289
  #
@@ -312,11 +312,11 @@ module Spotted
312
312
  #
313
313
  # @param total_tracks [Integer] The number of tracks in the album.
314
314
  #
315
- # @param type [Symbol, Spotted::Models::TrackObject::Album::Type] The object type.
316
- #
317
315
  # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu
318
316
  #
319
317
  # @param restrictions [Spotted::Models::AlbumRestrictionObject] Included in the response when a content restriction is applied.
318
+ #
319
+ # @param type [Symbol, :album] The object type.
320
320
 
321
321
  # The type of the album.
322
322
  #
@@ -345,18 +345,6 @@ module Spotted
345
345
  # @!method self.values
346
346
  # @return [Array<Symbol>]
347
347
  end
348
-
349
- # The object type.
350
- #
351
- # @see Spotted::Models::TrackObject::Album#type
352
- module Type
353
- extend Spotted::Internal::Type::Enum
354
-
355
- ALBUM = :album
356
-
357
- # @!method self.values
358
- # @return [Array<Symbol>]
359
- end
360
348
  end
361
349
 
362
350
  # The object type: "track".
@@ -158,11 +158,6 @@ module Spotted
158
158
  # @return [String]
159
159
  required :href, String
160
160
 
161
- # @!attribute items
162
- #
163
- # @return [Array<Spotted::Models::PlaylistTrackObject>]
164
- required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::PlaylistTrackObject] }
165
-
166
161
  # @!attribute limit
167
162
  # The maximum number of items in the response (as set in the query or by default).
168
163
  #
@@ -193,7 +188,12 @@ module Spotted
193
188
  # @return [Integer]
194
189
  required :total, Integer
195
190
 
196
- # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:)
191
+ # @!attribute items
192
+ #
193
+ # @return [Array<Spotted::Models::PlaylistTrackObject>, nil]
194
+ optional :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::PlaylistTrackObject] }
195
+
196
+ # @!method initialize(href:, limit:, next_:, offset:, previous:, total:, items: nil)
197
197
  # Some parameter documentations has been truncated, see
198
198
  # {Spotted::Models::Users::PlaylistCreateResponse::Tracks} for more details.
199
199
  #
@@ -201,8 +201,6 @@ module Spotted
201
201
  #
202
202
  # @param href [String] A link to the Web API endpoint returning the full result of the request
203
203
  #
204
- # @param items [Array<Spotted::Models::PlaylistTrackObject>]
205
- #
206
204
  # @param limit [Integer] The maximum number of items in the response (as set in the query or by default).
207
205
  #
208
206
  # @param next_ [String, nil] URL to the next page of items. ( `null` if none)
@@ -212,6 +210,8 @@ module Spotted
212
210
  # @param previous [String, nil] URL to the previous page of items. ( `null` if none)
213
211
  #
214
212
  # @param total [Integer] The total number of items available to return.
213
+ #
214
+ # @param items [Array<Spotted::Models::PlaylistTrackObject>]
215
215
  end
216
216
  end
217
217
  end
@@ -9,14 +9,14 @@ module Spotted
9
9
  #
10
10
  # Get the current user's followed artists.
11
11
  #
12
- # @overload bulk_retrieve(type:, after: nil, limit: nil, request_options: {})
13
- #
14
- # @param type [Symbol, Spotted::Models::Me::FollowingBulkRetrieveParams::Type] The ID type: currently only `artist` is supported.
12
+ # @overload bulk_retrieve(after: nil, limit: nil, type: :artist, request_options: {})
15
13
  #
16
14
  # @param after [String] The last artist ID retrieved from the previous request.
17
15
  #
18
16
  # @param limit [Integer] The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
19
17
  #
18
+ # @param type [Symbol, :artist] The ID type: currently only `artist` is supported.
19
+ #
20
20
  # @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
21
21
  #
22
22
  # @return [Spotted::Models::Me::FollowingBulkRetrieveResponse]
@@ -17,7 +17,7 @@ module Spotted
17
17
  #
18
18
  # @param request_options [Spotted::RequestOptions, Hash{Symbol=>Object}, nil]
19
19
  #
20
- # @return [nil]
20
+ # @return [StringIO]
21
21
  #
22
22
  # @see Spotted::Models::Playlists::ImageUpdateParams
23
23
  def update(playlist_id, params)
@@ -25,9 +25,9 @@ module Spotted
25
25
  @client.request(
26
26
  method: :put,
27
27
  path: ["playlists/%1$s/images", playlist_id],
28
- headers: {"content-type" => "image/jpeg"},
28
+ headers: {"content-type" => "image/jpeg", "accept" => "application/binary"},
29
29
  body: parsed[:body],
30
- model: NilClass,
30
+ model: StringIO,
31
31
  options: options
32
32
  )
33
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotted
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.0"
5
5
  end