mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-09 20:57:44 +00:00
Regenerated with pythonv2 and newest spec
This commit is contained in:
@@ -15,6 +15,7 @@ Operations against the Plex Media Server System.
|
||||
* [get_server_identity](#get_server_identity) - Get Server Identity
|
||||
* [get_my_plex_account](#get_my_plex_account) - Get MyPlex Account
|
||||
* [get_resized_photo](#get_resized_photo) - Get a Resized Photo
|
||||
* [get_media_providers](#get_media_providers) - Get Media Providers
|
||||
* [get_server_list](#get_server_list) - Get Server List
|
||||
|
||||
## get_server_capabilities
|
||||
@@ -24,14 +25,13 @@ Get Server Capabilities
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_server_capabilities()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -40,16 +40,24 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetServerCapabilitiesResponse](../../models/operations/getservercapabilitiesresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| errors.GetServerCapabilitiesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| errors.GetServerCapabilitiesResponseBody | 400 | application/json |
|
||||
| errors.GetServerCapabilitiesServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_server_preferences
|
||||
|
||||
@@ -58,14 +66,13 @@ Get Server Preferences
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_server_preferences()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -74,16 +81,24 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetServerPreferencesResponse](../../models/operations/getserverpreferencesresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------- | --------------------------------------- | --------------------------------------- |
|
||||
| errors.GetServerPreferencesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| errors.GetServerPreferencesResponseBody | 400 | application/json |
|
||||
| errors.GetServerPreferencesServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_available_clients
|
||||
|
||||
@@ -92,14 +107,13 @@ Get Available Clients
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_available_clients()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -108,16 +122,24 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetAvailableClientsResponse](../../models/operations/getavailableclientsresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
||||
| errors.GetAvailableClientsResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
| errors.GetAvailableClientsResponseBody | 400 | application/json |
|
||||
| errors.GetAvailableClientsServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_devices
|
||||
|
||||
@@ -126,14 +148,13 @@ Get Devices
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_devices()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -142,32 +163,38 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetDevicesResponse](../../models/operations/getdevicesresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------- | ----------------------------- | ----------------------------- |
|
||||
| errors.GetDevicesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| errors.GetDevicesResponseBody | 400 | application/json |
|
||||
| errors.GetDevicesServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_server_identity
|
||||
|
||||
Get Server Identity
|
||||
This request is useful to determine if the server is online or offline
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
s = PlexAPI(
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_server_identity()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -176,17 +203,24 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetServerIdentityResponse](../../models/operations/getserveridentityresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||
| errors.GetServerIdentityResponseBody | 401 | application/json |
|
||||
| errors.GetServerIdentityResponseBody | 408 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_my_plex_account
|
||||
|
||||
Returns MyPlex Account Information
|
||||
@@ -194,14 +228,13 @@ Returns MyPlex Account Information
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_my_plex_account()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -210,16 +243,24 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetMyPlexAccountResponse](../../models/operations/getmyplexaccountresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| errors.GetMyPlexAccountResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetMyPlexAccountResponseBody | 400 | application/json |
|
||||
| errors.GetMyPlexAccountServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_resized_photo
|
||||
|
||||
@@ -229,24 +270,23 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api.models import operations
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_resized_photo(request=operations.GetResizedPhotoRequest(
|
||||
width=110,
|
||||
height=165,
|
||||
blur=20,
|
||||
min_size=operations.MinSize.ONE,
|
||||
upscale=operations.Upscale.ZERO,
|
||||
url='/library/metadata/49564/thumb/1654258204',
|
||||
opacity=100,
|
||||
))
|
||||
res = s.server.get_resized_photo(request={
|
||||
"width": 110,
|
||||
"height": 165,
|
||||
"blur": 20,
|
||||
"min_size": operations.MinSize.ONE,
|
||||
"upscale": operations.Upscale.ONE,
|
||||
"url": "/library/metadata/49564/thumb/1654258204",
|
||||
"opacity": 100,
|
||||
})
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
@@ -259,17 +299,62 @@ if res is not None:
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `request` | [operations.GetResizedPhotoRequest](../../models/operations/getresizedphotorequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetResizedPhotoResponse](../../models/operations/getresizedphotoresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| errors.GetResizedPhotoResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| errors.GetResizedPhotoResponseBody | 400 | application/json |
|
||||
| errors.GetResizedPhotoServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_media_providers
|
||||
|
||||
Retrieves media providers and their features from the Plex server.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
res = s.server.get_media_providers(x_plex_token="CV5xoxjTpFKUzBTShsaf")
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `x_plex_token` | *str* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetMediaProvidersResponse](../../models/operations/getmediaprovidersresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| errors.GetMediaProvidersResponseBody | 400 | application/json |
|
||||
| errors.GetMediaProvidersServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_server_list
|
||||
|
||||
@@ -278,14 +363,13 @@ Get Server List
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
s = PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
x_plex_client_identifier="gcgzw5rz2xovp84b4vha3a40",
|
||||
)
|
||||
|
||||
|
||||
res = s.server.get_server_list()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -294,13 +378,20 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetServerListResponse](../../models/operations/getserverlistresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.GetServerListResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
||||
| errors.GetServerListResponseBody | 400 | application/json |
|
||||
| errors.GetServerListServerResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user