Skip to content

Commit bcb746e

Browse files
authored
Update of Spotify's OpenAPI definition (#177)
* Automated update of Spotify's OpenAPI definition * Remove fixed patch
1 parent 8e4c094 commit bcb746e

File tree

3 files changed

+111
-29
lines changed

3 files changed

+111
-29
lines changed

fixed-spotify-open-api.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,12 @@ paths:
496496
497497
You can narrow down your search using field filters. The available filters are `album`, `artist`, `track`, `year`, `upc`, `tag:hipster`, `tag:new`, `isrc`, and `genre`. Each field filter only applies to certain result types.
498498
499-
The `artist` filter can be used while searching albums, artists or tracks.<br />
500-
The `album` and `year` filters can be used while searching albums or tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br />
501-
The `genre` filter can be use while searching tracks and artists.<br />
499+
The `artist` and `year` filters can be used while searching albums, artists and tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br />
500+
The `album` filter can be used while searching albums and tracks.<br />
501+
The `genre` filter can be used while searching artists and tracks.<br />
502502
The `isrc` and `track` filters can be used while searching tracks.<br />
503503
The `upc`, `tag:new` and `tag:hipster` filters can only be used while searching albums. The `tag:new` filter will return albums released in the past two weeks and `tag:hipster` can be used to return only albums with the lowest 10% popularity.<br />
504-
505-
You can also use the `NOT` operator to exclude keywords from your search.
506-
example: remaster%20track:Doxy+artist:Miles%20Davis
504+
example: remaster%20track:Doxy%20artist:Miles%20Davis
507505
type: string
508506
- name: type
509507
required: true
@@ -512,10 +510,9 @@ paths:
512510
schema:
513511
title: Item type
514512
description: |
515-
A comma-separated list of item types to search
516-
across. Search results include hits from all the specified item types. For
517-
example: `q=name:abacab&type=album,track` returns both albums and tracks
518-
with "abacab" included in their name.
513+
A comma-separated list of item types to search across. Search results include hits
514+
from all the specified item types. For example: `q=abacab&type=album,track` returns
515+
both albums and tracks matching "abacab".
519516
example: "track,artist"
520517
type: array
521518
items:
@@ -3427,6 +3424,28 @@ paths:
34273424
/me/player/queue:
34283425
x-spotify-docs-display-name: queue
34293426
x-spotify-docs-category: Player
3427+
get:
3428+
tags:
3429+
- Player
3430+
operationId: get-queue
3431+
x-spotify-docs-endpoint-name: Get the User's Queue
3432+
x-spotify-docs-console-url: /console/get-queue/
3433+
summary: |
3434+
Get the User's Queue
3435+
description: |
3436+
Get the list of objects that make up the user's queue.
3437+
responses:
3438+
"200":
3439+
$ref: '#/components/responses/Queue'
3440+
"401":
3441+
$ref: '#/components/responses/Unauthorized'
3442+
"403":
3443+
$ref: '#/components/responses/Forbidden'
3444+
"429":
3445+
$ref: '#/components/responses/TooManyRequests'
3446+
security:
3447+
- oauth_2_0:
3448+
- user-read-playback-state
34303449
post:
34313450
tags:
34323451
- Player
@@ -3955,6 +3974,12 @@ components:
39553974
- true
39563975
items:
39573976
type: boolean
3977+
Queue:
3978+
description: Information about the queue
3979+
content:
3980+
application/json:
3981+
schema:
3982+
$ref: '#/components/schemas/QueueObject'
39583983
OneCurrentlyPlaying:
39593984
description: Information about playback
39603985
content:
@@ -4326,6 +4351,24 @@ components:
43264351
type: string
43274352
description: |
43284353
The object type of the currently playing item. Can be one of `track`, `episode`, `ad` or `unknown`.
4354+
QueueObject:
4355+
type: object
4356+
x-spotify-docs-type: QueueObject
4357+
properties:
4358+
currently_playing:
4359+
oneOf:
4360+
- $ref: '#/components/schemas/TrackObject'
4361+
- $ref: '#/components/schemas/EpisodeObject'
4362+
x-spotify-docs-type: TrackObject | EpisodeObject
4363+
description: The currently playing track or episode. Can be `null`.
4364+
queue:
4365+
type: array
4366+
items:
4367+
oneOf:
4368+
- $ref: '#/components/schemas/TrackObject'
4369+
- $ref: '#/components/schemas/EpisodeObject'
4370+
x-spotify-docs-type: TrackObject | EpisodeObject
4371+
description: The tracks or episodes in the queue. Can be empty.
43294372
CurrentlyPlayingContextObject:
43304373
type: object
43314374
x-spotify-docs-type: CurrentlyPlayingContextObject

official-spotify-open-api.yml

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,13 @@ paths:
513513
514514
You can narrow down your search using field filters. The available filters are `album`, `artist`, `track`, `year`, `upc`, `tag:hipster`, `tag:new`, `isrc`, and `genre`. Each field filter only applies to certain result types.
515515
516-
The `artist` filter can be used while searching albums, artists or tracks.<br />
517-
The `album` and `year` filters can be used while searching albums or tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br />
518-
The `genre` filter can be use while searching tracks and artists.<br />
516+
The `artist` and `year` filters can be used while searching albums, artists and tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br />
517+
The `album` filter can be used while searching albums and tracks.<br />
518+
The `genre` filter can be used while searching artists and tracks.<br />
519519
The `isrc` and `track` filters can be used while searching tracks.<br />
520520
The `upc`, `tag:new` and `tag:hipster` filters can only be used while searching albums. The `tag:new` filter will return albums released in the past two weeks and `tag:hipster` can be used to return only albums with the lowest 10% popularity.<br />
521521
522-
You can also use the `NOT` operator to exclude keywords from your search.
523-
example: remaster%20track:Doxy+artist:Miles%20Davis
522+
example: remaster%20track:Doxy%20artist:Miles%20Davis
524523
type: string
525524
-
526525
name: type
@@ -530,10 +529,9 @@ paths:
530529
schema:
531530
title: Item type
532531
description: |
533-
A comma-separated list of item types to search
534-
across. Search results include hits from all the specified item types. For
535-
example: `q=name:abacab&type=album,track` returns both albums and tracks
536-
with "abacab" included in their name.
532+
A comma-separated list of item types to search across. Search results include hits
533+
from all the specified item types. For example: `q=abacab&type=album,track` returns
534+
both albums and tracks matching "abacab".
537535
example: track,artist
538536
enum:
539537
- album
@@ -3167,7 +3165,7 @@ paths:
31673165
- $ref: '#/components/parameters/QueryAdditionalTypes'
31683166
responses:
31693167
"200":
3170-
description: "#/components/responses/OneCurrentlyPlayingTrack"
3168+
$ref: "#/components/responses/OneCurrentlyPlayingTrack"
31713169
"401":
31723170
$ref: "#/components/responses/Unauthorized"
31733171
"403":
@@ -3178,6 +3176,7 @@ paths:
31783176
-
31793177
oauth_2_0:
31803178
- user-read-currently-playing
3179+
31813180
/me/player/play:
31823181
x-spotify-docs-display-name: play
31833182
x-spotify-docs-category: Player
@@ -3631,6 +3630,29 @@ paths:
36313630
/me/player/queue:
36323631
x-spotify-docs-display-name: queue
36333632
x-spotify-docs-category: Player
3633+
get:
3634+
tags:
3635+
- Player
3636+
operationId: get-queue
3637+
x-spotify-docs-endpoint-name: Get the User's Queue
3638+
x-spotify-docs-console-url: /console/get-queue/
3639+
summary: |
3640+
Get the User's Queue
3641+
description: |
3642+
Get the list of objects that make up the user's queue.
3643+
responses:
3644+
"200":
3645+
$ref: "#/components/responses/Queue"
3646+
"401":
3647+
$ref: "#/components/responses/Unauthorized"
3648+
"403":
3649+
$ref: "#/components/responses/Forbidden"
3650+
"429":
3651+
$ref: "#/components/responses/TooManyRequests"
3652+
security:
3653+
-
3654+
oauth_2_0:
3655+
- user-read-playback-state
36343656
post:
36353657
tags:
36363658
- Player
@@ -4119,6 +4141,13 @@ components:
41194141
items:
41204142
type: boolean
41214143

4144+
Queue:
4145+
description: Information about the queue
4146+
content:
4147+
application/json:
4148+
schema:
4149+
$ref: "#/components/schemas/QueueObject"
4150+
41224151
OneCurrentlyPlaying:
41234152
description: Information about playback
41244153
content:
@@ -4369,6 +4398,25 @@ components:
43694398
description: |
43704399
The object type of the currently playing item. Can be one of `track`, `episode`, `ad` or `unknown`.
43714400
4401+
QueueObject:
4402+
type: object
4403+
x-spotify-docs-type: QueueObject
4404+
properties:
4405+
currently_playing:
4406+
oneOf:
4407+
- $ref: '#/components/schemas/TrackObject'
4408+
- $ref: '#/components/schemas/EpisodeObject'
4409+
x-spotify-docs-type: TrackObject | EpisodeObject
4410+
description: The currently playing track or episode. Can be `null`.
4411+
queue:
4412+
type: array
4413+
items:
4414+
oneOf:
4415+
- $ref: '#/components/schemas/TrackObject'
4416+
- $ref: '#/components/schemas/EpisodeObject'
4417+
x-spotify-docs-type: TrackObject | EpisodeObject
4418+
description: The tracks or episodes in the queue. Can be empty.
4419+
43724420
CurrentlyPlayingContextObject:
43734421
type: object
43744422
x-spotify-docs-type: CurrentlyPlayingContextObject

spotify-web-api-open-api/src/main/resources/patches/path-get-the-users-currently-playing-track.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)