ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.161.0

This commit is contained in:
speakeasybot
2024-02-01 01:15:48 +00:00
parent e2b41d334e
commit 4318bd5e0f
559 changed files with 19414 additions and 0 deletions

150
docs/sdks/log/README.md Normal file
View File

@@ -0,0 +1,150 @@
# Log
(*log*)
## Overview
Submit logs to the Log Handler for Plex Media Server
### Available Operations
* [log_line](#log_line) - Logging a single line message.
* [log_multi_line](#log_multi_line) - Logging a multi-line message
* [enable_paper_trail](#enable_paper_trail) - Enabling Papertrail
## log_line
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
### Example Usage
```python
import plex_api
from plex_api.models import operations
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.log.log_line(level=operations.Level.THREE, message='Test log message', source='Postman')
if res.status_code == 200:
# handle response
pass
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `message` | *str* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *str* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
### Response
**[operations.LogLineResponse](../../models/operations/loglineresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| -------------------------- | -------------------------- | -------------------------- |
| errors.LogLineResponseBody | 401 | application/json |
| errors.SDKError | 4x-5xx | */* |
## log_multi_line
This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
It accepts a text/plain request body, where each line represents a distinct log entry.
Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
Log entries are separated by a newline character (`\n`).
Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
- `0`: Error - Critical issues that require immediate attention.
- `1`: Warning - Important events that are not critical but may indicate potential issues.
- `2`: Info - General informational messages about system operation.
- `3`: Debug - Detailed information useful for debugging purposes.
- `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
Example of a single log entry format:
`level=4&message=Sample%20log%20entry&source=applicationName`
Ensure each parameter is properly URL-encoded to avoid interpretation issues.
### Example Usage
```python
import plex_api
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
req = 'level=4&message=Test%20message%201&source=postman
level=3&message=Test%20message%202&source=postman
level=1&message=Test%20message%203&source=postman'
res = s.log.log_multi_line(req)
if res.status_code == 200:
# handle response
pass
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| `request` | [str](../../models/.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
**[operations.LogMultiLineResponse](../../models/operations/logmultilineresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.LogMultiLineResponseBody | 401 | application/json |
| errors.SDKError | 4x-5xx | */* |
## 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.
### Example Usage
```python
import plex_api
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.log.enable_paper_trail()
if res.status_code == 200:
# handle response
pass
```
### Response
**[operations.EnablePaperTrailResponse](../../models/operations/enablepapertrailresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.EnablePaperTrailResponseBody | 401 | application/json |
| errors.SDKError | 4x-5xx | */* |