mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-28 01:04:39 -04:00
Change: requestBody
to parameter
, allow commas in queries
This commit is contained in:
parent
72c1407aa7
commit
f95d9bd0e9
4 changed files with 429 additions and 263 deletions
|
@ -74,17 +74,14 @@ paths:
|
|||
description: Get an author by ID. The author's books and series can be included in the response.
|
||||
tags:
|
||||
- Authors
|
||||
requestBody:
|
||||
required: false
|
||||
description: The author object to create.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
include:
|
||||
$ref: '#/components/schemas/authorInclude'
|
||||
library:
|
||||
$ref: '#/components/schemas/authorLibraryId'
|
||||
parameters:
|
||||
- in: query
|
||||
name: include
|
||||
description: A comma separated list of what to include with the author. The options are `items` and `series`. `series` will only have an effect if `items` is included. For example, the value `items,series` will include both library items and series.
|
||||
allowReserved: true
|
||||
schema:
|
||||
type: string
|
||||
example: 'items,series'
|
||||
responses:
|
||||
'200':
|
||||
description: getAuthorById OK
|
||||
|
@ -150,10 +147,21 @@ paths:
|
|||
required: true
|
||||
schema:
|
||||
$ref: '../objects/entities/Author.yaml#/components/schemas/authorId'
|
||||
- name: token
|
||||
in: query
|
||||
description: API token
|
||||
schema:
|
||||
type: string
|
||||
- name: ts
|
||||
in: query
|
||||
description: Updated at value
|
||||
schema:
|
||||
type: integer
|
||||
get:
|
||||
operationId: getAuthorImageById
|
||||
summary: Get an author image by author ID
|
||||
description: Get an author image by author ID. The image will be returned in the requested format and size.
|
||||
security: [] # No security for getting author image
|
||||
tags:
|
||||
- Authors
|
||||
requestBody:
|
||||
|
|
|
@ -57,6 +57,32 @@ components:
|
|||
description: The fields to include in the response. The only current option is `rssfeed`.
|
||||
type: string
|
||||
example: 'rssfeed'
|
||||
parameters:
|
||||
limit:
|
||||
in: query
|
||||
name: limit
|
||||
description: The number of items to return. This the size of a single page for the optional `page` query.
|
||||
example: 10
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
page:
|
||||
in: query
|
||||
name: page
|
||||
description: The page number (zero indexed) to return. If no limit is specified, then page will have no effect.
|
||||
example: 0
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
desc:
|
||||
in: query
|
||||
name: desc
|
||||
description: Return items in reversed order if true.
|
||||
example: 0
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
|
||||
responses:
|
||||
library200:
|
||||
description: Library found.
|
||||
|
@ -135,6 +161,12 @@ paths:
|
|||
description: Get a single library by ID on server.
|
||||
tags:
|
||||
- Libraries
|
||||
parameters:
|
||||
- in: query
|
||||
name: include
|
||||
schema:
|
||||
type: string
|
||||
- $ref: '../schemas.yaml#/components/parameters/minified'
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/library200'
|
||||
|
@ -222,30 +254,37 @@ paths:
|
|||
description: Get items in a library by ID on server.
|
||||
tags:
|
||||
- Libraries
|
||||
requestBody:
|
||||
required: false
|
||||
description: The filters to apply to the requested library items.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
limit:
|
||||
$ref: '../schemas.yaml#/components/schemas/limit'
|
||||
page:
|
||||
$ref: '../schemas.yaml#/components/schemas/page'
|
||||
sort:
|
||||
$ref: '#/components/schemas/librarySort'
|
||||
desc:
|
||||
$ref: '../schemas.yaml#/components/schemas/sortDesc'
|
||||
filter:
|
||||
$ref: '#/components/schemas/libraryFilter'
|
||||
minified:
|
||||
$ref: '../schemas.yaml#/components/schemas/minified'
|
||||
collapseSeries:
|
||||
$ref: '#/components/schemas/libraryCollapseSeries'
|
||||
include:
|
||||
$ref: '#/components/schemas/libraryInclude'
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/limit'
|
||||
- $ref: '#/components/parameters/page'
|
||||
- in: query
|
||||
name: sort
|
||||
description: The field to sort by from the request.
|
||||
example: 'numBooks'
|
||||
schema:
|
||||
type: string
|
||||
default: 'name'
|
||||
- $ref: '#/components/parameters/desc'
|
||||
- in: query
|
||||
name: filter
|
||||
description: The filter for the library.
|
||||
example: 'media.metadata.title'
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: include
|
||||
description: The fields to include in the response. The only current option is `rssfeed`.
|
||||
allowReserved: true
|
||||
example: 'rssfeed'
|
||||
schema:
|
||||
type: string
|
||||
- $ref: '../schemas.yaml#/components/parameters/minified'
|
||||
- in: query
|
||||
name: collapseSeries
|
||||
description: Whether to collapse series into a single cover
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
responses:
|
||||
'200':
|
||||
description: getLibraryItems OK
|
||||
|
@ -323,20 +362,8 @@ paths:
|
|||
tags:
|
||||
- Libraries
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of series to return. If 0, all series are returned.
|
||||
example: 10
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: page
|
||||
description: The page number (zero indexed) to return. If no limit is specified, then page will have no effect.
|
||||
example: 0
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- $ref: '#/components/parameters/limit'
|
||||
- $ref: '#/components/parameters/page'
|
||||
- in: query
|
||||
name: sort
|
||||
description: The field to sort by from the request.
|
||||
|
@ -345,13 +372,7 @@ paths:
|
|||
type: string
|
||||
enum: ['name', 'numBooks', 'totalDuration', 'addedAt', 'lastBookAdded', 'lastBookUpdated']
|
||||
default: 'name'
|
||||
- in: query
|
||||
name: desc
|
||||
description: Return items in reversed order if true.
|
||||
example: true
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- $ref: '#/components/parameters/desc'
|
||||
- in: query
|
||||
name: filter
|
||||
description: The filter for the library.
|
||||
|
@ -361,9 +382,11 @@ paths:
|
|||
- in: query
|
||||
name: include
|
||||
description: The fields to include in the response. The only current option is `rssfeed`.
|
||||
allowReserved: true
|
||||
example: 'rssfeed'
|
||||
schema:
|
||||
type: string
|
||||
- $ref: '../schemas.yaml#/components/parameters/minified'
|
||||
responses:
|
||||
'200':
|
||||
description: getLibrarySeries OK
|
||||
|
@ -416,32 +439,32 @@ paths:
|
|||
deprecated: true
|
||||
tags:
|
||||
- Libraries
|
||||
requestBody:
|
||||
required: false
|
||||
description: The filters to apply to the requested library series.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
limit:
|
||||
$ref: '../schemas.yaml#/components/schemas/limit'
|
||||
page:
|
||||
$ref: '../schemas.yaml#/components/schemas/page'
|
||||
sort:
|
||||
description: The field to sort by from the request.
|
||||
type: string
|
||||
enum: ['name', 'numBooks', 'totalDuration', 'addedAt', 'lastBookAdded', 'lastBookUpdated']
|
||||
example: 'numBooks'
|
||||
default: 'name'
|
||||
desc:
|
||||
$ref: '../schemas.yaml#/components/schemas/sortDesc'
|
||||
filter:
|
||||
$ref: '#/components/schemas/libraryFilter'
|
||||
minified:
|
||||
$ref: '../schemas.yaml#/components/schemas/minified'
|
||||
include:
|
||||
$ref: '#/components/schemas/libraryInclude'
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/limit'
|
||||
- $ref: '#/components/parameters/page'
|
||||
- in: query
|
||||
name: sort
|
||||
description: The field to sort by from the request.
|
||||
example: 'numBooks'
|
||||
schema:
|
||||
type: string
|
||||
enum: ['name', 'numBooks', 'totalDuration', 'addedAt', 'lastBookAdded', 'lastBookUpdated']
|
||||
default: 'name'
|
||||
- $ref: '#/components/parameters/desc'
|
||||
- in: query
|
||||
name: filter
|
||||
description: The filter for the library.
|
||||
example: 'media.metadata.title'
|
||||
schema:
|
||||
type: string
|
||||
- $ref: '../schemas.yaml#/components/parameters/minified'
|
||||
- in: query
|
||||
name: include
|
||||
description: The fields to include in the response. The only current option is `rssfeed`.
|
||||
allowReserved: true
|
||||
example: 'rssfeed'
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: getLibrarySeriesById OK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue