mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-10 12:37:44 +00:00
corrections
This commit is contained in:
19
src/models/MediaContainer.yaml
Normal file
19
src/models/MediaContainer.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
title: MediaContainer
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- size
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: number
|
||||||
|
example: 50
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
totalSize:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
example: "com.plexapp.plugins.library"
|
||||||
|
allowSync:
|
||||||
|
type: boolean
|
||||||
129
src/models/Meta.yaml
Normal file
129
src/models/Meta.yaml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
description: |
|
||||||
|
The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
Type:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
- type
|
||||||
|
- title
|
||||||
|
- active
|
||||||
|
properties:
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
example: "/library/sections/2/all?type=2"
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
example: "show"
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: "TV Shows"
|
||||||
|
active:
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
Filter:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- filter
|
||||||
|
- filterType
|
||||||
|
- key
|
||||||
|
- title
|
||||||
|
- type
|
||||||
|
properties:
|
||||||
|
filter:
|
||||||
|
type: string
|
||||||
|
example: "genre"
|
||||||
|
filterType:
|
||||||
|
type: string
|
||||||
|
example: "string"
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
example: "/library/sections/2/genre?type=2"
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: "Genre"
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
example: "filter"
|
||||||
|
Sort:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
- title
|
||||||
|
- defaultDirection
|
||||||
|
properties:
|
||||||
|
default:
|
||||||
|
type: string
|
||||||
|
example: "asc"
|
||||||
|
active:
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
activeDirection:
|
||||||
|
$ref: "../models/common/PlexSortDirection.yaml"
|
||||||
|
defaultDirection:
|
||||||
|
$ref: "../models/common/PlexSortDirection.yaml"
|
||||||
|
descKey:
|
||||||
|
type: string
|
||||||
|
example: "titleSort:desc"
|
||||||
|
firstCharacterKey:
|
||||||
|
type: string
|
||||||
|
example: "/library/sections/2/firstCharacter"
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
example: "titleSort"
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: "Title"
|
||||||
|
Field:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
- title
|
||||||
|
- type
|
||||||
|
properties:
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
example: "show.title"
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: "Show Title"
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
example: "string"
|
||||||
|
subType:
|
||||||
|
type: string
|
||||||
|
example: "rating"
|
||||||
|
FieldType:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- Operator
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
example: "tag"
|
||||||
|
Operator:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
- title
|
||||||
|
properties:
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
example: "="
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
example: "is"
|
||||||
6
src/parameters/include-meta.yaml
Normal file
6
src/parameters/include-meta.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
name: includeMeta
|
||||||
|
in: query
|
||||||
|
description: |
|
||||||
|
Adds the Meta object to the response
|
||||||
|
schema:
|
||||||
|
$ref: "../models/common/PlexBoolean.yaml"
|
||||||
7
src/parameters/section-id.yaml
Normal file
7
src/parameters/section-id.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
name: sectionID
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: The library section ID for filtering content.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 2
|
||||||
42
src/paths/hubs/home/get-recently-added.yaml
Normal file
42
src/paths/hubs/home/get-recently-added.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Hubs
|
||||||
|
summary: Get Recently Added
|
||||||
|
description: |
|
||||||
|
This endpoint will return the recently added content.
|
||||||
|
operationId: get-recently-added
|
||||||
|
parameters:
|
||||||
|
- name: contentDirectoryID
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The content directory ID.
|
||||||
|
- name: pinnedContentDirectoryID
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Comma-separated list of pinned content directory IDs.
|
||||||
|
- $ref: "../../../parameters/section-id.yaml"
|
||||||
|
- $ref: "../../../parameters/type.yaml"
|
||||||
|
- $ref: "../../../parameters/include-meta.yaml"
|
||||||
|
- $ref: "../../../parameters/container-start.yaml"
|
||||||
|
- $ref: "../../../parameters/container-size.yaml"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: A successful response with recently added content.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
MediaContainer:
|
||||||
|
allOf:
|
||||||
|
- $ref: "../../../models/MediaContainer.yaml"
|
||||||
|
- $ref: "../../../models/Meta.yaml"
|
||||||
|
|
||||||
|
"401":
|
||||||
|
description: Unauthorized, invalid Plex token.
|
||||||
|
"400":
|
||||||
|
description: Bad request, invalid parameters.
|
||||||
@@ -58,12 +58,7 @@ get:
|
|||||||
Adds the Guids object to the response
|
Adds the Guids object to the response
|
||||||
schema:
|
schema:
|
||||||
$ref: "../../../models/common/PlexBoolean.yaml"
|
$ref: "../../../models/common/PlexBoolean.yaml"
|
||||||
- name: includeMeta
|
|
||||||
in: query
|
|
||||||
description: |
|
|
||||||
Adds the Meta object to the response
|
|
||||||
schema:
|
|
||||||
$ref: "../../../models/common/PlexBoolean.yaml"
|
|
||||||
- name: type
|
- name: type
|
||||||
in: query
|
in: query
|
||||||
description: |
|
description: |
|
||||||
@@ -76,6 +71,7 @@ get:
|
|||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: "../../../models/common/PlexMediaType.yaml"
|
$ref: "../../../models/common/PlexMediaType.yaml"
|
||||||
|
- $ref: "../../../parameters/include-meta.yaml"
|
||||||
- $ref: "../../../parameters/container-start.yaml"
|
- $ref: "../../../parameters/container-start.yaml"
|
||||||
- $ref: "../../../parameters/container-size.yaml"
|
- $ref: "../../../parameters/container-size.yaml"
|
||||||
- $ref: "../../../parameters/accept-application-json.yaml"
|
- $ref: "../../../parameters/accept-application-json.yaml"
|
||||||
@@ -88,7 +84,9 @@ get:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
MediaContainer:
|
MediaContainer:
|
||||||
type: object
|
allOf:
|
||||||
|
- $ref: "../../../models/Meta.yaml"
|
||||||
|
- type: object
|
||||||
required:
|
required:
|
||||||
- size
|
- size
|
||||||
- totalSize
|
- totalSize
|
||||||
@@ -419,7 +417,8 @@ get:
|
|||||||
example: 11558112
|
example: 11558112
|
||||||
file:
|
file:
|
||||||
type: string
|
type: string
|
||||||
example: /movies/Avatar The Way of Water
|
example:
|
||||||
|
/movies/Avatar The Way of Water
|
||||||
(2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
|
(2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv
|
||||||
size:
|
size:
|
||||||
type: integer
|
type: integer
|
||||||
|
|||||||
@@ -117,9 +117,7 @@ get:
|
|||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
contentChangedAt:
|
contentChangedAt:
|
||||||
type: integer
|
$ref: "../../models/common/PlexDateTime.yaml"
|
||||||
format: int32
|
|
||||||
example: 3192854
|
|
||||||
hidden:
|
hidden:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
|||||||
@@ -6,6 +6,23 @@ get:
|
|||||||
This endpoint will return the recently added content.
|
This endpoint will return the recently added content.
|
||||||
operationId: getRecentlyAdded
|
operationId: getRecentlyAdded
|
||||||
parameters:
|
parameters:
|
||||||
|
- name: contentDirectoryID
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 2
|
||||||
|
- name: pinnedContentDirectoryID
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
example: [3, 5, 7, 13, 12, 1, 6, 14, 2, 10, 16, 17]
|
||||||
|
- $ref: "../../parameters/section-id.yaml"
|
||||||
|
- $ref: "../../parameters/type.yaml"
|
||||||
|
- $ref: "../../parameters/include-meta.yaml"
|
||||||
- $ref: "../../parameters/container-start.yaml"
|
- $ref: "../../parameters/container-start.yaml"
|
||||||
- $ref: "../../parameters/container-size.yaml"
|
- $ref: "../../parameters/container-size.yaml"
|
||||||
responses:
|
responses:
|
||||||
@@ -17,7 +34,9 @@ get:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
MediaContainer:
|
MediaContainer:
|
||||||
type: object
|
allOf:
|
||||||
|
- $ref: "../../models/Meta.yaml"
|
||||||
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
size:
|
size:
|
||||||
type: number
|
type: number
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ paths:
|
|||||||
# Folder: pms/paths/hubs
|
# Folder: pms/paths/hubs
|
||||||
/hubs:
|
/hubs:
|
||||||
$ref: "./paths/hubs/hubs.yaml"
|
$ref: "./paths/hubs/hubs.yaml"
|
||||||
|
/hubs/home/recentlyAdded:
|
||||||
|
$ref: "./paths/hubs/home/get-recently-added.yaml"
|
||||||
/hubs/search:
|
/hubs/search:
|
||||||
$ref: "./paths/hubs/search.yaml"
|
$ref: "./paths/hubs/search.yaml"
|
||||||
/hubs/search/voice:
|
/hubs/search/voice:
|
||||||
|
|||||||
3618
tests/paths/hubs/home/get-recently-added.spec.ts
Normal file
3618
tests/paths/hubs/home/get-recently-added.spec.ts
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user