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
|
||||
schema:
|
||||
$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
|
||||
in: query
|
||||
description: |
|
||||
@@ -76,6 +71,7 @@ get:
|
||||
required: false
|
||||
schema:
|
||||
$ref: "../../../models/common/PlexMediaType.yaml"
|
||||
- $ref: "../../../parameters/include-meta.yaml"
|
||||
- $ref: "../../../parameters/container-start.yaml"
|
||||
- $ref: "../../../parameters/container-size.yaml"
|
||||
- $ref: "../../../parameters/accept-application-json.yaml"
|
||||
@@ -88,7 +84,9 @@ get:
|
||||
type: object
|
||||
properties:
|
||||
MediaContainer:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: "../../../models/Meta.yaml"
|
||||
- type: object
|
||||
required:
|
||||
- size
|
||||
- totalSize
|
||||
@@ -419,7 +417,8 @@ get:
|
||||
example: 11558112
|
||||
file:
|
||||
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
|
||||
size:
|
||||
type: integer
|
||||
|
||||
@@ -117,9 +117,7 @@ get:
|
||||
type: boolean
|
||||
example: true
|
||||
contentChangedAt:
|
||||
type: integer
|
||||
format: int32
|
||||
example: 3192854
|
||||
$ref: "../../models/common/PlexDateTime.yaml"
|
||||
hidden:
|
||||
type: integer
|
||||
format: int32
|
||||
|
||||
@@ -6,6 +6,23 @@ get:
|
||||
This endpoint will return the recently added content.
|
||||
operationId: getRecentlyAdded
|
||||
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-size.yaml"
|
||||
responses:
|
||||
@@ -17,7 +34,9 @@ get:
|
||||
type: object
|
||||
properties:
|
||||
MediaContainer:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: "../../models/Meta.yaml"
|
||||
- type: object
|
||||
properties:
|
||||
size:
|
||||
type: number
|
||||
|
||||
@@ -108,6 +108,8 @@ paths:
|
||||
# Folder: pms/paths/hubs
|
||||
/hubs:
|
||||
$ref: "./paths/hubs/hubs.yaml"
|
||||
/hubs/home/recentlyAdded:
|
||||
$ref: "./paths/hubs/home/get-recently-added.yaml"
|
||||
/hubs/search:
|
||||
$ref: "./paths/hubs/search.yaml"
|
||||
/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