mirror of
https://github.com/LukeHagar/plex-api-spec.git
synced 2025-12-10 12:37:44 +00:00
added a new search all libraries endpoint with tests
This commit is contained in:
File diff suppressed because it is too large
Load Diff
6
src/parameters/query.yaml
Normal file
6
src/parameters/query.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
name: query
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The search query term.
|
||||
@@ -39,7 +39,9 @@ get:
|
||||
Meta:
|
||||
$ref: "../../../models/Meta.yaml"
|
||||
Metadata:
|
||||
$ref: "../../../models/MetaData.yaml"
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../models/MetaData.yaml"
|
||||
|
||||
"401":
|
||||
description: Unauthorized, invalid Plex token.
|
||||
|
||||
@@ -171,7 +171,9 @@ get:
|
||||
type: boolean
|
||||
example: true
|
||||
Metadata:
|
||||
$ref: "../../../models/MetaData.yaml"
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../models/MetaData.yaml"
|
||||
Meta:
|
||||
description: |
|
||||
The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
||||
|
||||
81
src/paths/library/get-search-all-libraries.yaml
Normal file
81
src/paths/library/get-search-all-libraries.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
get:
|
||||
tags:
|
||||
- Library
|
||||
summary: Search All Libraries
|
||||
operationId: get-search-all-libraries
|
||||
description: |
|
||||
Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
|
||||
parameters:
|
||||
- $ref: "../../parameters/query.yaml"
|
||||
- $ref: "../../parameters/plex/x-plex-identifier.yaml"
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: Limit the number of results returned.
|
||||
- name: searchTypes
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- movies
|
||||
- music
|
||||
- otherVideos
|
||||
- people
|
||||
- tv
|
||||
example: movies,music,otherVideos,people,tv
|
||||
style: form
|
||||
explode: false
|
||||
description: |
|
||||
A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.
|
||||
- name: includeCollections
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
$ref: "../../models/common/PlexBoolean.yaml"
|
||||
description: Whether to include collections in the search results.
|
||||
- name: includeExternalMedia
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
$ref: "../../models/common/PlexBoolean.yaml"
|
||||
description: Whether to include external media in the search results.
|
||||
responses:
|
||||
"200":
|
||||
description: The libraries available on the Server
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- MediaContainer
|
||||
properties:
|
||||
MediaContainer:
|
||||
type: object
|
||||
required:
|
||||
- size
|
||||
- SearchResult
|
||||
properties:
|
||||
size:
|
||||
type: number
|
||||
SearchResult:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- score
|
||||
- Metadata
|
||||
properties:
|
||||
score:
|
||||
type: number
|
||||
format: float # This is correct for 32-bit floating-point numbers
|
||||
Metadata:
|
||||
$ref: "../../models/MetaData.yaml"
|
||||
"400":
|
||||
$ref: "../../responses/400.yaml"
|
||||
"401":
|
||||
$ref: "../../responses/401.yaml"
|
||||
@@ -179,6 +179,9 @@ paths:
|
||||
/library/sections/{sectionKey}/search:
|
||||
$ref: "./paths/library/[sectionKey]/get-search-library.yaml"
|
||||
|
||||
/library/search:
|
||||
$ref: "./paths/library/get-search-all-libraries.yaml"
|
||||
|
||||
/library/metadata/{ratingKey}:
|
||||
$ref: "./paths/library/metadata/[ratingKey]/get-meta-data-by-rating-key.yaml"
|
||||
/library/metadata/{ratingKey}/banner:
|
||||
|
||||
35304
tests/paths/library/get-search-library.spec.ts
Normal file
35304
tests/paths/library/get-search-library.spec.ts
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user