Added playlist endpoints
This commit is contained in:
parent
56ded64da6
commit
caf275330e
1 changed files with 205 additions and 10 deletions
|
@ -193,7 +193,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/browse/{location}": {
|
"/browse/{location}": {
|
||||||
|
@ -225,7 +231,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/flatten": {
|
"/flatten": {
|
||||||
|
@ -247,7 +259,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/flatten/{location}": {
|
"/flatten/{location}": {
|
||||||
|
@ -279,7 +297,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/random": {
|
"/random": {
|
||||||
|
@ -301,7 +325,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/recent": {
|
"/recent": {
|
||||||
|
@ -323,7 +353,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/search/{query}": {
|
"/search/{query}": {
|
||||||
|
@ -355,7 +391,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/serve/{file}": {
|
"/serve/{file}": {
|
||||||
|
@ -381,7 +423,141 @@
|
||||||
"audio/*": { "schema": { "format": "binary" } }
|
"audio/*": { "schema": { "format": "binary" } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["Playlists"],
|
||||||
|
"summary": "Lists the playlists belonging to the current user",
|
||||||
|
"operationId": "getPlaylists",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ListPlaylistsEntry"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlist/{playlistName}": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["Playlists"],
|
||||||
|
"summary": "Reads the content of a playlist",
|
||||||
|
"operationId": "getPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "playlistName",
|
||||||
|
"in": "path",
|
||||||
|
"description": "Name of the playlist to read",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/Song"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": ["Playlists"],
|
||||||
|
"summary": "Saves a playlist",
|
||||||
|
"operationId": "putPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "playlistName",
|
||||||
|
"in": "path",
|
||||||
|
"description": "Name of the playlist to save",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json":{
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/SavePlaylistInput"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": ["Playlists"],
|
||||||
|
"summary": "Deletes a playlist",
|
||||||
|
"operationId": "deletePlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "playlistName",
|
||||||
|
"in": "path",
|
||||||
|
"description": "Name of the playlist to delete",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"auth_http_header": [],
|
||||||
|
"auth_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -612,10 +788,29 @@
|
||||||
"example": 571
|
"example": 571
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"ListPlaylistsEntry": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Friday Chill"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SavePlaylistInput": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"tracks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "My Music/Metal/Stratovarius/Destiny/Anthem of the World.mp3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requestBodies": {
|
|
||||||
},
|
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
"auth_http_header": {
|
"auth_http_header": {
|
||||||
"type": "http",
|
"type": "http",
|
||||||
|
|
Loading…
Add table
Reference in a new issue