mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-11 03:41:42 +00:00
* 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
131 lines
5 KiB
YAML
131 lines
5 KiB
YAML
components:
|
|
schemas:
|
|
playbackSessionId:
|
|
description: The playback session identifier.
|
|
type: string
|
|
format: uuid
|
|
playbackSession:
|
|
type: object
|
|
description: A playback session object.
|
|
oneOf:
|
|
- $ref: '#/components/schemas/playbackSessionBook'
|
|
- $ref: '#/components/schemas/playbackSessionPodcast'
|
|
discriminator:
|
|
propertyName: mediaType
|
|
mapping:
|
|
book: '#/components/schemas/playbackSessionBook'
|
|
podcast: '#/components/schemas/playbackSessionPodcast'
|
|
playbackSessionBase:
|
|
type: object
|
|
description: Base playback session object.
|
|
properties:
|
|
id:
|
|
$ref: '#/components/schemas/playbackSessionId'
|
|
userId:
|
|
$ref: './User.yaml#/components/schemas/userId'
|
|
libraryId:
|
|
$ref: '../Library.yaml#/components/schemas/libraryId'
|
|
libraryItemId:
|
|
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
|
|
mediaType:
|
|
$ref: '../mediaTypes/media.yaml#/components/schemas/mediaType'
|
|
displayTitle:
|
|
description: The display title of the media.
|
|
type: string
|
|
displayAuthor:
|
|
description: The display author of the media.
|
|
type: string
|
|
coverPath:
|
|
$ref: '../mediaTypes/Book.yaml#/components/schemas/bookCoverPath'
|
|
duration:
|
|
$ref: '../../schemas.yaml#/components/schemas/durationSec'
|
|
playMethod:
|
|
type: integer
|
|
description: The method used to play the media. 0 = Direct play, 1 = Direct Stream, 2 = Transcode, 3 = Local
|
|
mediaPlayer:
|
|
type: string
|
|
description: The media player used to play the media.
|
|
deviceInfo:
|
|
$ref: './Device.yaml#/components/schemas/deviceInfo'
|
|
serverVersion:
|
|
$ref: '../../schemas.yaml#/components/schemas/serverVersion'
|
|
date:
|
|
description: TODO
|
|
type: string
|
|
dayOfWeek:
|
|
description: TODO
|
|
type: string
|
|
timeListening:
|
|
$ref: '../../schemas.yaml#/components/schemas/durationSec'
|
|
startTime:
|
|
$ref: '../../schemas.yaml#/components/schemas/durationSec'
|
|
currentTime:
|
|
$ref: '../../schemas.yaml#/components/schemas/durationSec'
|
|
createdAt:
|
|
$ref: '../../schemas.yaml#/components/schemas/createdAt'
|
|
updatedAt:
|
|
$ref: '../../schemas.yaml#/components/schemas/updatedAt'
|
|
playbackSessionBook:
|
|
description: Book playback session schema.
|
|
allOf:
|
|
- $ref: '#/components/schemas/playbackSessionBase'
|
|
- properties:
|
|
mediaMetadata:
|
|
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookMetadata'
|
|
chapters:
|
|
description: The chapters of the media.
|
|
type: array
|
|
items:
|
|
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter'
|
|
playbackSessionPodcast:
|
|
description: Podcast playback session schema.
|
|
allOf:
|
|
- $ref: '#/components/schemas/playbackSessionBase'
|
|
- properties:
|
|
mediaMetadata:
|
|
$ref: '../metadata/PodcastMetadata.yaml#/components/schemas/PodcastMetadata'
|
|
episodeId:
|
|
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId'
|
|
playbackSessionExpanded:
|
|
type: object
|
|
description: A playback session object.
|
|
oneOf:
|
|
- $ref: '#/components/schemas/playbackSessionBookExpanded'
|
|
- $ref: '#/components/schemas/playbackSessionPodcastExpanded'
|
|
discriminator:
|
|
propertyName: mediaType
|
|
mapping:
|
|
book: '#/components/schemas/playbackSessionBookExpanded'
|
|
podcast: '#/components/schemas/playbackSessionPodcastExpanded'
|
|
playbackSessionBookExpanded:
|
|
description: Expanded book playback session schema.
|
|
allOf:
|
|
- $ref: '#/components/schemas/playbackSessionBook'
|
|
- properties:
|
|
audioTracks:
|
|
description: The audio tracks of the media.
|
|
type: array
|
|
items:
|
|
$ref: '../files/AudioTrack.yaml#/components/schemas/AudioTrack'
|
|
videoTrack:
|
|
description: The video track of the media. TODO
|
|
type: object
|
|
nullable: true
|
|
libraryItem:
|
|
$ref: '../LibraryItem.yaml#/components/schemas/libraryItem'
|
|
playbackSessionPodcastExpanded:
|
|
description: Expanded podcast playback session schema.
|
|
allOf:
|
|
- $ref: '#/components/schemas/playbackSessionPodcast'
|
|
- properties:
|
|
audioTracks:
|
|
description: The audio tracks of the media.
|
|
type: array
|
|
items:
|
|
$ref: '../files/AudioTrack.yaml#/components/schemas/AudioTrack'
|
|
videoTrack:
|
|
description: The video track of the media. TODO
|
|
type: object
|
|
nullable: true
|
|
libraryItem:
|
|
$ref: '../LibraryItem.yaml#/components/schemas/libraryItem'
|