added thumb and banner image endpoint

This commit is contained in:
JasonLandbridge
2024-09-03 14:13:32 +02:00
parent b2f43e3920
commit 4e44fd3e77
11 changed files with 416 additions and 26 deletions

View File

@@ -0,0 +1,79 @@
get:
summary: Get Banner Image
description: Gets the banner image of the media item
operationId: get-banner-image
parameters:
- name: ratingKey
in: path
description: the id of the library item to return the children of.
schema:
type: integer
example: 9518
required: true
- $ref: "../../../../../parameters/image/width.yaml"
- $ref: "../../../../../parameters/image/height.yaml"
- $ref: "../../../../../parameters/image/min-size.yaml"
- $ref: "../../../../../parameters/image/upscale.yaml"
responses:
'200':
description: Successful response returning an image
headers:
X-Plex-Protocol:
description: Version of the Plex protocol
schema:
type: string
example: "1.0"
Content-Type:
description: The MIME type of the returned content
schema:
type: string
example: "image/jpeg"
Connection:
description: Connection type
schema:
type: string
example: "Keep-Alive"
Keep-Alive:
description: Keep-Alive header with timeout value
schema:
type: string
example: "timeout=20"
Content-Encoding:
description: Content encoding method
schema:
type: string
example: "gzip"
X-Plex-Content-Original-Length:
description: Original length of the uncompressed content
schema:
type: integer
format: int32
example: 92476
X-Plex-Content-Compressed-Length:
description: Length of the compressed content
schema:
type: integer
format: int32
example: 92483
Content-Length:
description: Length of the response content
schema:
type: integer
format: int32
example: 92483
Cache-Control:
description: Cache control directives
schema:
type: string
example: "max-age=259200"
Date:
description: Date and time the response was generated
schema:
type: string
format: date-time
example: "Tue, 03 Sep 2024 10:48:05 GMT"
content:
image/jpeg:
schema:
type: string
format: binary

View File

@@ -1,20 +1,18 @@
get:
tags:
- Library
summary: Get Items Metadata
summary: Get Metadata by RatingKey
description: |
This endpoint will return the metadata of a library item specified with the ratingKey.
operationId: getMetadata
operationId: get-meta-data-by-rating-key
parameters:
- name: ratingKey
description: the id of the library item to return the children of.
in: path
description: the id of the library item to return the children of.
schema:
type: number
type: integer
example: 9518
required: true
examples:
rating-key:
value: 17
responses:
"200":
description: The metadata of the library item.
@@ -91,8 +89,7 @@ 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
@@ -496,6 +493,6 @@ get:
type: string
example: https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg
"400":
$ref: "../../responses/400.yaml"
$ref: "../../../../responses/400.yaml"
"401":
$ref: "../../responses/401.yaml"
$ref: "../../../../responses/401.yaml"

View File

@@ -0,0 +1,79 @@
get:
summary: Get Banner Image
description: Gets the banner image of the media item
operationId: get-thumb-image
parameters:
- name: ratingKey
in: path
description: the id of the library item to return the children of.
schema:
type: integer
example: 9518
required: true
- $ref: "../../../../../parameters/image/width.yaml"
- $ref: "../../../../../parameters/image/height.yaml"
- $ref: "../../../../../parameters/image/min-size.yaml"
- $ref: "../../../../../parameters/image/upscale.yaml"
responses:
'200':
description: Successful response returning an image
headers:
X-Plex-Protocol:
description: Version of the Plex protocol
schema:
type: string
example: "1.0"
Content-Type:
description: The MIME type of the returned content
schema:
type: string
example: "image/jpeg"
Connection:
description: Connection type
schema:
type: string
example: "Keep-Alive"
Keep-Alive:
description: Keep-Alive header with timeout value
schema:
type: string
example: "timeout=20"
Content-Encoding:
description: Content encoding method
schema:
type: string
example: "gzip"
X-Plex-Content-Original-Length:
description: Original length of the uncompressed content
schema:
type: integer
format: int32
example: 92476
X-Plex-Content-Compressed-Length:
description: Length of the compressed content
schema:
type: integer
format: int32
example: 92483
Content-Length:
description: Length of the response content
schema:
type: integer
format: int32
example: 92483
Cache-Control:
description: Cache control directives
schema:
type: string
example: "max-age=259200"
Date:
description: Date and time the response was generated
schema:
type: string
format: date-time
example: "Tue, 03 Sep 2024 10:48:05 GMT"
content:
image/jpeg:
schema:
type: string
format: binary

View File

@@ -2,8 +2,8 @@ get:
servers:
- url: 'https://plex.tv/api/v2'
tags:
- User
summary: Get UserData By Token
- Authentication
summary: Get User Data By Token
description: Get the User data from the provided X-Plex-Token
operationId: getUserDetails
parameters: