cleaned up Get All Libraries endpoint

This commit is contained in:
JasonLandbridge
2025-04-05 11:13:38 +02:00
parent 5cbcef13ba
commit 462b30f914
24 changed files with 426 additions and 190 deletions

View File

@@ -10,6 +10,8 @@ get:
Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts.
This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
parameters:
- $ref: "../../parameters/accept-application-json.yaml"
responses:
"200":
description: The libraries available on the Server
@@ -17,126 +19,59 @@ get:
application/json:
schema:
type: object
required:
- MediaContainer
properties:
MediaContainer:
type: object
required:
- size
- allowSync
- title1
- Directory
properties:
size:
type: integer
format: int32
example: 5
allowSync:
type: boolean
example: false
title1:
type: string
example: Plex Library
Directory:
type: array
items:
type: object
required:
- allowSync
- art
- composite
- filters
- refreshing
- thumb
- key
- type
- title
- agent
- scanner
- language
- uuid
- updatedAt
- createdAt
- scannedAt
- content
- directory
- contentChangedAt
- hidden
- Location
properties:
allowSync:
type: boolean
example: true
art:
type: string
example: /:/resources/movie-fanart.jpg
composite:
type: string
example: /library/sections/1/composite/1705615584
filters:
type: boolean
example: true
refreshing:
type: boolean
example: false
thumb:
type: string
example: /:/resources/movie.png
key:
type: string
example: "1"
type:
type: string
example: movie
title:
type: string
example: Movies
agent:
type: string
example: tv.plex.agents.movie
scanner:
type: string
example: Plex Movie
language:
type: string
example: en-US
uuid:
type: string
example: 322a231a-b7f7-49f5-920f-14c61199cd30
updatedAt:
$ref: "../../models/common/PlexDateTime.yaml"
createdAt:
$ref: "../../models/common/PlexDateTime.yaml"
scannedAt:
$ref: "../../models/common/PlexDateTime.yaml"
content:
type: boolean
example: true
directory:
type: boolean
example: true
contentChangedAt:
$ref: "../../models/common/PlexDateTime.yaml"
hidden:
type: integer
format: int32
example: 0
Location:
type: array
items:
type: object
required:
- id
- path
properties:
id:
type: integer
format: int32
example: 1
path:
type: string
example: /movies
allOf:
- $ref: "../../models/media-container/size.yaml"
- $ref: "../../models/media-container/allow-sync.yaml"
- $ref: "../../models/media-container/title1.yaml"
- type: object
properties:
Directory:
type: array
items:
required:
- Location
allOf:
- $ref: "../../models/media-container/allow-sync.yaml"
- $ref: "../../models/media-container/art.yaml"
- $ref: "../../models/directory/composite.yaml"
- $ref: "../../models/directory/filters.yaml"
- $ref: "../../models/directory/refreshing.yaml"
- $ref: "../../models/media-container/thumb.yaml"
- $ref: "../../models/directory/key.yaml"
- $ref: "../../models/directory/type.yaml"
- $ref: "../../models/directory/title.yaml"
- $ref: "../../models/directory/agent.yaml"
- $ref: "../../models/directory/scanner.yaml"
- $ref: "../../models/directory/language.yaml"
- $ref: "../../models/directory/uuid.yaml"
- $ref: "../../models/directory/updated-at.yaml"
- $ref: "../../models/directory/created-at.yaml"
- $ref: "../../models/directory/scanned-at.yaml"
- $ref: "../../models/directory/content.yaml"
- $ref: "../../models/directory/directory.yaml"
- $ref: "../../models/directory/content-changed-at.yaml"
- $ref: "../../models/directory/hidden.yaml"
- type: object
properties:
Location:
type: array
items:
type: object
required:
- id
- path
properties:
id:
type: integer
format: int32
description: The ID of the location.
example: 1
path:
type: string
description: The path to the media item.
example: /Movies
"400":
$ref: "../../responses/400.yaml"
"401":