mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-07 12:37:44 +00:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
## Enable Paper Trail
|
||||
|
||||
This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
|
||||
@@ -0,0 +1,2 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import EnablePaperTrailResponse from "/content/types/models/operations/enable_paper_trail_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.EnablePaperTrailResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<EnablePaperTrailResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
<CH.Code>
|
||||
```python EnablePaperTrail.py
|
||||
import sdk
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.log.enable_paper_trail()
|
||||
|
||||
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';
|
||||
|
||||
###### *Log*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
22
content/pages/01-reference/python/resources/log/log.mdx
Normal file
22
content/pages/01-reference/python/resources/log/log.mdx
Normal file
@@ -0,0 +1,22 @@
|
||||
import LogLine from "./log_line/log_line.mdx";
|
||||
import LogMultiLine from "./log_multi_line/log_multi_line.mdx";
|
||||
import EnablePaperTrail from "./enable_paper_trail/enable_paper_trail.mdx";
|
||||
|
||||
## Log
|
||||
Submit logs to the Log Handler for Plex Media Server
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [Log Line](/python/log/log_line) - Logging a single line message.
|
||||
* [Log Multi Line](/python/log/log_multi_line) - Logging a multi-line message
|
||||
* [Enable Paper Trail](/python/log/enable_paper_trail) - Enabling Papertrail
|
||||
|
||||
---
|
||||
<LogLine />
|
||||
|
||||
---
|
||||
<LogMultiLine />
|
||||
|
||||
---
|
||||
<EnablePaperTrail />
|
||||
@@ -0,0 +1,3 @@
|
||||
## Log Line
|
||||
|
||||
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
||||
@@ -0,0 +1,26 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import Level from "/content/types/models/operations/level/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### `level` *{`operations.Level`}*
|
||||
An integer log level to write to the PMS log with.
|
||||
0: Error
|
||||
1: Warning
|
||||
2: Info
|
||||
3: Debug
|
||||
4: Verbose
|
||||
|
||||
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<Level/>
|
||||
</Collapsible>
|
||||
|
||||
---
|
||||
##### `message` *{`str`}*
|
||||
The text of the message to write to the log.
|
||||
|
||||
---
|
||||
##### `source` *{`str`}*
|
||||
a string indicating the source of the message.
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import LogLineResponse from "/content/types/models/operations/log_line_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.LogLineResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<LogLineResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<CH.Code>
|
||||
```python LogLine.py
|
||||
import sdk
|
||||
from sdk.models import operations
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.log.log_line(level=operations.Level.FOUR, message='string', source='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>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Log*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -0,0 +1,3 @@
|
||||
## Log Multi Line
|
||||
|
||||
This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
|
||||
@@ -0,0 +1,2 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import LogMultiLineResponse from "/content/types/models/operations/log_multi_line_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.LogMultiLineResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<LogMultiLineResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
<CH.Code>
|
||||
```python LogMultiLine.py
|
||||
import sdk
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.log.log_multi_line()
|
||||
|
||||
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';
|
||||
|
||||
###### *Log*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
Reference in New Issue
Block a user