Initial Commit

This commit is contained in:
Luke Hagar
2024-01-01 15:47:37 -06:00
parent 203c48ae7c
commit f91c1e6f54
4519 changed files with 88021 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import GetServerActivities from "./get_server_activities/get_server_activities.mdx";
import CancelServerActivities from "./cancel_server_activities/cancel_server_activities.mdx";
## Activities
Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real\-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
Activities are associated with HTTP replies via a special `X\-Plex\-Activity` header which contains the UUID of the activity.
Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
\- They can contain a `progress` (from 0 to 100) marking the percent completion of the activity.
\- They must contain an `type` which is used by clients to distinguish the specific activity.
\- They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
\- The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
### Available Operations
* [Get Server Activities](/python/activities/get_server_activities) - Get Server Activities
* [Cancel Server Activities](/python/activities/cancel_server_activities) - Cancel Server Activities
---
<GetServerActivities />
---
<CancelServerActivities />

View File

@@ -0,0 +1,3 @@
## Cancel Server Activities
Cancel Server Activities

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `activity_uuid` *{`str`}*
The UUID of the activity to cancel.

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import CancelServerActivitiesResponse from "/content/types/models/operations/cancel_server_activities_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.CancelServerActivitiesResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<CancelServerActivitiesResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python CancelServerActivities.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.activities.cancel_server_activities(activity_uuid='string')
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Activities*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Server Activities
Get Server Activities

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetServerActivitiesResponse from "/content/types/models/operations/get_server_activities_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetServerActivitiesResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetServerActivitiesResponse/>
</Collapsible>

View File

@@ -0,0 +1,40 @@
<CH.Code>
```python GetServerActivities.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.activities.get_server_activities()
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"MediaContainer": {
"size": 6235.64,
"Activity": [
{
"uuid": "string",
"type": "string",
"cancellable": false,
"userID": 6458.94,
"title": "string",
"subtitle": "string",
"progress": 3843.82,
"Context": {
"librarySectionID": "string"
}
}
]
}
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Activities*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,32 @@
import GetButlerTasks from "./get_butler_tasks/get_butler_tasks.mdx";
import StartAllTasks from "./start_all_tasks/start_all_tasks.mdx";
import StopAllTasks from "./stop_all_tasks/stop_all_tasks.mdx";
import StartTask from "./start_task/start_task.mdx";
import StopTask from "./stop_task/stop_task.mdx";
## Butler
Butler is the task manager of the Plex Media Server Ecosystem.
### Available Operations
* [Get Butler Tasks](/python/butler/get_butler_tasks) - Get Butler tasks
* [Start All Tasks](/python/butler/start_all_tasks) - Start all Butler tasks
* [Stop All Tasks](/python/butler/stop_all_tasks) - Stop all Butler tasks
* [Start Task](/python/butler/start_task) - Start a single Butler task
* [Stop Task](/python/butler/stop_task) - Stop a single Butler task
---
<GetButlerTasks />
---
<StartAllTasks />
---
<StopAllTasks />
---
<StartTask />
---
<StopTask />

View File

@@ -0,0 +1,3 @@
## Get Butler Tasks
Returns a list of butler tasks

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetButlerTasksResponse from "/content/types/models/operations/get_butler_tasks_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetButlerTasksResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetButlerTasksResponse/>
</Collapsible>

View File

@@ -0,0 +1,35 @@
<CH.Code>
```python GetButlerTasks.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.butler.get_butler_tasks()
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"ButlerTasks": {
"ButlerTask": [
{
"name": "BackupDatabase",
"interval": 3,
"scheduleRandomized": false,
"enabled": false,
"title": "Backup Database",
"description": "Create a backup copy of the server's database in the configured backup directory"
}
]
}
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Butler*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,7 @@
## Start All Tasks
This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
1. Any tasks not scheduled to run on the current day will be skipped.
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
4. If we are outside the configured window, the task will start immediately.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import StartAllTasksResponse from "/content/types/models/operations/start_all_tasks_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.StartAllTasksResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<StartAllTasksResponse/>
</Collapsible>

View File

@@ -0,0 +1,30 @@
<CH.Code>
```python StartAllTasks.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.butler.start_all_tasks()
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Butler*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,7 @@
## Start Task
This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
1. Any tasks not scheduled to run on the current day will be skipped.
2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
4. If we are outside the configured window, the task will start immediately.

View File

@@ -0,0 +1,12 @@
{/* Autogenerated DO NOT EDIT */}
import TaskName from "/content/types/models/operations/task_name/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `task_name` *{`operations.TaskName`}*
the name of the task to be started.
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<TaskName/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import StartTaskResponse from "/content/types/models/operations/start_task_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.StartTaskResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<StartTaskResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python StartTask.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.butler.start_task(task_name=operations.TaskName.REFRESH_PERIODIC_METADATA)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Butler*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Stop All Tasks
This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import StopAllTasksResponse from "/content/types/models/operations/stop_all_tasks_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.StopAllTasksResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<StopAllTasksResponse/>
</Collapsible>

View File

@@ -0,0 +1,30 @@
<CH.Code>
```python StopAllTasks.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.butler.stop_all_tasks()
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Butler*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Stop Task
This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.

View File

@@ -0,0 +1,12 @@
{/* Autogenerated DO NOT EDIT */}
import PathParamTaskName from "/content/types/models/operations/path_param_task_name/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `task_name` *{`operations.PathParamTaskName`}*
The name of the task to be started.
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<PathParamTaskName/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import StopTaskResponse from "/content/types/models/operations/stop_task_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.StopTaskResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<StopTaskResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python StopTask.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.butler.stop_task(task_name=operations.PathParamTaskName.GENERATE_CHAPTER_THUMBS)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Butler*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Global Hubs
Get Global Hubs filtered by the parameters provided.

View File

@@ -0,0 +1,16 @@
{/* Autogenerated DO NOT EDIT */}
import OnlyTransient from "/content/types/models/operations/only_transient/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `count` *{`Optional[float]`}*
The number of items to return with each hub.
---
##### `only_transient` *{`Optional[operations.OnlyTransient]`}*
Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<OnlyTransient/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetGlobalHubsResponse from "/content/types/models/operations/get_global_hubs_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetGlobalHubsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetGlobalHubsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetGlobalHubs.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.hubs.get_global_hubs(count=8472.52, only_transient=operations.OnlyTransient.ZERO)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Hubs*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Library Hubs
This endpoint will return a list of library specific hubs

View File

@@ -0,0 +1,20 @@
{/* Autogenerated DO NOT EDIT */}
import QueryParamOnlyTransient from "/content/types/models/operations/query_param_only_transient/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `count` *{`Optional[float]`}*
The number of items to return with each hub.
---
##### `only_transient` *{`Optional[operations.QueryParamOnlyTransient]`}*
Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<QueryParamOnlyTransient/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibraryHubsResponse from "/content/types/models/operations/get_library_hubs_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibraryHubsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibraryHubsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLibraryHubs.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.hubs.get_library_hubs(section_id=6235.64, count=6458.94, only_transient=operations.QueryParamOnlyTransient.ZERO)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Hubs*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,17 @@
import GetGlobalHubs from "./get_global_hubs/get_global_hubs.mdx";
import GetLibraryHubs from "./get_library_hubs/get_library_hubs.mdx";
## Hubs
Hubs are a structured two\-dimensional container for media, generally represented by multiple horizontal rows.
### Available Operations
* [Get Global Hubs](/python/hubs/get_global_hubs) - Get Global Hubs
* [Get Library Hubs](/python/hubs/get_library_hubs) - Get library specific hubs
---
<GetGlobalHubs />
---
<GetLibraryHubs />

View File

@@ -0,0 +1,3 @@
## Delete Library
Delate a library using a specific section

View File

@@ -0,0 +1,7 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
<br/>
**Example:** `1000`

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import DeleteLibraryResponse from "/content/types/models/operations/delete_library_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.DeleteLibraryResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<DeleteLibraryResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python DeleteLibrary.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.delete_library(section_id=1000)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Common Library Items
Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`float`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetCommonLibraryItemsResponse from "/content/types/models/operations/get_common_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetCommonLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetCommonLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetCommonLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_common_library_items(section_id=5288.95, type=4799.77, filter_='string')
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get File Hash
This resource returns hash values for local files

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
##### `url` *{`str`}*
This is the path to the local file, must be prefixed by `file://`
<br/>
**Example:** `file://C:\Image.png&type=13`
---
##### `type` *{`Optional[float]`}*
Item type

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetFileHashResponse from "/content/types/models/operations/get_file_hash_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetFileHashResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetFileHashResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetFileHash.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_file_hash(url='file://C:\Image.png&type=13', type=567.13)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Latest Library Items
This endpoint will return a list of the latest library items filtered by the filter and type provided

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`float`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLatestLibraryItemsResponse from "/content/types/models/operations/get_latest_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLatestLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLatestLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLatestLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_latest_library_items(section_id=7917.25, type=8121.69, filter_='string')
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,8 @@
## Get Libraries
A library section (commonly referred to as just a library) is a collection of media.
Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media.
For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat.
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).

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibrariesResponse from "/content/types/models/operations/get_libraries_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibrariesResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibrariesResponse/>
</Collapsible>

View File

@@ -0,0 +1,30 @@
<CH.Code>
```python GetLibraries.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_libraries()
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,21 @@
## Get Library
Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are:
- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly.
- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains:
- `key`: This provides the root endpoint returning the actual media list for the type.
- `type`: This is the metadata type for the type (if a standard Plex type).
- `title`: The title for for the content of this type (e.g. "Movies").
- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API.
- `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with.
- `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
- `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element.
- `title`: The title for the filter.
- Each `Sort` object contains a description of the sort field.
- `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending).
- `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort.
- `title`: The title of the field.

View File

@@ -0,0 +1,20 @@
{/* Autogenerated DO NOT EDIT */}
import IncludeDetails from "/content/types/models/operations/include_details/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `section_id` *{`float`}*
the Id of the library to query
<br/>
**Example:** `1000`
---
##### `include_details` *{`Optional[operations.IncludeDetails]`}*
Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<IncludeDetails/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibraryResponse from "/content/types/models/operations/get_library_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibraryResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibraryResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLibrary.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_library(section_id=1000, include_details=operations.IncludeDetails.ONE)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Library Items
This endpoint will return a list of library items filtered by the filter and type provided

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`Optional[float]`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibraryItemsResponse from "/content/types/models/operations/get_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_library_items(section_id=2726.56, type=3834.41, filter_='string')
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Metadata
This endpoint will return the metadata of a library item specified with the ratingKey.

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `rating_key` *{`float`}*
the id of the library item to return the children of.

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetMetadataResponse from "/content/types/models/operations/get_metadata_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetMetadataResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetMetadataResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetMetadata.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_metadata(rating_key=5680.45)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Metadata Children
This endpoint will return the children of of a library item specified with the ratingKey.

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `rating_key` *{`float`}*
the id of the library item to return the children of.

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetMetadataChildrenResponse from "/content/types/models/operations/get_metadata_children_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetMetadataChildrenResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetMetadataChildrenResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetMetadataChildren.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_metadata_children(rating_key=3927.85)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get On Deck
This endpoint will return the on deck content.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetOnDeckResponse from "/content/types/models/operations/get_on_deck_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetOnDeckResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetOnDeckResponse/>
</Collapsible>

View File

@@ -0,0 +1,131 @@
<CH.Code>
```python GetOnDeck.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_on_deck()
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"MediaContainer": {
"size": 16,
"allowSync": false,
"identifier": "com.plexapp.plugins.library",
"mediaTagPrefix": "/system/bundle/media/flags/",
"mediaTagVersion": 1680021154,
"mixedParents": false,
"Metadata": [
{
"allowSync": false,
"librarySectionID": 2,
"librarySectionTitle": "TV Shows",
"librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd",
"ratingKey": 49564,
"key": "/library/metadata/49564",
"parentRatingKey": 49557,
"grandparentRatingKey": 49556,
"guid": "plex://episode/5ea7d7402e7ab10042e74d4f",
"parentGuid": "plex://season/602e754d67f4c8002ce54b3d",
"grandparentGuid": "plex://show/5d9c090e705e7a001e6e94d8",
"type": "episode",
"title": "Circus",
"grandparentKey": "/library/metadata/49556",
"parentKey": "/library/metadata/49557",
"librarySectionKey": "/library/sections/2",
"grandparentTitle": "Bluey (2018)",
"parentTitle": "Season 2",
"contentRating": "TV-Y",
"summary": "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.",
"index": 33,
"parentIndex": 2,
"lastViewedAt": 1681908352,
"year": 2018,
"thumb": "/library/metadata/49564/thumb/1654258204",
"art": "/library/metadata/49556/art/1680939546",
"parentThumb": "/library/metadata/49557/thumb/1654258204",
"grandparentThumb": "/library/metadata/49556/thumb/1680939546",
"grandparentArt": "/library/metadata/49556/art/1680939546",
"grandparentTheme": "/library/metadata/49556/theme/1680939546",
"duration": 420080,
"originallyAvailableAt": "2020-10-31T00:00:00Z",
"addedAt": 1654258196,
"updatedAt": 1654258204,
"Media": [
{
"id": 80994,
"duration": 420080,
"bitrate": 1046,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "hevc",
"videoResolution": "1080",
"container": "mkv",
"videoFrameRate": "PAL",
"audioProfile": "lc",
"videoProfile": "main",
"Part": [
{
"id": 80994,
"key": "/library/parts/80994/1655007810/file.mkv",
"duration": 420080,
"file": "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv",
"size": 55148931,
"audioProfile": "lc",
"container": "mkv",
"videoProfile": "main",
"Stream": [
{
"id": 211234,
"streamType": 1,
"default": false,
"codec": "hevc",
"index": 0,
"bitrate": 918,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": "4:2:0",
"codedHeight": 1080,
"codedWidth": 1920,
"colorRange": "tv",
"frameRate": 25,
"height": 1080,
"level": 120,
"profile": "main",
"refFrames": 1,
"width": 1920,
"displayTitle": "1080p (HEVC Main)",
"extendedDisplayTitle": "1080p (HEVC Main)"
}
]
}
]
}
],
"guids": [
{
"id": "imdb://tt13303712"
}
]
}
]
}
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Recently Added
This endpoint will return the recently added content.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

Some files were not shown because too many files have changed in this diff Show More