audiobookshelf/docs/objects/Media.yaml
Nicholas W 3a91092fbf
Schema updates from August 3 (#1)
* Update: formatting

* Fix: libraryItemController `play` endpoint
+ Endpoints cannot have optional path parameters
+ Moved schemas to `components` section

* Fix: MeController optional path parameters

* Fix: Books do not have `episodeId` in `mediaProgress`

* Fix: `PlaybackSession` oneOf between book and podcast

* Update: bundled spec

* Fix: `allowReserved` in LibraryItem include query

* Add: tags to AuthController endpoints

* Fix: summary of play endpoints

* Update: bundled spec
2024-08-04 09:00:32 +02:00

76 lines
2.6 KiB
YAML

components:
schemas:
mediaProgressId:
type: string
description: The ID of the media progress.
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
format: uuid
progress:
type: number
description: The user's progress in the media item.
example: 0.5
currentTime:
type: number
description: The user's current time in the media item.
example: 0.5
isFinished:
type: boolean
description: Whether the user has finished the media item.
example: false
hideFromContinueListening:
type: boolean
description: Whether the media item should be hidden from the continue listening section.
example: false
finishedAt:
type: integer
nullable: true
description: The time (in ms since POSIX epoch) when the media was finished. Will be null if the media has is not finished.
example: 1616239000
mediaProgress:
type: object
properties:
id:
$ref: '#/components/schemas/mediaProgressId'
libraryItemId:
$ref: './LibraryItem.yaml#/components/schemas/libraryItemId'
duration:
$ref: '../schemas.yaml#/components/schemas/durationSec'
progress:
$ref: '#/components/schemas/progress'
currentTime:
$ref: '#/components/schemas/currentTime'
isFinished:
$ref: '#/components/schemas/isFinished'
hideFromContinueListening:
$ref: '#/components/schemas/hideFromContinueListening'
lastUpdate:
$ref: '../schemas.yaml#/components/schemas/updatedAt'
startedAt:
$ref: '../schemas.yaml#/components/schemas/createdAt'
finishedAt:
$ref: '#/components/schemas/finishedAt'
mediaProgressPodcastEpisode:
type: object
properties:
id:
$ref: '#/components/schemas/mediaProgressId'
libraryItemId:
$ref: './LibraryItem.yaml#/components/schemas/libraryItemId'
episodeId:
$ref: './mediaTypes/Podcast.yaml#/components/schemas/podcastId'
duration:
$ref: '../schemas.yaml#/components/schemas/durationSec'
progress:
$ref: '#/components/schemas/progress'
currentTime:
$ref: '#/components/schemas/currentTime'
isFinished:
$ref: '#/components/schemas/isFinished'
hideFromContinueListening:
$ref: '#/components/schemas/hideFromContinueListening'
lastUpdate:
$ref: '../schemas.yaml#/components/schemas/updatedAt'
startedAt:
$ref: '../schemas.yaml#/components/schemas/createdAt'
finishedAt:
$ref: '#/components/schemas/finishedAt'