Added resources endpoint

This commit is contained in:
jasonlandbridge@protonmail.com
2024-08-21 14:02:35 +02:00
parent 6361f92bb4
commit d9eb97f629
3 changed files with 136 additions and 0 deletions

83
models/PlexDevice.yaml Normal file
View File

@@ -0,0 +1,83 @@
title: PlexDevice
type: object
required:
- name
- product
- productVersion
- platform
- platformVersion
- device
- clientIdentifier
- createdAt
- lastSeenAt
- provides
properties:
name:
type: string
product:
type: string
productVersion:
type: string
platform:
type: string
platformVersion:
type: string
device:
type: string
clientIdentifier:
type: string
createdAt:
type: string
format: date-time
lastSeenAt:
type: string
format: date-time
provides:
type: string
ownerId:
type: string
format: nullable
sourceTitle:
type: string
format: nullable
publicAddress:
type: string
accessToken:
type: string
owned:
type: boolean
home:
type: boolean
synced:
type: boolean
relay:
type: boolean
presence:
type: boolean
httpsRequired:
type: boolean
publicAddressMatches:
type: boolean
dnsRebindingProtection:
type: boolean
natLoopbackSupported:
type: boolean
connections:
type: array
items:
type: object
properties:
protocol:
type: string
address:
type: string
port:
type: number
uri:
type: string
local:
type: boolean
relay:
type: boolean
IPv6:
type: boolean

View File

@@ -0,0 +1,48 @@
get:
servers:
- url: 'https://plex.tv/api/v2'
security: []
tags:
- Plex
summary: Get Devices
description: Get Devices
operationId: getDevices
parameters:
- $ref: "../../parameters/ClientIdentifier.yaml"
- name: includeHttps
in: query
description: Include Https entries in the results
schema:
type: integer
enum:
- 0
- 1
- name: includeRelay
in: query
description: Include Relay addresses in the results
schema:
type: integer
enum:
- 0
- 1
- name: includeIPv6
in: query
description: Include IPv6 entries in the results
schema:
type: integer
enum:
- 0
- 1
responses:
'200':
description: List of Plex Devices. This includes Plex hosted servers and clients
content:
application/json:
schema:
type: array
items:
$ref: ../models/PlexDevice.yaml
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'

View File

@@ -132,6 +132,11 @@ paths:
/library/onDeck: /library/onDeck:
$ref: "./paths/library/ondeck.yaml" $ref: "./paths/library/ondeck.yaml"
# Resources
# Folder: pms/resources
/resources:
$ref: "./paths/resources/resources.yaml"
# Logs # Logs
# Folder: pms/paths/logs # Folder: pms/paths/logs
/log: /log: