mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-09 12:37:46 +00:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
## Get Session History
|
||||
|
||||
This will Retrieve a listing of all history views.
|
||||
@@ -0,0 +1,2 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetSessionHistoryResponse from "/content/types/models/operations/get_session_history_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetSessionHistoryResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetSessionHistoryResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetSessionHistory.py
|
||||
import sdk
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.sessions.get_session_history()
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Sessions*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -0,0 +1,3 @@
|
||||
## Get Sessions
|
||||
|
||||
This will retrieve the "Now Playing" Information of the PMS.
|
||||
@@ -0,0 +1,2 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetSessionsResponse from "/content/types/models/operations/get_sessions_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetSessionsResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetSessionsResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetSessions.py
|
||||
import sdk
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.sessions.get_sessions()
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Sessions*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -0,0 +1,3 @@
|
||||
## Get Transcode Sessions
|
||||
|
||||
Get Transcode Sessions
|
||||
@@ -0,0 +1,2 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetTranscodeSessionsResponse from "/content/types/models/operations/get_transcode_sessions_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetTranscodeSessionsResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetTranscodeSessionsResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetTranscodeSessions.py
|
||||
import sdk
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.sessions.get_transcode_sessions()
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"MediaContainer": {
|
||||
"size": 1,
|
||||
"TranscodeSession": [
|
||||
{
|
||||
"key": "zz7llzqlx8w9vnrsbnwhbmep",
|
||||
"throttled": false,
|
||||
"complete": false,
|
||||
"progress": 0.4000000059604645,
|
||||
"size": -22,
|
||||
"speed": 22.399999618530273,
|
||||
"error": false,
|
||||
"duration": 2561768,
|
||||
"context": "streaming",
|
||||
"sourceVideoCodec": "h264",
|
||||
"sourceAudioCodec": "ac3",
|
||||
"videoDecision": "transcode",
|
||||
"audioDecision": "transcode",
|
||||
"protocol": "http",
|
||||
"container": "mkv",
|
||||
"videoCodec": "h264",
|
||||
"audioCodec": "opus",
|
||||
"audioChannels": 2,
|
||||
"transcodeHwRequested": false,
|
||||
"timeStamp": 1681869535.7764285,
|
||||
"maxOffsetAvailable": 861.778,
|
||||
"minOffsetAvailable": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Sessions*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -0,0 +1,27 @@
|
||||
import GetSessions from "./get_sessions/get_sessions.mdx";
|
||||
import GetSessionHistory from "./get_session_history/get_session_history.mdx";
|
||||
import GetTranscodeSessions from "./get_transcode_sessions/get_transcode_sessions.mdx";
|
||||
import StopTranscodeSession from "./stop_transcode_session/stop_transcode_session.mdx";
|
||||
|
||||
## Sessions
|
||||
API Calls that perform search operations with Plex Media Server Sessions
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [Get Sessions](/python/sessions/get_sessions) - Get Active Sessions
|
||||
* [Get Session History](/python/sessions/get_session_history) - Get Session History
|
||||
* [Get Transcode Sessions](/python/sessions/get_transcode_sessions) - Get Transcode Sessions
|
||||
* [Stop Transcode Session](/python/sessions/stop_transcode_session) - Stop a Transcode Session
|
||||
|
||||
---
|
||||
<GetSessions />
|
||||
|
||||
---
|
||||
<GetSessionHistory />
|
||||
|
||||
---
|
||||
<GetTranscodeSessions />
|
||||
|
||||
---
|
||||
<StopTranscodeSession />
|
||||
@@ -0,0 +1,3 @@
|
||||
## Stop Transcode Session
|
||||
|
||||
Stop a Transcode Session
|
||||
@@ -0,0 +1,7 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `session_key` *{`str`}*
|
||||
the Key of the transcode session to stop
|
||||
<br/>
|
||||
**Example:** `zz7llzqlx8w9vnrsbnwhbmep`
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import StopTranscodeSessionResponse from "/content/types/models/operations/stop_transcode_session_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.StopTranscodeSessionResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<StopTranscodeSessionResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<CH.Code>
|
||||
```python StopTranscodeSession.py
|
||||
import sdk
|
||||
from sdk.models import operations
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.sessions.stop_transcode_session(session_key='zz7llzqlx8w9vnrsbnwhbmep')
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Sessions*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
Reference in New Issue
Block a user