Fixed some minor bugs and added to root

This commit is contained in:
Vito0912 2024-07-30 17:34:04 +02:00
parent 7ef2eed2ad
commit 9b3cb4ed33
5 changed files with 72 additions and 60 deletions

View file

@ -40,7 +40,7 @@ paths:
description: TODO
oneOf:
- $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItem'
/api/items/{id}/play:
/api/items/{id}/play/{episodeId}:
parameters:
- name: id
in: path
@ -48,6 +48,12 @@ paths:
required: true
schema:
$ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItemId'
- name: episodeId
in: path
description: The ID of the episode to play.
required: false
schema:
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
post:
operationId: playLibraryItem
summary: Play a library item.

View file

@ -0,0 +1,2 @@
paths:

View file

@ -5,65 +5,67 @@ components:
type: string
format: uuid
playbackSession:
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'
episodeId:
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/episodeId'
nullable: true
mediaType:
$ref: '../../controllers/LibraryItemController.yaml#/components/schemas/libraryMediaType'
mediaMetadata:
description: The metadata of the media.
oneOf:
- $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified'
- $ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastMinified'
chapters:
description: The chapters of the media.
type: array
items:
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter'
displayTitle:
description: The display title of the media.
type: string
displayAuthor:
description: The display author of the media.
type: string
coverPath:
$ref: '../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'
type: object
description: A 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'
episodeId:
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId'
mediaType:
$ref: '../mediaTypes/media.yaml#/components/schemas/mediaType'
mediaMetadata:
description: The metadata of the media.
oneOf:
- $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified'
- $ref: '../mediaTypes/Podcast.yaml#/components/schemas/Podcast'
chapters:
description: The chapters of the media.
type: array
items:
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter'
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'
playbackSessionExpanded:
description: Expanded playback session schema.
allOf:

Binary file not shown.

View file

@ -83,6 +83,8 @@ paths:
$ref: './controllers/AuthController.yaml#/paths/~1logout'
/api/items/{id}:
$ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}'
/api/items/{id}/play/{episodeId}:
$ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}~1play~1{episodeId}'
tags:
- name: Authors
description: Author endpoints