mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
Add: /api/libraries/{id} endpoint
This commit is contained in:
parent
8c85092349
commit
2621d04e4b
2 changed files with 84 additions and 0 deletions
|
|
@ -17,6 +17,15 @@ components:
|
|||
type: array
|
||||
items:
|
||||
$ref: '../objects/Folder.yaml#/components/schemas/folder'
|
||||
libraryDisplayOrder:
|
||||
name: displayOrder
|
||||
in: query
|
||||
description: The display order of the library. Must be >= 1.
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
example: 1
|
||||
libraryIcon:
|
||||
name: icon
|
||||
in: query
|
||||
|
|
@ -48,3 +57,28 @@ components:
|
|||
required: false
|
||||
schema:
|
||||
$ref: '../objects/Library.yaml#/components/schemas/librarySettings'
|
||||
libraryId:
|
||||
name: id
|
||||
in: query
|
||||
description: The ID of the library.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
|
||||
librarySettings:
|
||||
name: settings
|
||||
in: query
|
||||
description: The settings for the library.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '../objects/Library.yaml#/components/schemas/librarySettings'
|
||||
responses:
|
||||
library404:
|
||||
description: Library not found.
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
example: Library not found.
|
||||
|
||||
|
|
|
|||
|
|
@ -187,6 +187,56 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: './objects/Library.yaml#/components/schemas/library'
|
||||
/api/libraries/{id}:
|
||||
get:
|
||||
operationId: getLibraryById
|
||||
summary: Get a single library by ID on server
|
||||
tags:
|
||||
- Libraries
|
||||
parameters:
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId'
|
||||
responses:
|
||||
'200':
|
||||
description: getLibraryById OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './objects/Library.yaml#/components/schemas/library'
|
||||
'404':
|
||||
$ref: './controllers/LibraryController.yaml#/components/responses/library404'
|
||||
patch:
|
||||
operationId: updateLibraryById
|
||||
summary: Update a single library by ID on server
|
||||
tags:
|
||||
- Libraries
|
||||
parameters:
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryName'
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryFolders'
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryDisplayOrder'
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryIcon'
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryProvider'
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings'
|
||||
responses:
|
||||
'200':
|
||||
description: updateLibraryById OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './objects/Library.yaml#/components/schemas/library'
|
||||
'404':
|
||||
$ref: './controllers/LibraryController.yaml#/components/responses/library404'
|
||||
delete:
|
||||
operationId: deleteLibraryById
|
||||
summary: Delete a single library by ID on server
|
||||
tags:
|
||||
- Libraries
|
||||
parameters:
|
||||
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId'
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/ok200'
|
||||
'404':
|
||||
$ref: './controllers/LibraryController.yaml#/components/responses/library404'
|
||||
tags:
|
||||
- name: Authors
|
||||
description: Author endpoints
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue