mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
5.0 KiB
5.0 KiB
GetPersonMediaContainer
MediaContainer is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the parentTitle attribute may appear on the MediaContainer rather than being repeated on each track.
Example Usage
import { GetPersonMediaContainer } from "@lukehagar/plexjs/models/operations";
let value: GetPersonMediaContainer = {
directory: [
{
filter: "actor=49",
ratingKey: "58683",
role: "Secretary",
tag: "Shaun Lawton",
tagKey: "5d3ee12c4cde6a001c3e0b27",
thumb:
"http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg",
},
],
};
Fields
| Field | Type | Required | Description |
|---|---|---|---|
identifier |
string | ➖ | N/A |
offset |
number | ➖ | The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header. |
size |
number | ➖ | N/A |
totalSize |
number | ➖ | The total size of objects available. Also provided in the X-Plex-Container-Total-Size header. |
directory |
shared.Tag[] | ➖ | N/A |