mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-10 12:37:44 +00:00
format project
This commit is contained in:
@@ -4,12 +4,12 @@ get:
|
||||
summary: Get the timeline for a media item
|
||||
description: Get the timeline for a media item
|
||||
operationId: getTimeline
|
||||
parameters:
|
||||
parameters:
|
||||
- name: ratingKey
|
||||
description: The rating key of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 23409
|
||||
|
||||
@@ -17,7 +17,7 @@ get:
|
||||
description: The key of the media item to get the timeline for
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: string
|
||||
example: "/library/metadata/23409"
|
||||
|
||||
@@ -25,7 +25,7 @@ get:
|
||||
description: The state of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: string
|
||||
enum: ["playing", "paused", "stopped"]
|
||||
example: "playing"
|
||||
@@ -34,7 +34,7 @@ get:
|
||||
description: Whether the media item has MDE
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 1
|
||||
|
||||
@@ -42,7 +42,7 @@ get:
|
||||
description: The time of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 2000
|
||||
|
||||
@@ -50,7 +50,7 @@ get:
|
||||
description: The duration of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 10000
|
||||
|
||||
@@ -58,7 +58,7 @@ get:
|
||||
description: The context of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: string
|
||||
example: "home:hub.continueWatching"
|
||||
|
||||
@@ -66,7 +66,7 @@ get:
|
||||
description: The play queue item ID of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 1
|
||||
|
||||
@@ -74,7 +74,7 @@ get:
|
||||
description: The playback time of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 2000
|
||||
|
||||
@@ -82,7 +82,7 @@ get:
|
||||
description: The row of the media item
|
||||
required: true
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: number
|
||||
example: 1
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
get:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
tags:
|
||||
- Plex
|
||||
summary: Get Companions Data
|
||||
description: Get Companions Data
|
||||
operationId: getCompanionsData
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Companions Data
|
||||
content:
|
||||
application/json:
|
||||
@@ -28,21 +28,21 @@ get:
|
||||
example: tv.plex.sonos
|
||||
baseURL:
|
||||
type: string
|
||||
example: 'https://sonos.plex.tv'
|
||||
example: "https://sonos.plex.tv"
|
||||
format: uri
|
||||
title:
|
||||
type: string
|
||||
example: Sonos
|
||||
linkURL:
|
||||
type: string
|
||||
example: 'https://sonos.plex.tv/link'
|
||||
example: "https://sonos.plex.tv/link"
|
||||
provides:
|
||||
type: string
|
||||
example: 'client,player'
|
||||
example: "client,player"
|
||||
token:
|
||||
type: string
|
||||
description: The plex authtoken used to identify with
|
||||
'400':
|
||||
"400":
|
||||
$ref: ../../responses/400.yaml
|
||||
'401':
|
||||
"401":
|
||||
$ref: ../../responses/401.yaml
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
get:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
tags:
|
||||
- Plex
|
||||
summary: Get list of friends of the user logged in
|
||||
description: Get friends of provided auth token.
|
||||
operationId: getUserFriends
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Friends Data
|
||||
content:
|
||||
application/json:
|
||||
@@ -15,7 +15,7 @@ get:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../models/Friend.yaml
|
||||
'400':
|
||||
$ref: '../../responses/400.yaml'
|
||||
'401':
|
||||
$ref: '../../responses/401.yaml'
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
get:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
security: [] # No security required
|
||||
tags:
|
||||
- Plex
|
||||
@@ -8,13 +8,13 @@ get:
|
||||
description: Returns the geolocation and locale data of the caller
|
||||
operationId: getGeoData
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Gets the geo location data of the user
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../models/GeoData.yaml
|
||||
'400':
|
||||
"400":
|
||||
$ref: ../../responses/400.yaml
|
||||
'401':
|
||||
"401":
|
||||
$ref: ../../responses/401.yaml
|
||||
|
||||
@@ -113,7 +113,8 @@ get:
|
||||
example: Firefly
|
||||
summary:
|
||||
type: string
|
||||
example: Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is
|
||||
example:
|
||||
Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is
|
||||
the captain of the transport ship "Serenity". Mal and his crew,
|
||||
ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash'
|
||||
Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee
|
||||
|
||||
@@ -60,7 +60,7 @@ get:
|
||||
example: /:/resources/movie.png
|
||||
key:
|
||||
type: string
|
||||
example: '1'
|
||||
example: "1"
|
||||
type:
|
||||
type: string
|
||||
example: movie
|
||||
@@ -80,11 +80,11 @@ get:
|
||||
type: string
|
||||
example: 322a231a-b7f7-49f5-920f-14c61199cd30
|
||||
updatedAt:
|
||||
$ref: '../../models/common/PlexDateTime.yaml'
|
||||
$ref: "../../models/common/PlexDateTime.yaml"
|
||||
createdAt:
|
||||
$ref: '../../models/common/PlexDateTime.yaml'
|
||||
$ref: "../../models/common/PlexDateTime.yaml"
|
||||
scannedAt:
|
||||
$ref: '../../models/common/PlexDateTime.yaml'
|
||||
$ref: "../../models/common/PlexDateTime.yaml"
|
||||
content:
|
||||
type: boolean
|
||||
example: true
|
||||
|
||||
@@ -16,7 +16,7 @@ get:
|
||||
description: |
|
||||
Adds additional elements to the response. Supported types are (Stream)
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: string
|
||||
required: false
|
||||
examples:
|
||||
|
||||
@@ -18,7 +18,7 @@ get:
|
||||
- $ref: "../../../../../parameters/image/upscale.yaml"
|
||||
- $ref: "../../../../../parameters/plex/x-plex-token.yaml"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Successful response returning an image
|
||||
headers:
|
||||
X-Plex-Protocol:
|
||||
|
||||
@@ -89,7 +89,8 @@ get:
|
||||
example: PG-13
|
||||
summary:
|
||||
type: string
|
||||
example: Serenity continues the story of the TV series it was based upon
|
||||
example:
|
||||
Serenity continues the story of the TV series it was based upon
|
||||
("Firefly"). River Tam had a secret - one in which she's not
|
||||
even aware - so dangerous, no one's safe, as an Alliance
|
||||
operative's sent to capture her, and all others are considered
|
||||
|
||||
@@ -18,7 +18,7 @@ get:
|
||||
- $ref: "../../../../../parameters/image/upscale.yaml"
|
||||
- $ref: "../../../../../parameters/plex/x-plex-token.yaml"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Successful response returning an image
|
||||
headers:
|
||||
X-Plex-Protocol:
|
||||
|
||||
@@ -5,10 +5,10 @@ get:
|
||||
description: Retrieves media providers and their features from the Plex server.
|
||||
operationId: get-media-providers
|
||||
parameters:
|
||||
- $ref: '../../../parameters/accept-application-json.yaml'
|
||||
- $ref: '../../../parameters/plex/x-plex-token.yaml'
|
||||
- $ref: "../../../parameters/accept-application-json.yaml"
|
||||
- $ref: "../../../parameters/plex/x-plex-token.yaml"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Media providers and their features
|
||||
content:
|
||||
application/json:
|
||||
|
||||
@@ -16,15 +16,15 @@ get:
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: The Pin with a non-null authToken when it has been verified by the user
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../models/AuthPinContainer.yaml
|
||||
'400':
|
||||
"400":
|
||||
$ref: ../../responses/400-MissingIdentifier.yaml
|
||||
'404':
|
||||
"404":
|
||||
description: Not Found or Expired
|
||||
content:
|
||||
application/json:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
tags:
|
||||
- Plex
|
||||
summary: Get a Pin
|
||||
@@ -21,12 +21,11 @@ post:
|
||||
- $ref: ../../parameters/plex/x-plex-identifier.yaml
|
||||
- $ref: ../../parameters/plex/x-plex-product.yaml
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Requests a new pin id used in the authentication flow
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../models/AuthPinContainer.yaml
|
||||
'400':
|
||||
"400":
|
||||
$ref: ../../responses/400-MissingIdentifier.yaml
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
get:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
security: []
|
||||
tags:
|
||||
- Plex
|
||||
@@ -34,7 +34,7 @@ get:
|
||||
- 0
|
||||
- 1
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: List of Plex Devices. This includes Plex hosted servers and clients
|
||||
content:
|
||||
application/json:
|
||||
@@ -42,7 +42,7 @@ get:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../models/PlexDevice.yaml
|
||||
'400':
|
||||
$ref: '../../responses/400.yaml'
|
||||
'401':
|
||||
$ref: '../../responses/401.yaml'
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
|
||||
@@ -34,10 +34,10 @@ get:
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
timespan:
|
||||
timespan:
|
||||
type: integer
|
||||
example: 6
|
||||
at:
|
||||
at:
|
||||
type: integer
|
||||
example: 1718384427
|
||||
hostCpuUtilization:
|
||||
@@ -55,8 +55,8 @@ get:
|
||||
processMemoryUtilization:
|
||||
type: number
|
||||
format: float
|
||||
example: 0.493
|
||||
example: 0.493
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
|
||||
@@ -4,7 +4,7 @@ get:
|
||||
summary: Get Session History
|
||||
description: This will Retrieve a listing of all history views.
|
||||
operationId: getSessionHistory
|
||||
parameters:
|
||||
parameters:
|
||||
- name: sort
|
||||
description: |
|
||||
Sorts the results by the specified field followed by the direction (asc, desc)
|
||||
@@ -12,7 +12,7 @@ get:
|
||||
schema:
|
||||
type: string
|
||||
required: false
|
||||
examples:
|
||||
examples:
|
||||
viewed-at-descending:
|
||||
value: viewedAt:desc
|
||||
viewed-at-ascending:
|
||||
@@ -25,7 +25,7 @@ get:
|
||||
description: |
|
||||
Filter results by those that are related to a specific users id
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: integer
|
||||
required: false
|
||||
example: 1
|
||||
@@ -36,7 +36,7 @@ get:
|
||||
in: query
|
||||
schema:
|
||||
type: object
|
||||
pattern: '^[A-Za-z][A-Za-z0-9]*[>=<]{0,2}$'
|
||||
pattern: "^[A-Za-z][A-Za-z0-9]*[>=<]{0,2}$"
|
||||
example:
|
||||
viewed-at-greater-than:
|
||||
value: viewedAt>
|
||||
@@ -52,7 +52,7 @@ get:
|
||||
description: |
|
||||
Filters the results based on the id of a valid library section
|
||||
in: query
|
||||
schema:
|
||||
schema:
|
||||
type: integer
|
||||
required: false
|
||||
example: 12
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
get:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
tags:
|
||||
- Authentication
|
||||
summary: Get User Data By Token
|
||||
description: Get the User data from the provided X-Plex-Token
|
||||
operationId: getUserDetails
|
||||
parameters:
|
||||
- $ref: '../../parameters/plex/x-plex-token.yaml'
|
||||
- $ref: "../../parameters/plex/x-plex-token.yaml"
|
||||
- $ref: "../../parameters/accept-application-json.yaml"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Logged in user details
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../models/UserPlexAccount.yaml
|
||||
'400':
|
||||
$ref: '../../responses/400.yaml'
|
||||
'401':
|
||||
$ref: '../../responses/401.yaml'
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
servers:
|
||||
- url: 'https://plex.tv/api/v2'
|
||||
- url: "https://plex.tv/api/v2"
|
||||
security: []
|
||||
tags:
|
||||
- Authentication
|
||||
@@ -31,7 +31,7 @@ post:
|
||||
default: false
|
||||
description: Login credentials
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Returns the user account data with a valid auth token
|
||||
content:
|
||||
application/json:
|
||||
@@ -51,7 +51,7 @@ post:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
'400':
|
||||
$ref: '../../responses/400.yaml'
|
||||
'401':
|
||||
$ref: '../../responses/401.yaml'
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
|
||||
Reference in New Issue
Block a user