audiobookshelf/custom-metadata-provider-specification.yaml

141 lines
2.9 KiB
YAML
Raw Normal View History

2024-01-03 20:27:42 +01:00
openapi: 3.0.0
2024-04-29 23:50:42 +02:00
servers:
2024-01-03 20:27:42 +01:00
- url: https://example.com
2024-04-29 23:50:42 +02:00
description: Local server
2024-01-03 20:27:42 +01:00
info:
2024-04-29 23:50:42 +02:00
title: Custom Metadata Provider
version: 0.1.0
license:
2024-01-03 20:27:42 +01:00
name: MIT
url: https://opensource.org/licenses/MIT
security:
- api_key: []
paths:
/search:
get:
description: Search for books
operationId: search
summary: Search for books
2024-04-29 23:50:42 +02:00
security:
- api_key: []
2024-01-03 20:27:42 +01:00
parameters:
- name: query
in: query
required: true
schema:
type: string
- name: author
in: query
required: false
schema:
type: string
2024-04-29 23:50:42 +02:00
2024-01-03 20:27:42 +01:00
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
matches:
type: array
items:
$ref: "#/components/schemas/BookMetadata"
"400":
description: Bad Request
content:
application/json:
schema:
type: object
properties:
error:
type: string
"401":
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: string
"500":
description: Internal Server Error
content:
application/json:
schema:
type: object
properties:
error:
type: string
components:
2024-04-29 23:50:42 +02:00
securitySchemes:
api_key:
type: apiKey
name: AUTHORIZATION
in: header
2024-01-03 20:27:42 +01:00
schemas:
BookMetadata:
type: object
2024-04-29 23:50:42 +02:00
required:
- title
2024-01-03 20:27:42 +01:00
properties:
title:
type: string
subtitle:
type: string
author:
type: string
narrator:
type: string
publisher:
type: string
publishedYear:
2024-01-03 20:27:42 +01:00
type: string
description:
type: string
cover:
type: string
description: URL to the cover image
isbn:
type: string
format: isbn
asin:
type: string
format: asin
genres:
type: array
items:
type: string
tags:
type: array
items:
type: string
series:
type: array
items:
2024-04-29 23:50:42 +02:00
$ref: "#/components/schemas/SeriesMetadata"
2024-01-03 20:27:42 +01:00
language:
type: string
duration:
2024-04-29 23:50:42 +02:00
type: integer
2024-01-03 20:27:42 +01:00
format: int64
description: Duration in seconds
2024-04-29 23:50:42 +02:00
SeriesMetadata:
type: object
required:
- series
properties:
series:
type: string
sequence:
type: string