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:
@@ -10,13 +10,13 @@ API Calls interacting with Plex Media Server Libraries
|
||||
|
||||
* [get_file_hash](#get_file_hash) - Get Hash Value
|
||||
* [get_recently_added](#get_recently_added) - Get Recently Added
|
||||
* [get_libraries](#get_libraries) - Get All Libraries
|
||||
* [get_library](#get_library) - Get Library Details
|
||||
* [get_all_libraries](#get_all_libraries) - Get All Libraries
|
||||
* [get_library_details](#get_library_details) - Get Library Details
|
||||
* [delete_library](#delete_library) - Delete Library Section
|
||||
* [get_library_items](#get_library_items) - Get Library Items
|
||||
* [refresh_library](#refresh_library) - Refresh Library
|
||||
* [search_library](#search_library) - Search Library
|
||||
* [get_metadata](#get_metadata) - Get Items Metadata
|
||||
* [get_refresh_library_metadata](#get_refresh_library_metadata) - Refresh Metadata Of The Library
|
||||
* [get_search_library](#get_search_library) - Search Library
|
||||
* [get_meta_data_by_rating_key](#get_meta_data_by_rating_key) - Get Metadata by RatingKey
|
||||
* [get_metadata_children](#get_metadata_children) - Get Items Children
|
||||
* [get_top_watched_content](#get_top_watched_content) - Get Top Watched Content
|
||||
* [get_on_deck](#get_on_deck) - Get On Deck
|
||||
@@ -28,15 +28,14 @@ This resource returns hash values for local files
|
||||
### 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.library.get_file_hash(url='file://C:\Image.png&type=13', type=4462.17)
|
||||
res = s.library.get_file_hash(url="file://C:\Image.png&type=13")
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
@@ -46,21 +45,24 @@ if res is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `url` | *str* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 |
|
||||
| `type` | *Optional[float]* | :heavy_minus_sign: | Item type | |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `url` | *str* | :heavy_check_mark: | This is the path to the local file, must be prefixed by `file://` | file://C:\Image.png&type=13 |
|
||||
| `type` | *Optional[float]* | :heavy_minus_sign: | Item type | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetFileHashResponse](../../models/operations/getfilehashresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| errors.GetFileHashResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
||||
| errors.GetFileHashResponseBody | 400 | application/json |
|
||||
| errors.GetFileHashLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_recently_added
|
||||
|
||||
@@ -70,15 +72,14 @@ This endpoint will return the recently added content.
|
||||
### 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.library.get_recently_added()
|
||||
res = s.library.get_recently_added(x_plex_container_start=0, x_plex_container_size=50)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -86,18 +87,28 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `x_plex_container_start` | *Optional[int]* | :heavy_minus_sign: | The index of the first item to return. If not specified, the first item will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 0<br/> | 0 |
|
||||
| `x_plex_container_size` | *Optional[int]* | :heavy_minus_sign: | The number of items to return. If not specified, all items will be returned.<br/>If the number of items exceeds the limit, the response will be paginated.<br/>By default this is 50<br/> | 50 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetRecentlyAddedResponse](../../models/operations/getrecentlyaddedresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| errors.GetRecentlyAddedResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| errors.GetRecentlyAddedResponseBody | 400 | application/json |
|
||||
| errors.GetRecentlyAddedLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_libraries
|
||||
|
||||
## get_all_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.
|
||||
@@ -110,15 +121,14 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
||||
### 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.library.get_libraries()
|
||||
res = s.library.get_all_libraries()
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -126,18 +136,26 @@ 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.GetLibrariesResponse](../../models/operations/getlibrariesresponse.md)**
|
||||
**[operations.GetAllLibrariesResponse](../../models/operations/getalllibrariesresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| errors.GetLibrariesResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetAllLibrariesResponseBody | 400 | application/json |
|
||||
| errors.GetAllLibrariesLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_library
|
||||
|
||||
## get_library_details
|
||||
|
||||
## Library Details Endpoint
|
||||
|
||||
@@ -183,16 +201,14 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api.models import operations
|
||||
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.library.get_library(section_id=1000, include_details=operations.IncludeDetails.ZERO)
|
||||
res = s.library.get_library_details(section_key=9518)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -204,36 +220,38 @@ if res.object is not None:
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 |
|
||||
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||
| `include_details` | [Optional[operations.IncludeDetails]](../../models/operations/includedetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
||||
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetLibraryResponse](../../models/operations/getlibraryresponse.md)**
|
||||
**[operations.GetLibraryDetailsResponse](../../models/operations/getlibrarydetailsresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------- | ----------------------------- | ----------------------------- |
|
||||
| errors.GetLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
|
||||
| errors.GetLibraryDetailsResponseBody | 400 | application/json |
|
||||
| errors.GetLibraryDetailsLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## delete_library
|
||||
|
||||
Delate a library using a specific section
|
||||
Delete a library using a specific section id
|
||||
|
||||
### 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.library.delete_library(section_id=1000)
|
||||
res = s.library.delete_library(section_key=9518)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
@@ -243,20 +261,23 @@ if res is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| `section_id` | *float* | :heavy_check_mark: | the Id of the library to query | 1000 |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.DeleteLibraryResponse](../../models/operations/deletelibraryresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.DeleteLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------- | --------------------------------------- | --------------------------------------- |
|
||||
| errors.DeleteLibraryResponseBody | 400 | application/json |
|
||||
| errors.DeleteLibraryLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_library_items
|
||||
|
||||
@@ -285,16 +306,23 @@ Fetches details from a specific section of the library identified by a section k
|
||||
### 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.library.get_library_items(section_id='<value>', tag=operations.Tag.GENRE, include_guids=1)
|
||||
res = s.library.get_library_items(request={
|
||||
"section_key": 9518,
|
||||
"tag": operations.Tag.EDITION,
|
||||
"type": operations.Type.TWO,
|
||||
"include_guids": operations.IncludeGuids.ONE,
|
||||
"include_meta": operations.IncludeMeta.ONE,
|
||||
"x_plex_container_start": 0,
|
||||
"x_plex_container_size": 50,
|
||||
})
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -304,40 +332,41 @@ if res.object is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `section_id` | *Any* | :heavy_check_mark: | the Id of the library to query | |
|
||||
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
|
||||
| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `request` | [operations.GetLibraryItemsRequest](../../models/operations/getlibraryitemsrequest.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.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| errors.GetLibraryItemsResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetLibraryItemsResponseBody | 400 | application/json |
|
||||
| errors.GetLibraryItemsLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## refresh_library
|
||||
|
||||
This endpoint Refreshes the library.
|
||||
## get_refresh_library_metadata
|
||||
|
||||
This endpoint Refreshes all the Metadata of the library.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
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.library.refresh_library(section_id=934.16)
|
||||
res = s.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ONE)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
@@ -347,22 +376,26 @@ if res is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| `section_id` | *float* | :heavy_check_mark: | the Id of the library to refresh |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||
| `force` | [Optional[operations.Force]](../../models/operations/force.md) | :heavy_minus_sign: | Force the refresh even if the library is already being refreshed. | 0 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.RefreshLibraryResponse](../../models/operations/refreshlibraryresponse.md)**
|
||||
**[operations.GetRefreshLibraryMetadataResponse](../../models/operations/getrefreshlibrarymetadataresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------- | --------------------------------- | --------------------------------- |
|
||||
| errors.RefreshLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| errors.GetRefreshLibraryMetadataResponseBody | 400 | application/json |
|
||||
| errors.GetRefreshLibraryMetadataLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## search_library
|
||||
|
||||
## get_search_library
|
||||
|
||||
Search for content within a specific section of the library.
|
||||
|
||||
@@ -387,16 +420,15 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
### 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.library.search_library(section_id=933505, type=operations.Type.FOUR)
|
||||
res = s.library.get_search_library(section_key=9518, type_=operations.QueryParamType.TWO)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -406,23 +438,26 @@ if res.object is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `section_id` | *int* | :heavy_check_mark: | the Id of the library to query |
|
||||
| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | Plex content type to search for |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||
| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.SearchLibraryResponse](../../models/operations/searchlibraryresponse.md)**
|
||||
**[operations.GetSearchLibraryResponse](../../models/operations/getsearchlibraryresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.SearchLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| errors.GetSearchLibraryResponseBody | 400 | application/json |
|
||||
| errors.GetSearchLibraryLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_metadata
|
||||
|
||||
## get_meta_data_by_rating_key
|
||||
|
||||
This endpoint will return the metadata of a library item specified with the ratingKey.
|
||||
|
||||
@@ -430,15 +465,14 @@ This endpoint will return the metadata of a library item specified with the rati
|
||||
### 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.library.get_metadata(rating_key=8382.31)
|
||||
res = s.library.get_meta_data_by_rating_key(rating_key=9518)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -448,20 +482,23 @@ if res.object is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `rating_key` | *int* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetMetadataResponse](../../models/operations/getmetadataresponse.md)**
|
||||
**[operations.GetMetaDataByRatingKeyResponse](../../models/operations/getmetadatabyratingkeyresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| errors.GetMetadataResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| errors.GetMetaDataByRatingKeyResponseBody | 400 | application/json |
|
||||
| errors.GetMetaDataByRatingKeyLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_metadata_children
|
||||
|
||||
@@ -471,15 +508,14 @@ This endpoint will return the children of of a library item specified with the r
|
||||
### 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.library.get_metadata_children(rating_key=1539.14, include_elements='<value>')
|
||||
res = s.library.get_metadata_children(rating_key=1539.14, include_elements="Stream")
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -493,17 +529,20 @@ if res.object is not None:
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. |
|
||||
| `include_elements` | *Optional[str]* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)<br/> |
|
||||
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetMetadataChildrenResponse](../../models/operations/getmetadatachildrenresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
||||
| errors.GetMetadataChildrenResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| errors.GetMetadataChildrenResponseBody | 400 | application/json |
|
||||
| errors.GetMetadataChildrenLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_top_watched_content
|
||||
|
||||
@@ -513,15 +552,15 @@ This endpoint will return the top watched content from libraries of a certain ty
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
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.library.get_top_watched_content(type=505531, include_guids=1)
|
||||
res = s.library.get_top_watched_content(type_=operations.GetTopWatchedContentQueryParamType.TWO, include_guids=1)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -531,20 +570,24 @@ if res.object is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| `type` | *int* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
|
||||
| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve.<br/>1 = movie<br/>2 = show<br/>3 = season<br/>4 = episode<br/>E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/> | 2 |
|
||||
| `include_guids` | *Optional[int]* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetTopWatchedContentResponse](../../models/operations/gettopwatchedcontentresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| errors.GetTopWatchedContentResponseBody | 400 | application/json |
|
||||
| errors.GetTopWatchedContentLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## get_on_deck
|
||||
|
||||
@@ -554,14 +597,13 @@ This endpoint will return the on deck content.
|
||||
### 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.library.get_on_deck()
|
||||
|
||||
if res.object is not None:
|
||||
@@ -570,13 +612,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.GetOnDeckResponse](../../models/operations/getondeckresponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| errors.GetOnDeckResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| errors.GetOnDeckResponseBody | 400 | application/json |
|
||||
| errors.GetOnDeckLibraryResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user