Added Schemas, Edited endpoint order in referenced spec

This commit is contained in:
Luke Hagar
2023-04-19 08:40:03 -05:00
parent 45565384c7
commit e27ab0a871
4 changed files with 629 additions and 46 deletions

View File

@@ -1,3 +1,44 @@
get:
tags:
- Butler
summary: Get Butler tasks
description: Returns a list of butler tasks
operationId: getButlerTasks
responses:
"200":
description: All butler tasks
content:
application/json:
schema:
type: object
properties:
ButlerTasks:
type: object
properties:
ButlerTask:
type: array
items:
type: object
properties:
name:
type: string
example: BackupDatabase
interval:
type: number
example: 3
scheduleRandomized:
type: boolean
enabled:
type: boolean
title:
type: string
example: Backup Database
description:
type: string
example: Create a backup copy of the server's database in the configured backup directory
"401":
$ref: "../../responses/401.yaml"
post:
tags:
- Butler

View File

@@ -7,6 +7,294 @@ get:
operationId: getOnDeck
responses:
"200":
description: The on deck content
description: The on Deck content
content:
application/json:
schema:
type: object
properties:
MediaContainer:
type: object
properties:
size:
type: number
example: 16
allowSync:
type: boolean
identifier:
type: string
example: com.plexapp.plugins.library
mediaTagPrefix:
type: string
example: /system/bundle/media/flags/
mediaTagVersion:
type: number
example: 1680021154
mixedParents:
type: boolean
Metadata:
type: array
items:
type: object
properties:
allowSync:
type: boolean
librarySectionID:
type: number
example: 2
librarySectionTitle:
type: string
example: TV Shows
librarySectionUUID:
type: string
example: 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd
ratingKey:
type: string
example: 49564
key:
type: string
example: /library/metadata/49564
parentRatingKey:
type: string
example: 49557
grandparentRatingKey:
type: string
example: 49556
guid:
type: string
example: plex://episode/5ea7d7402e7ab10042e74d4f
parentGuid:
type: string
example: plex://season/602e754d67f4c8002ce54b3d
grandparentGuid:
type: string
example: plex://show/5d9c090e705e7a001e6e94d8
type:
type: string
example: episode
title:
type: string
example: Circus
grandparentKey:
type: string
example: /library/metadata/49556
parentKey:
type: string
example: /library/metadata/49557
librarySectionKey:
type: string
example: /library/sections/2
grandparentTitle:
type: string
example: Bluey (2018)
parentTitle:
type: string
example: Season 2
contentRating:
type: string
example: TV-Y
summary:
type: string
example: Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.
index:
type: number
example: 33
parentIndex:
type: number
example: 2
lastViewedAt:
type: number
example: 1681908352
year:
type: number
example: 2018
thumb:
type: string
example: /library/metadata/49564/thumb/1654258204
art:
type: string
example: /library/metadata/49556/art/1680939546
parentThumb:
type: string
example: /library/metadata/49557/thumb/1654258204
grandparentThumb:
type: string
example: /library/metadata/49556/thumb/1680939546
grandparentArt:
type: string
example: /library/metadata/49556/art/1680939546
grandparentTheme:
type: string
example: /library/metadata/49556/theme/1680939546
duration:
type: number
example: 420080
originallyAvailableAt:
type: string
format: date
example: 2020-10-31
addedAt:
type: number
example: 1654258196
updatedAt:
type: number
example: 1654258204
Media:
type: array
items:
type: object
properties:
id:
type: number
example: 80994
duration:
type: number
example: 420080
bitrate:
type: number
example: 1046
width:
type: number
example: 1920
height:
type: number
example: 1080
aspectRatio:
type: number
example: 1.78
audioChannels:
type: number
example: 2
audioCodec:
type: string
example: aac
videoCodec:
type: string
example: hevc
videoResolution:
type: string
example: 1080
container:
type: string
example: mkv
videoFrameRate:
type: string
example: PAL
audioProfile:
type: string
example: lc
videoProfile:
type: string
example: main
Part:
type: array
items:
type: object
properties:
id:
type: number
example: 80994
key:
type: string
example: /library/parts/80994/1655007810/file.mkv
duration:
type: number
example: 420080
file:
type: string
example: /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv
size:
type: number
example: 55148931
audioProfile:
type: string
example: lc
container:
type: string
example: mkv
videoProfile:
type: string
example: main
Stream:
type: array
items:
type: object
properties:
id:
type: number
example: 211234
streamType:
type: number
example: 1
default:
type: boolean
codec:
type: string
example: hevc
index:
type: number
example: 0
bitrate:
type: number
example: 918
language:
type: string
example: English
languageTag:
type: string
example: en
languageCode:
type: string
example: eng
bitDepth:
type: number
example: 8
chromaLocation:
type: string
example: left
chromaSubsampling:
type: string
example: 4:2:0
codedHeight:
type: number
example: 1080
codedWidth:
type: number
example: 1920
colorRange:
type: string
example: tv
frameRate:
type: number
example: 25
height:
type: number
example: 1080
level:
type: number
example: 120
profile:
type: string
example: main
refFrames:
type: number
example: 1
width:
type: number
example: 1920
displayTitle:
type: string
example: 1080p (HEVC Main)
extendedDisplayTitle:
type: string
example: 1080p (HEVC Main)
Guid:
type: array
items:
type: object
properties:
id:
type: string
example: imdb://tt13303712
"401":
$ref: "../../responses/401.yaml"

View File

@@ -0,0 +1,241 @@
get:
tags:
- Library
summary: Get Recently Added
description: |
This endpoint will return the recently added content.
operationId: getRecentlyAdded
responses:
"200":
description: The recently added content
content:
application/json:
schema:
type: object
properties:
MediaContainer:
type: object
properties:
size:
type: number
example: 50
allowSync:
type: boolean
identifier:
type: string
example: com.plexapp.plugins.library
mediaTagPrefix:
type: string
example: /system/bundle/media/flags/
mediaTagVersion:
type: number
example: 1680021154
mixedParents:
type: boolean
Metadata:
type: array
items:
type: object
properties:
allowSync:
type: boolean
librarySectionID:
type: number
example: 1
librarySectionTitle:
type: string
example: Movies
librarySectionUUID:
type: string
example: 322a231a-b7f7-49f5-920f-14c61199cd30
ratingKey:
type: string
example: 59398
key:
type: string
example: /library/metadata/59398
guid:
type: string
example: plex://movie/5e161a83bea6ac004126e148
studio:
type: string
example: Marvel Studios
type:
type: string
example: movie
title:
type: string
example: "Ant-Man and the Wasp: Quantumania"
contentRating:
type: string
example: PG-13
summary:
type: string
example: Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.
rating:
type: number
example: 4.7
audienceRating:
type: number
example: 8.3
year:
type: number
example: 2023
tagline:
type: string
example: Witness the beginning of a new dynasty.
thumb:
type: string
example: /library/metadata/59398/thumb/1681888010
art:
type: string
example: /library/metadata/59398/art/1681888010
duration:
type: number
example: 7474422
originallyAvailableAt:
type: string
format: date
example: 2023-02-15
addedAt:
type: number
example: 1681803215
updatedAt:
type: number
example: 1681888010
audienceRatingImage:
type: string
example: rottentomatoes://image.rating.upright
chapterSource:
type: string
example: media
primaryExtraKey:
type: string
example: /library/metadata/59399
ratingImage:
type: string
example: rottentomatoes://image.rating.rotten
Media:
type: array
items:
type: object
properties:
id:
type: number
example: 120345
duration:
type: number
example: 7474422
bitrate:
type: number
example: 3623
width:
type: number
example: 1920
height:
type: number
example: 804
aspectRatio:
type: number
example: 2.35
audioChannels:
type: number
example: 6
audioCodec:
type: string
example: ac3
videoCodec:
type: string
example: h264
videoResolution:
type: string
example: 1080
container:
type: string
example: mp4
videoFrameRate:
type: string
example: 24p
optimizedForStreaming:
type: number
example: 0
has64bitOffsets:
type: boolean
videoProfile:
type: string
example: high
Part:
type: array
items:
type: object
properties:
id:
type: number
example: 120353
key:
type: string
example: /library/parts/120353/1681803203/file.mp4
duration:
type: number
example: 7474422
file:
type: string
example: /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4
size:
type: number
example: 3395307162
container:
type: string
example: mp4
has64bitOffsets:
type: boolean
hasThumbnail:
type: string
example: 1
optimizedForStreaming:
type: boolean
videoProfile:
type: string
example: high
Genre:
type: array
items:
type: object
properties:
tag:
type: string
example: Comedy
Director:
type: array
items:
type: object
properties:
tag:
type: string
example: Peyton Reed
Writer:
type: array
items:
type: object
properties:
tag:
type: string
example: Jeff Loveness
Country:
type: array
items:
type: object
properties:
tag:
type: string
example: United States of America
Role:
type: array
items:
type: object
properties:
tag:
type: string
example: Paul Rudd
"401":
$ref: "../../responses/401.yaml"

View File

@@ -97,32 +97,40 @@ paths:
/:
$ref: "./paths/pms/root.yaml"
/clients:
$ref: "./paths/pms/clients.yaml"
/:/prefs:
$ref: "./paths/pms/server-preferences.yaml"
/activities:
$ref: "./paths/pms/activities.yaml"
/activities/{activityUUID}:
$ref: "./paths/pms/activities-cancel.yaml"
/updater/status:
$ref: "./paths/pms/updater-status.yaml"
/updater/check:
$ref: "./paths/pms/updater-check.yaml"
/updater/apply:
$ref: "./paths/pms/updater-apply.yaml"
/butler:
$ref: "./paths/pms/butler.yaml"
/butler/{taskName}:
$ref: "./paths/pms/butler-task.yaml"
/clients:
$ref: "./paths/pms/clients.yaml"
/hubs:
$ref: "./paths/pms/hubs.yaml"
/hubs/search:
$ref: "./paths/pms/hubs-search.yaml"
/hubs/search/voice:
$ref: "./paths/pms/hubs-search-voice.yaml"
/hubs/sections/{sectionId}:
$ref: "./paths/pms/hubs-section.yaml"
/identity:
$ref: "./paths/pms/identity.yaml"
/log:
$ref: "./paths/pms/log.yaml"
/log/networked:
$ref: "./paths/pms/log-networked.yaml"
/security/token:
$ref: "./paths/pms/security-token.yaml"
/security/resources:
$ref: "./paths/pms/security-resources.yaml"
/library/hashes:
$ref: "./paths/pms/library-hashes.yaml"
/library/recentlyAdded:
$ref: "./paths/pms/library-recentlyadded.yaml"
/library/sections:
$ref: "./paths/pms/all-libraries.yaml"
/library/sections/{sectionId}:
$ref: "./paths/pms/library-details.yaml"
/library/sections/{sectionId}/all:
$ref: "./paths/pms/library-content-all.yaml"
/library/sections/{sectionId}/refresh:
@@ -131,55 +139,50 @@ paths:
$ref: "./paths/pms/library-content-latest.yaml"
/library/sections/{sectionId}/common:
$ref: "./paths/pms/library-content-common.yaml"
/library/sections/{sectionId}:
$ref: "./paths/pms/library-details.yaml"
/library/sections:
$ref: "./paths/pms/all-libraries.yaml"
/library/hashes:
$ref: "./paths/pms/library-hashes.yaml"
/library/onDeck:
$ref: "./paths/pms/library-ondeck.yaml"
/hubs:
$ref: "./paths/pms/hubs.yaml"
/hubs/sections/{sectionId}:
$ref: "./paths/pms/hubs-section.yaml"
/playlists/all:
$ref: "./paths/pms/all-playlists.yaml"
/log:
$ref: "./paths/pms/log.yaml"
/log/networked:
$ref: "./paths/pms/log-networked.yaml"
/playlists:
$ref: "./paths/pms/playlists.yaml"
/playlists/all:
$ref: "./paths/pms/all-playlists.yaml"
/playlists/{playlistID}:
$ref: "./paths/pms/playlist-id.yaml"
/playlists/{playlistID}/items:
$ref: "./paths/pms/playlist-contents.yaml"
/playlists/upload:
$ref: "./paths/pms/playlist-upload.yaml"
/hubs/search:
$ref: "./paths/pms/hubs-search.yaml"
/hubs/search/voice:
$ref: "./paths/pms/hubs-search-voice.yaml"
/security/token:
$ref: "./paths/pms/security-token.yaml"
/security/resources:
$ref: "./paths/pms/security-resources.yaml"
/servers:
$ref: "./paths/pms/servers.yaml"
/status/sessions:
$ref: "./paths/pms/sessions.yaml"
/status/sessions/history/all:
$ref: "./paths/pms/session-history.yaml"
/servers:
$ref: "./paths/pms/servers.yaml"
/transcode/sessions:
$ref: "./paths/pms/transcode-sessions.yaml"
/transcode/sessions/{sessionKey}:
$ref: "./paths/pms/transcode-sessions-key.yaml"
/:/prefs:
$ref: "./paths/pms/server-preferences.yaml"
/updater/status:
$ref: "./paths/pms/updater-status.yaml"
/updater/check:
$ref: "./paths/pms/updater-check.yaml"
/updater/apply:
$ref: "./paths/pms/updater-apply.yaml"
# Plex.tv API endpoints
/user:
servers:
- url: https://plex.tv/api/v2
$ref: "./paths/plex.tv/user.yaml"
/resources:
servers:
- url: https://plex.tv/api/v2
$ref: "./paths/plex.tv/resources.yaml"
/pins:
servers:
- url: https://plex.tv/api/v2
@@ -189,6 +192,16 @@ paths:
- url: https://plex.tv/api/v2
$ref: "./paths/plex.tv/pins-id.yaml"
/resources:
servers:
- url: https://plex.tv/api/v2
$ref: "./paths/plex.tv/resources.yaml"
/user:
servers:
- url: https://plex.tv/api/v2
$ref: "./paths/plex.tv/user.yaml"
tags:
- name: Activities
description: |