-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathspotify-openapi.ts
4769 lines (4762 loc) · 165 KB
/
spotify-openapi.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
/** WithRequired type helpers */
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
export interface paths {
"/albums/{id}": {
/**
* Get Album
*
* @description Get Spotify catalog information for a single album.
*/
get: operations["get-an-album"];
};
"/albums": {
/**
* Get Several Albums
*
* @description Get Spotify catalog information for multiple albums identified by their Spotify IDs.
*/
get: operations["get-multiple-albums"];
};
"/albums/{id}/tracks": {
/**
* Get Album Tracks
*
* @description Get Spotify catalog information about an album’s tracks.
* Optional parameters can be used to limit the number of tracks returned.
*/
get: operations["get-an-albums-tracks"];
};
"/artists/{id}": {
/**
* Get Artist
*
* @description Get Spotify catalog information for a single artist identified by their unique Spotify ID.
*/
get: operations["get-an-artist"];
};
"/artists": {
/**
* Get Several Artists
*
* @description Get Spotify catalog information for several artists based on their Spotify IDs.
*/
get: operations["get-multiple-artists"];
};
"/artists/{id}/albums": {
/**
* Get Artist's Albums
*
* @description Get Spotify catalog information about an artist's albums.
*/
get: operations["get-an-artists-albums"];
};
"/artists/{id}/top-tracks": {
/**
* Get Artist's Top Tracks
*
* @description Get Spotify catalog information about an artist's top tracks by country.
*/
get: operations["get-an-artists-top-tracks"];
};
"/artists/{id}/related-artists": {
/**
* Get Artist's Related Artists
*
* @description Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.
*/
get: operations["get-an-artists-related-artists"];
};
"/shows/{id}": {
/**
* Get Show
*
* @description Get Spotify catalog information for a single show identified by its
* unique Spotify ID.
*/
get: operations["get-a-show"];
};
"/shows": {
/**
* Get Several Shows
*
* @description Get Spotify catalog information for several shows based on their Spotify IDs.
*/
get: operations["get-multiple-shows"];
};
"/shows/{id}/episodes": {
/**
* Get Show Episodes
*
* @description Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned.
*/
get: operations["get-a-shows-episodes"];
};
"/episodes/{id}": {
/**
* Get Episode
*
* @description Get Spotify catalog information for a single episode identified by its
* unique Spotify ID.
*/
get: operations["get-an-episode"];
};
"/episodes": {
/**
* Get Several Episodes
*
* @description Get Spotify catalog information for several episodes based on their Spotify IDs.
*/
get: operations["get-multiple-episodes"];
};
"/audiobooks/{id}": {
/**
* Get an Audiobook
*
* @description Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["get-an-audiobook"];
};
"/audiobooks": {
/**
* Get Several Audiobooks
*
* @description Get Spotify catalog information for several audiobooks identified by their Spotify IDs. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["get-multiple-audiobooks"];
};
"/audiobooks/{id}/chapters": {
/**
* Get Audiobook Chapters
*
* @description Get Spotify catalog information about an audiobook's chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["get-audiobook-chapters"];
};
"/me/audiobooks": {
/**
* Get User's Saved Audiobooks
*
* @description Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library.
*/
get: operations["get-users-saved-audiobooks"];
/**
* Save Audiobooks for Current User
*
* @description Save one or more audiobooks to the current Spotify user's library.
*/
put: operations["save-audiobooks-user"];
/**
* Remove User's Saved Audiobooks
*
* @description Remove one or more audiobooks from the Spotify user's library.
*/
delete: operations["remove-audiobooks-user"];
};
"/me/audiobooks/contains": {
/**
* Check User's Saved Audiobooks
*
* @description Check if one or more audiobooks are already saved in the current Spotify user's library.
*/
get: operations["check-users-saved-audiobooks"];
};
"/chapters/{id}": {
/**
* Get a Chapter
*
* @description Get Spotify catalog information for a single audiobook chapter. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["get-a-chapter"];
};
"/chapters": {
/**
* Get Several Chapters
*
* @description Get Spotify catalog information for several audiobook chapters identified by their Spotify IDs. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["get-several-chapters"];
};
"/tracks/{id}": {
/**
* Get Track
*
* @description Get Spotify catalog information for a single track identified by its
* unique Spotify ID.
*/
get: operations["get-track"];
};
"/tracks": {
/**
* Get Several Tracks
*
* @description Get Spotify catalog information for multiple tracks based on their Spotify IDs.
*/
get: operations["get-several-tracks"];
};
"/search": {
/**
* Search for Item
*
* @description Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks
* that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
*/
get: operations["search"];
};
"/me": {
/**
* Get Current User's Profile
*
* @description Get detailed profile information about the current user (including the
* current user's username).
*/
get: operations["get-current-users-profile"];
};
"/playlists/{playlist_id}": {
/**
* Get Playlist
*
* @description Get a playlist owned by a Spotify user.
*/
get: operations["get-playlist"];
/**
* Change Playlist Details
*
* @description Change a playlist's name and public/private state. (The user must, of
* course, own the playlist.)
*/
put: operations["change-playlist-details"];
};
"/playlists/{playlist_id}/tracks": {
/**
* Get Playlist Items
*
* @description Get full details of the items of a playlist owned by a Spotify user.
*/
get: operations["get-playlists-tracks"];
/**
* Update Playlist Items
*
* @description Either reorder or replace items in a playlist depending on the request's parameters.
* To reorder items, include `range_start`, `insert_before`, `range_length` and `snapshot_id` in the request's body.
* To replace items, include `uris` as either a query parameter or in the request's body.
* Replacing items in a playlist will overwrite its existing items. This operation can be used for replacing or clearing items in a playlist.
* <br/>
* **Note**: Replace and reorder are mutually exclusive operations which share the same endpoint, but have different parameters.
* These operations can't be applied together in a single request.
*/
put: operations["reorder-or-replace-playlists-tracks"];
/**
* Add Items to Playlist
*
* @description Add one or more items to a user's playlist.
*/
post: operations["add-tracks-to-playlist"];
/**
* Remove Playlist Items
*
* @description Remove one or more items from a user's playlist.
*/
delete: operations["remove-tracks-playlist"];
};
"/me/playlists": {
/**
* Get Current User's Playlists
*
* @description Get a list of the playlists owned or followed by the current Spotify
* user.
*/
get: operations["get-a-list-of-current-users-playlists"];
};
"/me/albums": {
/**
* Get User's Saved Albums
*
* @description Get a list of the albums saved in the current Spotify user's 'Your Music' library.
*/
get: operations["get-users-saved-albums"];
/**
* Save Albums for Current User
*
* @description Save one or more albums to the current user's 'Your Music' library.
*/
put: operations["save-albums-user"];
/**
* Remove Users' Saved Albums
*
* @description Remove one or more albums from the current user's 'Your Music' library.
*/
delete: operations["remove-albums-user"];
};
"/me/albums/contains": {
/**
* Check User's Saved Albums
*
* @description Check if one or more albums is already saved in the current Spotify user's 'Your Music' library.
*/
get: operations["check-users-saved-albums"];
};
"/me/tracks": {
/**
* Get User's Saved Tracks
*
* @description Get a list of the songs saved in the current Spotify user's 'Your Music' library.
*/
get: operations["get-users-saved-tracks"];
/**
* Save Tracks for Current User
*
* @description Save one or more tracks to the current user's 'Your Music' library.
*/
put: operations["save-tracks-user"];
/**
* Remove User's Saved Tracks
*
* @description Remove one or more tracks from the current user's 'Your Music' library.
*/
delete: operations["remove-tracks-user"];
};
"/me/tracks/contains": {
/**
* Check User's Saved Tracks
*
* @description Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library.
*/
get: operations["check-users-saved-tracks"];
};
"/me/episodes": {
/**
* Get User's Saved Episodes
*
* @description Get a list of the episodes saved in the current Spotify user's library.<br/>
* This API endpoint is in __beta__ and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
*/
get: operations["get-users-saved-episodes"];
/**
* Save Episodes for Current User
*
* @description Save one or more episodes to the current user's library.<br/>
* This API endpoint is in __beta__ and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
*/
put: operations["save-episodes-user"];
/**
* Remove User's Saved Episodes
*
* @description Remove one or more episodes from the current user's library.<br/>
* This API endpoint is in __beta__ and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).
*/
delete: operations["remove-episodes-user"];
};
"/me/episodes/contains": {
/**
* Check User's Saved Episodes
*
* @description Check if one or more episodes is already saved in the current Spotify user's 'Your Episodes' library.<br/>
* This API endpoint is in __beta__ and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer)..
*/
get: operations["check-users-saved-episodes"];
};
"/me/shows": {
/**
* Get User's Saved Shows
*
* @description Get a list of shows saved in the current Spotify user's library. Optional parameters can be used to limit the number of shows returned.
*/
get: operations["get-users-saved-shows"];
/**
* Save Shows for Current User
*
* @description Save one or more shows to current Spotify user's library.
*/
put: operations["save-shows-user"];
/**
* Remove User's Saved Shows
*
* @description Delete one or more shows from current Spotify user's library.
*/
delete: operations["remove-shows-user"];
};
"/me/shows/contains": {
/**
* Check User's Saved Shows
*
* @description Check if one or more shows is already saved in the current Spotify user's library.
*/
get: operations["check-users-saved-shows"];
};
"/me/top/{type}": {
/**
* Get User's Top Items
*
* @description Get the current user's top artists or tracks based on calculated affinity.
*/
get: operations["get-users-top-artists-and-tracks"];
};
"/users/{user_id}": {
/**
* Get User's Profile
*
* @description Get public profile information about a Spotify user.
*/
get: operations["get-users-profile"];
};
"/users/{user_id}/playlists": {
/**
* Get User's Playlists
*
* @description Get a list of the playlists owned or followed by a Spotify user.
*/
get: operations["get-list-users-playlists"];
/**
* Create Playlist
*
* @description Create a playlist for a Spotify user. (The playlist will be empty until
* you [add tracks](/documentation/web-api/reference/add-tracks-to-playlist).)
* Each user is generally limited to a maximum of 11000 playlists.
*/
post: operations["create-playlist"];
};
"/playlists/{playlist_id}/followers": {
/**
* Follow Playlist
*
* @description Add the current user as a follower of a playlist.
*/
put: operations["follow-playlist"];
/**
* Unfollow Playlist
*
* @description Remove the current user as a follower of a playlist.
*/
delete: operations["unfollow-playlist"];
};
"/browse/featured-playlists": {
/**
* Get Featured Playlists
*
* @description Get a list of Spotify featured playlists (shown, for example, on a Spotify player's 'Browse' tab).
*/
get: operations["get-featured-playlists"];
};
"/browse/categories": {
/**
* Get Several Browse Categories
*
* @description Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
*/
get: operations["get-categories"];
};
"/browse/categories/{category_id}": {
/**
* Get Single Browse Category
*
* @description Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
*/
get: operations["get-a-category"];
};
"/browse/categories/{category_id}/playlists": {
/**
* Get Category's Playlists
*
* @description Get a list of Spotify playlists tagged with a particular category.
*/
get: operations["get-a-categories-playlists"];
};
"/playlists/{playlist_id}/images": {
/**
* Get Playlist Cover Image
*
* @description Get the current image associated with a specific playlist.
*/
get: operations["get-playlist-cover"];
/**
* Add Custom Playlist Cover Image
*
* @description Replace the image used to represent a specific playlist.
*/
put: operations["upload-custom-playlist-cover"];
};
"/browse/new-releases": {
/**
* Get New Releases
*
* @description Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
*/
get: operations["get-new-releases"];
};
"/me/following": {
/**
* Get Followed Artists
*
* @description Get the current user's followed artists.
*/
get: operations["get-followed"];
/**
* Follow Artists or Users
*
* @description Add the current user as a follower of one or more artists or other Spotify users.
*/
put: operations["follow-artists-users"];
/**
* Unfollow Artists or Users
*
* @description Remove the current user as a follower of one or more artists or other Spotify users.
*/
delete: operations["unfollow-artists-users"];
};
"/me/following/contains": {
/**
* Check If User Follows Artists or Users
*
* @description Check to see if the current user is following one or more artists or other Spotify users.
*/
get: operations["check-current-user-follows"];
};
"/playlists/{playlist_id}/followers/contains": {
/**
* Check if Users Follow Playlist
*
* @description Check to see if one or more Spotify users are following a specified playlist.
*/
get: operations["check-if-user-follows-playlist"];
};
"/audio-features": {
/**
* Get Several Tracks' Audio Features
*
* @description Get audio features for multiple tracks based on their Spotify IDs.
*/
get: operations["get-several-audio-features"];
};
"/audio-features/{id}": {
/**
* Get Track's Audio Features
*
* @description Get audio feature information for a single track identified by its unique
* Spotify ID.
*/
get: operations["get-audio-features"];
};
"/audio-analysis/{id}": {
/**
* Get Track's Audio Analysis
*
* @description Get a low-level audio analysis for a track in the Spotify catalog. The audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.
*/
get: operations["get-audio-analysis"];
};
"/recommendations": {
/**
* Get Recommendations
*
* @description Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.
*
* For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.
*/
get: operations["get-recommendations"];
};
"/recommendations/available-genre-seeds": {
/**
* Get Available Genre Seeds
*
* @description Retrieve a list of available genres seed parameter values for [recommendations](/documentation/web-api/reference/get-recommendations).
*/
get: operations["get-recommendation-genres"];
};
"/me/player": {
/**
* Get Playback State
*
* @description Get information about the user’s current playback state, including track or episode, progress, and active device.
*/
get: operations["get-information-about-the-users-current-playback"];
/**
* Transfer Playback
*
* @description Transfer playback to a new device and optionally begin playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["transfer-a-users-playback"];
};
"/me/player/devices": {
/**
* Get Available Devices
*
* @description Get information about a user’s available Spotify Connect devices. Some device models are not supported and will not be listed in the API response.
*/
get: operations["get-a-users-available-devices"];
};
"/me/player/currently-playing": {
/**
* Get Currently Playing Track
*
* @description Get the object currently being played on the user's Spotify account.
*/
get: operations["get-the-users-currently-playing-track"];
};
"/me/player/play": {
/**
* Start/Resume Playback
*
* @description Start a new context or resume current playback on the user's active device. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["start-a-users-playback"];
};
"/me/player/pause": {
/**
* Pause Playback
*
* @description Pause playback on the user's account. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["pause-a-users-playback"];
};
"/me/player/next": {
/**
* Skip To Next
*
* @description Skips to next track in the user’s queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
post: operations["skip-users-playback-to-next-track"];
};
"/me/player/previous": {
/**
* Skip To Previous
*
* @description Skips to previous track in the user’s queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
post: operations["skip-users-playback-to-previous-track"];
};
"/me/player/seek": {
/**
* Seek To Position
*
* @description Seeks to the given position in the user’s currently playing track. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["seek-to-position-in-currently-playing-track"];
};
"/me/player/repeat": {
/**
* Set Repeat Mode
*
* @description Set the repeat mode for the user's playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["set-repeat-mode-on-users-playback"];
};
"/me/player/volume": {
/**
* Set Playback Volume
*
* @description Set the volume for the user’s current playback device. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["set-volume-for-users-playback"];
};
"/me/player/shuffle": {
/**
* Toggle Playback Shuffle
*
* @description Toggle shuffle on or off for user’s playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
put: operations["toggle-shuffle-for-users-playback"];
};
"/me/player/recently-played": {
/**
* Get Recently Played Tracks
*
* @description Get tracks from the current user's recently played tracks.
* _**Note**: Currently doesn't support podcast episodes._
*/
get: operations["get-recently-played"];
};
"/me/player/queue": {
/**
* Get the User's Queue
*
* @description Get the list of objects that make up the user's queue.
*/
get: operations["get-queue"];
/**
* Add Item to Playback Queue
*
* @description Add an item to the end of the user's current playback queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.
*/
post: operations["add-to-queue"];
};
"/markets": {
/**
* Get Available Markets
*
* @description Get the list of markets where Spotify is available.
*/
get: operations["get-available-markets"];
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
LinkedTrackObject: {
/** @description Known external URLs for this track. */
external_urls?: components["schemas"]["ExternalUrlObject"];
/** @description A link to the Web API endpoint providing full details of the track. */
href?: string;
/** @description The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track. */
id?: string;
/** @description The object type: "track". */
type?: string;
/** @description The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the track. */
uri?: string;
};
TrackRestrictionObject: {
/**
* @description The reason for the restriction. Supported values:
* - `market` - The content item is not available in the given market.
* - `product` - The content item is not available for the user's subscription type.
* - `explicit` - The content item is explicit and the user's account is set to not play explicit content.
*
* Additional reasons may be added in the future.
* **Note**: If you use this field, make sure that your application safely handles unknown values.
*/
reason?: string;
};
AlbumRestrictionObject: {
/**
* @description The reason for the restriction. Albums may be restricted if the content is not available in a given market, to the user's subscription type, or when the user's account is set to not play explicit content.
* Additional reasons may be added in the future.
*
* @enum {string}
*/
reason?: "market" | "product" | "explicit";
};
EpisodeRestrictionObject: {
/**
* @description The reason for the restriction. Supported values:
* - `market` - The content item is not available in the given market.
* - `product` - The content item is not available for the user's subscription type.
* - `explicit` - The content item is explicit and the user's account is set to not play explicit content.
*
* Additional reasons may be added in the future.
* **Note**: If you use this field, make sure that your application safely handles unknown values.
*/
reason?: string;
};
ChapterRestrictionObject: {
/**
* @description The reason for the restriction. Supported values:
* - `market` - The content item is not available in the given market.
* - `product` - The content item is not available for the user's subscription type.
* - `explicit` - The content item is explicit and the user's account is set to not play explicit content.
* - `payment_required` - Payment is required to play the content item.
*
* Additional reasons may be added in the future.
* **Note**: If you use this field, make sure that your application safely handles unknown values.
*/
reason?: string;
};
ArtistObject: {
type: "ArtistObject";
/** @description Known external URLs for this artist. */
external_urls?: {
type: "ArtistObject";
} & components["schemas"]["ExternalUrlObject"];
/** @description Information about the followers of the artist. */
followers?: {
type: "ArtistObject";
} & components["schemas"]["FollowersObject"];
/**
* @description A list of the genres the artist is associated with. If not yet classified, the array is empty.
*
* @example [
* "Prog rock",
* "Grunge"
* ]
*/
genres?: string[];
/** @description A link to the Web API endpoint providing full details of the artist. */
href?: string;
/** @description The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the artist. */
id?: string;
/** @description Images of the artist in various sizes, widest first. */
images?: components["schemas"]["ImageObject"][];
/** @description The name of the artist. */
name?: string;
/** @description The popularity of the artist. The value will be between 0 and 100, with 100 being the most popular. The artist's popularity is calculated from the popularity of all the artist's tracks. */
popularity?: number;
/**
* @description The object type.
*
* @enum {string}
*/
type?: "artist";
/** @description The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the artist. */
uri?: string;
};
SimplifiedArtistObject: {
/** @description Known external URLs for this artist. */
external_urls?: components["schemas"]["ExternalUrlObject"];
/** @description A link to the Web API endpoint providing full details of the artist. */
href?: string;
/** @description The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the artist. */
id?: string;
/** @description The name of the artist. */
name?: string;
/**
* @description The object type.
*
* @enum {string}
*/
type?: "artist";
/** @description The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the artist. */
uri?: string;
};
PlayHistoryObject: {
/** @description The track the user listened to. */
track?: components["schemas"]["TrackObject"];
/**
* Format: date-time
* @description The date and time the track was played.
*/
played_at?: string;
/** @description The context the track was played from. */
context?: components["schemas"]["ContextObject"];
};
PlaylistTrackObject: {
/**
* Format: date-time
* @description The date and time the track or episode was added. _**Note**: some very old playlists may return `null` in this field._
*/
added_at?: string;
/** @description The Spotify user who added the track or episode. _**Note**: some very old playlists may return `null` in this field._ */
added_by?: components["schemas"]["PlaylistUserObject"];
/** @description Whether this track or episode is a [local file](/documentation/web-api/concepts/playlists/#local-files) or not. */
is_local?: boolean;
/** @description Information about the track or episode. */
track?:
| components["schemas"]["TrackObject"]
| components["schemas"]["EpisodeObject"];
};
QueueObject: {
/** @description The currently playing track or episode. Can be `null`. */
currently_playing?:
| components["schemas"]["TrackObject"]
| components["schemas"]["EpisodeObject"];
/** @description The tracks or episodes in the queue. Can be empty. */
queue?: (
| components["schemas"]["TrackObject"]
| components["schemas"]["EpisodeObject"]
)[];
};
CurrentlyPlayingContextObject: {
/** @description The device that is currently active. */
device?: components["schemas"]["DeviceObject"];
/** @description off, track, context */
repeat_state?: string;
/** @description If shuffle is on or off. */
shuffle_state?: boolean;
/** @description A Context Object. Can be `null`. */
context?: components["schemas"]["ContextObject"];
/** @description Unix Millisecond Timestamp when data was fetched. */
timestamp?: number;
/** @description Progress into the currently playing track or episode. Can be `null`. */
progress_ms?: number;
/** @description If something is currently playing, return `true`. */
is_playing?: boolean;
/** @description The currently playing track or episode. Can be `null`. */
item?:
| components["schemas"]["TrackObject"]
| components["schemas"]["EpisodeObject"];
/** @description The object type of the currently playing item. Can be one of `track`, `episode`, `ad` or `unknown`. */
currently_playing_type?: string;
/** @description Allows to update the user interface based on which playback actions are available within the current context. */
actions?: components["schemas"]["DisallowsObject"];
};
DisallowsObject: {
/** @description Interrupting playback. Optional field. */
interrupting_playback?: boolean;
/** @description Pausing. Optional field. */
pausing?: boolean;
/** @description Resuming. Optional field. */
resuming?: boolean;
/** @description Seeking playback location. Optional field. */
seeking?: boolean;
/** @description Skipping to the next context. Optional field. */
skipping_next?: boolean;
/** @description Skipping to the previous context. Optional field. */
skipping_prev?: boolean;
/** @description Toggling repeat context flag. Optional field. */
toggling_repeat_context?: boolean;
/** @description Toggling shuffle flag. Optional field. */
toggling_shuffle?: boolean;
/** @description Toggling repeat track flag. Optional field. */
toggling_repeat_track?: boolean;
/** @description Transfering playback between devices. Optional field. */
transferring_playback?: boolean;
};
ErrorObject: {
/** @description The HTTP status code (also returned in the response header; see [Response Status Codes](/documentation/web-api/concepts/api-calls#response-status-codes) for more information). */
status: number;
/** @description A short description of the cause of the error. */
message: string;
};
PrivateUserObject: {
/** @description The country of the user, as set in the user's account profile. An [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). _This field is only available when the current user has granted access to the [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes) scope._ */
country?: string;
/** @description The name displayed on the user's profile. `null` if not available. */
display_name?: string;
/** @description The user's email address, as entered by the user when creating their account. _**Important!** This email address is unverified; there is no proof that it actually belongs to the user._ _This field is only available when the current user has granted access to the [user-read-email](/documentation/web-api/concepts/scopes/#list-of-scopes) scope._ */
email?: string;
/** @description The user's explicit content settings. _This field is only available when the current user has granted access to the [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes) scope._ */
explicit_content?: components["schemas"]["ExplicitContentSettingsObject"];
/** @description Known external URLs for this user. */
external_urls?: components["schemas"]["ExternalUrlObject"];
/** @description Information about the followers of the user. */
followers?: components["schemas"]["FollowersObject"];
/** @description A link to the Web API endpoint for this user. */
href?: string;
/** @description The [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids) for the user. */
id?: string;
/** @description The user's profile image. */
images?: components["schemas"]["ImageObject"][];
/** @description The user's Spotify subscription level: "premium", "free", etc. (The subscription level "open" can be considered the same as "free".) _This field is only available when the current user has granted access to the [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes) scope._ */
product?: string;
/** @description The object type: "user" */
type?: string;
/** @description The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the user. */
uri?: string;
};
PublicUserObject: {
/** @description The name displayed on the user's profile. `null` if not available. */
display_name?: string | null;
/** @description Known public external URLs for this user. */
external_urls?: components["schemas"]["ExternalUrlObject"];
/** @description Information about the followers of this user. */
followers?: components["schemas"]["FollowersObject"];
/** @description A link to the Web API endpoint for this user. */
href?: string;
/** @description The [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids) for this user. */
id?: string;
/** @description The user's profile image. */
images?: components["schemas"]["ImageObject"][];
/**
* @description The object type.
*
* @enum {string}
*/
type?: "user";
/** @description The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for this user. */
uri?: string;
};
AudioAnalysisObject: {
meta?: {
/**
* @description The version of the Analyzer used to analyze this track.
* @example 4.0.0
*/
analyzer_version?: string;
/**
* @description The platform used to read the track's audio data.
* @example Linux
*/
platform?: string;
/**
* @description A detailed status code for this track. If analysis data is missing, this code may explain why.
* @example OK
*/
detailed_status?: string;
/**
* @description The return code of the analyzer process. 0 if successful, 1 if any errors occurred.
* @example 0
*/
status_code?: number;
/**
* @description The Unix timestamp (in seconds) at which this track was analyzed.
* @example 1495193577
*/
timestamp?: number;
/**
* @description The amount of time taken to analyze this track.
* @example 6.93906
*/
analysis_time?: number;
/**
* @description The method used to read the track's audio data.
* @example libvorbisfile L+R 44100->22050
*/
input_process?: string;
};
track?: {
/**
* @description The exact number of audio samples analyzed from this track. See also `analysis_sample_rate`.
* @example 4585515
*/
num_samples?: number;
/**
* @description Length of the track in seconds.
* @example 207.95985
*/