Skip to content

Commit

Permalink
chore: cleanup API spec
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed May 6, 2024
1 parent 55f8329 commit 3656853
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions api-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ components:
duration:
description: Duration in milliseconds
type: integer
play:
description: An initiate playback payload
type: object
properties:
uri:
description: Spotify URI to start playing
type: string
skip_to_uri:
description: Spotify URI to skip to (when playing playlists)
type: string
paused:
description: Start playback as paused
type: boolean
paths:
/:
get:
Expand Down Expand Up @@ -96,23 +109,7 @@ paths:
post:
description: Starts playing new content
requestBody:
content:
application/json:
schema:
type: object
properties:
uri:
description: Spotify URI to start playing
type: string
required: true
skip_to_uri:
description: Spotify URI to skip to (when playing playlists)
type: string
required: false
paused:
description: Start playback as paused
type: boolean
required: false
$ref: '#/components/schemas/play'
responses:
200:
description: Successful response
Expand Down Expand Up @@ -148,11 +145,11 @@ paths:
application/json:
schema:
type: object
required: [ position ]
properties:
position:
description: Seek position in milliseconds
type: integer
required: true
responses:
200:
description: Successful response
Expand Down Expand Up @@ -180,12 +177,12 @@ paths:
application/json:
schema:
type: object
required: [ volume ]
properties:
volume:
description: Volume from 0 to max
type: number
minimum: 0
required: true
responses:
200:
description: Successful response
Expand All @@ -197,11 +194,11 @@ paths:
application/json:
schema:
type: object
required: [ repeat_context ]
properties:
repeat_context:
description: Whether repeating context should be enabled
type: boolean
required: true
responses:
200:
description: Successful response
Expand All @@ -213,11 +210,11 @@ paths:
application/json:
schema:
type: object
required: [ repeat_track ]
properties:
repeat_track:
description: Whether repeating track should be enabled
type: boolean
required: true
responses:
200:
description: Successful response
Expand All @@ -229,11 +226,11 @@ paths:
application/json:
schema:
type: object
required: [ shuffle_context ]
properties:
shuffle_context:
description: Whether shuffling context should be enabled
type: boolean
required: true
responses:
200:
description: Successful response
Expand All @@ -245,11 +242,11 @@ paths:
application/json:
schema:
type: object
required: [ uri ]
properties:
uri:
description: The URI for the track that should be added
type: string
required: true
responses:
200:
description: Successful response

0 comments on commit 3656853

Please sign in to comment.