mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 3eeea668-4ef4-464e-a888-bdfa023bedf5
|
||||
management:
|
||||
docChecksum: 37654ea0982ab5e87a9a9576014c9d19
|
||||
docChecksum: e73920abd3a55e8d249592f2e3090574
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.308.1
|
||||
generationVersion: 2.342.6
|
||||
releaseVersion: 0.9.0
|
||||
configChecksum: d85cf2b27a6bc9ff213089b7d202adf0
|
||||
speakeasyVersion: 1.314.2
|
||||
generationVersion: 2.349.6
|
||||
releaseVersion: 0.10.0
|
||||
configChecksum: d3ab7f558ab12fa30efdcad9275e01b2
|
||||
repoURL: https://github.com/LukeHagar/plexpy.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexpy.git
|
||||
@@ -15,7 +15,7 @@ features:
|
||||
python:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.3
|
||||
core: 4.6.11
|
||||
core: 4.6.13
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.83.5
|
||||
globalSecurityCallbacks: 0.1.0
|
||||
@@ -24,9 +24,11 @@ features:
|
||||
globals: 2.82.1
|
||||
methodServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.2
|
||||
nullables: 0.1.0
|
||||
responseFormat: 0.1.0
|
||||
sdkHooks: 0.1.0
|
||||
typeOverrides: 2.81.1
|
||||
unions: 2.82.8
|
||||
generatedFiles:
|
||||
- src/plex_api/sdkconfiguration.py
|
||||
- src/plex_api/server.py
|
||||
@@ -46,7 +48,6 @@ generatedFiles:
|
||||
- src/plex_api/updater.py
|
||||
- src/plex_api/watchlist.py
|
||||
- src/plex_api/sdk.py
|
||||
- Makefile
|
||||
- py.typed
|
||||
- pylintrc
|
||||
- scripts/publish.sh
|
||||
@@ -94,6 +95,7 @@ generatedFiles:
|
||||
- src/plex_api/models/operations/searchlibrary.py
|
||||
- src/plex_api/models/operations/getmetadata.py
|
||||
- src/plex_api/models/operations/getmetadatachildren.py
|
||||
- src/plex_api/models/operations/gettopwatchedcontent.py
|
||||
- src/plex_api/models/operations/getondeck.py
|
||||
- src/plex_api/models/operations/logline.py
|
||||
- src/plex_api/models/operations/logmultiline.py
|
||||
@@ -110,6 +112,8 @@ generatedFiles:
|
||||
- src/plex_api/models/operations/gettransienttoken.py
|
||||
- src/plex_api/models/operations/getsourceconnectioninformation.py
|
||||
- src/plex_api/models/operations/getstatistics.py
|
||||
- src/plex_api/models/operations/getresourcesstatistics.py
|
||||
- src/plex_api/models/operations/getbandwidthstatistics.py
|
||||
- src/plex_api/models/operations/getsessions.py
|
||||
- src/plex_api/models/operations/getsessionhistory.py
|
||||
- src/plex_api/models/operations/gettranscodesessions.py
|
||||
@@ -172,6 +176,8 @@ generatedFiles:
|
||||
- src/plex_api/models/errors/gettransienttoken.py
|
||||
- src/plex_api/models/errors/getsourceconnectioninformation.py
|
||||
- src/plex_api/models/errors/getstatistics.py
|
||||
- src/plex_api/models/errors/getresourcesstatistics.py
|
||||
- src/plex_api/models/errors/getbandwidthstatistics.py
|
||||
- src/plex_api/models/errors/getsessions.py
|
||||
- src/plex_api/models/errors/getsessionhistory.py
|
||||
- src/plex_api/models/errors/gettranscodesessions.py
|
||||
@@ -331,6 +337,7 @@ generatedFiles:
|
||||
- docs/models/operations/deletelibraryresponse.md
|
||||
- docs/models/operations/tag.md
|
||||
- docs/models/operations/getlibraryitemsrequest.md
|
||||
- docs/models/operations/librarysectionid.md
|
||||
- docs/models/operations/getlibraryitemspart.md
|
||||
- docs/models/operations/getlibraryitemsmedia.md
|
||||
- docs/models/operations/getlibraryitemsgenre.md
|
||||
@@ -372,6 +379,16 @@ generatedFiles:
|
||||
- docs/models/operations/getmetadatachildrenmediacontainer.md
|
||||
- docs/models/operations/getmetadatachildrenresponsebody.md
|
||||
- docs/models/operations/getmetadatachildrenresponse.md
|
||||
- docs/models/operations/gettopwatchedcontentrequest.md
|
||||
- docs/models/operations/gettopwatchedcontentgenre.md
|
||||
- docs/models/operations/gettopwatchedcontentcountry.md
|
||||
- docs/models/operations/gettopwatchedcontentguids.md
|
||||
- docs/models/operations/gettopwatchedcontentrole.md
|
||||
- docs/models/operations/user.md
|
||||
- docs/models/operations/gettopwatchedcontentmetadata.md
|
||||
- docs/models/operations/gettopwatchedcontentmediacontainer.md
|
||||
- docs/models/operations/gettopwatchedcontentresponsebody.md
|
||||
- docs/models/operations/gettopwatchedcontentresponse.md
|
||||
- docs/models/operations/getondeckstream.md
|
||||
- docs/models/operations/getondeckpart.md
|
||||
- docs/models/operations/getondeckmedia.md
|
||||
@@ -443,16 +460,30 @@ generatedFiles:
|
||||
- docs/models/operations/getstatisticsmediacontainer.md
|
||||
- docs/models/operations/getstatisticsresponsebody.md
|
||||
- docs/models/operations/getstatisticsresponse.md
|
||||
- docs/models/operations/getresourcesstatisticsrequest.md
|
||||
- docs/models/operations/statisticsresources.md
|
||||
- docs/models/operations/getresourcesstatisticsmediacontainer.md
|
||||
- docs/models/operations/getresourcesstatisticsresponsebody.md
|
||||
- docs/models/operations/getresourcesstatisticsresponse.md
|
||||
- docs/models/operations/getbandwidthstatisticsrequest.md
|
||||
- docs/models/operations/getbandwidthstatisticsdevice.md
|
||||
- docs/models/operations/getbandwidthstatisticsaccount.md
|
||||
- docs/models/operations/statisticsbandwidth.md
|
||||
- docs/models/operations/getbandwidthstatisticsmediacontainer.md
|
||||
- docs/models/operations/getbandwidthstatisticsresponsebody.md
|
||||
- docs/models/operations/getbandwidthstatisticsresponse.md
|
||||
- docs/models/operations/getsessionsstream.md
|
||||
- docs/models/operations/getsessionspart.md
|
||||
- docs/models/operations/getsessionsmedia.md
|
||||
- docs/models/operations/user.md
|
||||
- docs/models/operations/getsessionsuser.md
|
||||
- docs/models/operations/player.md
|
||||
- docs/models/operations/session.md
|
||||
- docs/models/operations/getsessionsmetadata.md
|
||||
- docs/models/operations/getsessionsmediacontainer.md
|
||||
- docs/models/operations/getsessionsresponsebody.md
|
||||
- docs/models/operations/getsessionsresponse.md
|
||||
- docs/models/operations/filter_.md
|
||||
- docs/models/operations/getsessionhistoryrequest.md
|
||||
- docs/models/operations/getsessionhistorymetadata.md
|
||||
- docs/models/operations/getsessionhistorymediacontainer.md
|
||||
- docs/models/operations/getsessionhistoryresponsebody.md
|
||||
@@ -474,7 +505,7 @@ generatedFiles:
|
||||
- docs/models/operations/skip.md
|
||||
- docs/models/operations/applyupdatesrequest.md
|
||||
- docs/models/operations/applyupdatesresponse.md
|
||||
- docs/models/operations/filter_.md
|
||||
- docs/models/operations/pathparamfilter.md
|
||||
- docs/models/operations/libtype.md
|
||||
- docs/models/operations/includecollections.md
|
||||
- docs/models/operations/includeexternalmedia.md
|
||||
@@ -591,6 +622,10 @@ generatedFiles:
|
||||
- docs/models/errors/getsourceconnectioninformationresponsebody.md
|
||||
- docs/models/errors/getstatisticserrors.md
|
||||
- docs/models/errors/getstatisticsresponsebody.md
|
||||
- docs/models/errors/getresourcesstatisticserrors.md
|
||||
- docs/models/errors/getresourcesstatisticsresponsebody.md
|
||||
- docs/models/errors/getbandwidthstatisticserrors.md
|
||||
- docs/models/errors/getbandwidthstatisticsresponsebody.md
|
||||
- docs/models/errors/getsessionserrors.md
|
||||
- docs/models/errors/getsessionsresponsebody.md
|
||||
- docs/models/errors/getsessionhistoryerrors.md
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
python:
|
||||
version: 0.9.0
|
||||
version: 0.10.0
|
||||
additionalDependencies:
|
||||
dependencies: {}
|
||||
extraDependencies:
|
||||
@@ -36,3 +36,4 @@ python:
|
||||
packageName: plex-api-client
|
||||
projectUrls: {}
|
||||
responseFormat: envelope
|
||||
templateVersion: v1
|
||||
|
||||
@@ -2,8 +2,8 @@ speakeasyVersion: 1.308.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:81f7f998cfe018fdd7d478087dd59f1ba5b42fe34c83e644b84219fc32289522
|
||||
sourceBlobDigest: sha256:08634d44bed62921029e6a3ef66e9007734e0cd69163e144d07f9688dc752c7a
|
||||
sourceRevisionDigest: sha256:d2ac21a5a9bdf30abc0674d57086961dd0c63057c2a6f15d8646b38ebd6e70d8
|
||||
sourceBlobDigest: sha256:5dc7702ea13445e7f12bb06b44f6ab67d67f0383b9bff2979405e22dffa79888
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -11,8 +11,8 @@ targets:
|
||||
plexpy:
|
||||
source: my-source
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:81f7f998cfe018fdd7d478087dd59f1ba5b42fe34c83e644b84219fc32289522
|
||||
sourceBlobDigest: sha256:08634d44bed62921029e6a3ef66e9007734e0cd69163e144d07f9688dc752c7a
|
||||
sourceRevisionDigest: sha256:d2ac21a5a9bdf30abc0674d57086961dd0c63057c2a6f15d8646b38ebd6e70d8
|
||||
sourceBlobDigest: sha256:5dc7702ea13445e7f12bb06b44f6ab67d67f0383b9bff2979405e22dffa79888
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
|
||||
11
README.md
11
README.md
@@ -43,7 +43,7 @@ if res.object is not None:
|
||||
|
||||
### [server](docs/sdks/server/README.md)
|
||||
|
||||
* [get_server_capabilities](docs/sdks/server/README.md#get_server_capabilities) - Server Capabilities
|
||||
* [get_server_capabilities](docs/sdks/server/README.md#get_server_capabilities) - Get Server Capabilities
|
||||
* [get_server_preferences](docs/sdks/server/README.md#get_server_preferences) - Get Server Preferences
|
||||
* [get_available_clients](docs/sdks/server/README.md#get_available_clients) - Get Available Clients
|
||||
* [get_devices](docs/sdks/server/README.md#get_devices) - Get Devices
|
||||
@@ -105,6 +105,7 @@ if res.object is not None:
|
||||
* [search_library](docs/sdks/library/README.md#search_library) - Search Library
|
||||
* [get_metadata](docs/sdks/library/README.md#get_metadata) - Get Items Metadata
|
||||
* [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children
|
||||
* [get_top_watched_content](docs/sdks/library/README.md#get_top_watched_content) - Get Top Watched Content
|
||||
* [get_on_deck](docs/sdks/library/README.md#get_on_deck) - Get On Deck
|
||||
|
||||
### [log](docs/sdks/log/README.md)
|
||||
@@ -133,6 +134,8 @@ if res.object is not None:
|
||||
### [statistics](docs/sdks/statistics/README.md)
|
||||
|
||||
* [get_statistics](docs/sdks/statistics/README.md#get_statistics) - Get Media Statistics
|
||||
* [get_resources_statistics](docs/sdks/statistics/README.md#get_resources_statistics) - Get Resources Statistics
|
||||
* [get_bandwidth_statistics](docs/sdks/statistics/README.md#get_bandwidth_statistics) - Get Bandwidth Statistics
|
||||
|
||||
### [sessions](docs/sdks/sessions/README.md)
|
||||
|
||||
@@ -319,18 +322,18 @@ if res.object is not None:
|
||||
<!-- Start Global Parameters [global-parameters] -->
|
||||
## Global Parameters
|
||||
|
||||
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
|
||||
For example, you can set `X-Plex-Client-Identifier` to `'Postman'` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_pin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||
|
||||
|
||||
### Available Globals
|
||||
|
||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||
The following global parameter is available.
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| x_plex_client_identifier | str | ✔️ | The unique identifier for the client application
|
||||
| x_plex_client_identifier | str | | The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -618,4 +618,14 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.9.0] .
|
||||
### Releases
|
||||
- [PyPI v0.9.0] https://pypi.org/project/plex-api-client/0.9.0 - .
|
||||
- [PyPI v0.9.0] https://pypi.org/project/plex-api-client/0.9.0 - .
|
||||
|
||||
## 2024-06-22 00:22:03
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.10.0] .
|
||||
### Releases
|
||||
- [PyPI v0.10.0] https://pypi.org/project/plex-api-client/0.10.0 - .
|
||||
1658
codeSamples.yaml
1658
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
10
docs/models/errors/getbandwidthstatisticserrors.md
Normal file
10
docs/models/errors/getbandwidthstatisticserrors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetBandwidthStatisticsErrors
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 |
|
||||
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
||||
| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 |
|
||||
11
docs/models/errors/getbandwidthstatisticsresponsebody.md
Normal file
11
docs/models/errors/getbandwidthstatisticsresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetBandwidthStatisticsResponseBody
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `errors` | List[[errors.GetBandwidthStatisticsErrors](../../models/errors/getbandwidthstatisticserrors.md)] | :heavy_minus_sign: | N/A |
|
||||
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
||||
10
docs/models/errors/getresourcesstatisticserrors.md
Normal file
10
docs/models/errors/getresourcesstatisticserrors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetResourcesStatisticsErrors
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `code` | *Optional[float]* | :heavy_minus_sign: | N/A | 1001 |
|
||||
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
||||
| `status` | *Optional[float]* | :heavy_minus_sign: | N/A | 401 |
|
||||
11
docs/models/errors/getresourcesstatisticsresponsebody.md
Normal file
11
docs/models/errors/getresourcesstatisticsresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetResourcesStatisticsResponseBody
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `errors` | List[[errors.GetResourcesStatisticsErrors](../../models/errors/getresourcesstatisticserrors.md)] | :heavy_minus_sign: | N/A |
|
||||
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `x_plex_client_identifier` | *str* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
| `x_plex_client_identifier` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
@@ -1,12 +1,11 @@
|
||||
# Filter
|
||||
|
||||
Filter
|
||||
Filters content by field and direction/equality
|
||||
(Unknown if viewedAt is the only supported column)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ----------- | ----------- |
|
||||
| `ALL` | all |
|
||||
| `AVAILABLE` | available |
|
||||
| `RELEASED` | released |
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------- | ----------- | ----------- | ----------- |
|
||||
15
docs/models/operations/getbandwidthstatisticsaccount.md
Normal file
15
docs/models/operations/getbandwidthstatisticsaccount.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# GetBandwidthStatisticsAccount
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 238960586 |
|
||||
| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /accounts/238960586 |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | Diane |
|
||||
| `default_audio_language` | *Optional[str]* | :heavy_minus_sign: | N/A | en |
|
||||
| `auto_select_audio` | *Optional[bool]* | :heavy_minus_sign: | N/A | true |
|
||||
| `default_subtitle_language` | *Optional[str]* | :heavy_minus_sign: | N/A | en |
|
||||
| `subtitle_mode` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |
|
||||
12
docs/models/operations/getbandwidthstatisticsdevice.md
Normal file
12
docs/models/operations/getbandwidthstatisticsdevice.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetBandwidthStatisticsDevice
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 208 |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | Roku Express |
|
||||
| `platform` | *Optional[str]* | :heavy_minus_sign: | N/A | Roku |
|
||||
| `client_identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 |
|
||||
| `created_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1706470556 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# GetBandwidthStatisticsMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 5497 |
|
||||
| `device` | List[[operations.GetBandwidthStatisticsDevice](../../models/operations/getbandwidthstatisticsdevice.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `account` | List[[operations.GetBandwidthStatisticsAccount](../../models/operations/getbandwidthstatisticsaccount.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `statistics_bandwidth` | List[[operations.StatisticsBandwidth](../../models/operations/statisticsbandwidth.md)] | :heavy_minus_sign: | N/A | |
|
||||
8
docs/models/operations/getbandwidthstatisticsrequest.md
Normal file
8
docs/models/operations/getbandwidthstatisticsrequest.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetBandwidthStatisticsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
11
docs/models/operations/getbandwidthstatisticsresponse.md
Normal file
11
docs/models/operations/getbandwidthstatisticsresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetBandwidthStatisticsResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [Optional[operations.GetBandwidthStatisticsResponseBody]](../../models/operations/getbandwidthstatisticsresponsebody.md) | :heavy_minus_sign: | Bandwidth Statistics |
|
||||
10
docs/models/operations/getbandwidthstatisticsresponsebody.md
Normal file
10
docs/models/operations/getbandwidthstatisticsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetBandwidthStatisticsResponseBody
|
||||
|
||||
Bandwidth Statistics
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `media_container` | [Optional[operations.GetBandwidthStatisticsMediaContainer]](../../models/operations/getbandwidthstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -9,7 +9,7 @@
|
||||
| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true |
|
||||
| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||
| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `library_section_id` | [Optional[operations.LibrarySectionID]](../../models/operations/librarysectionid.md) | :heavy_minus_sign: | N/A | |
|
||||
| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `library_section_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Field | 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 |
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `rating_key` | *float* | :heavy_check_mark: | the id of the library item to return the children of. |
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `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/> |
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `x_plex_client_identifier` | *str* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
| `x_plex_client_identifier` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
@@ -18,4 +18,4 @@ The Pin
|
||||
| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
|
||||
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
|
||||
| `auth_token` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `new_registration` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `new_registration` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetResourcesStatisticsMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 5497 |
|
||||
| `statistics_resources` | List[[operations.StatisticsResources](../../models/operations/statisticsresources.md)] | :heavy_minus_sign: | N/A | |
|
||||
8
docs/models/operations/getresourcesstatisticsrequest.md
Normal file
8
docs/models/operations/getresourcesstatisticsrequest.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetResourcesStatisticsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
11
docs/models/operations/getresourcesstatisticsresponse.md
Normal file
11
docs/models/operations/getresourcesstatisticsresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetResourcesStatisticsResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [Optional[operations.GetResourcesStatisticsResponseBody]](../../models/operations/getresourcesstatisticsresponsebody.md) | :heavy_minus_sign: | Resource Statistics |
|
||||
10
docs/models/operations/getresourcesstatisticsresponsebody.md
Normal file
10
docs/models/operations/getresourcesstatisticsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetResourcesStatisticsResponseBody
|
||||
|
||||
Resource Statistics
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `media_container` | [Optional[operations.GetResourcesStatisticsMediaContainer]](../../models/operations/getresourcesstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
11
docs/models/operations/getsessionhistoryrequest.md
Normal file
11
docs/models/operations/getsessionhistoryrequest.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetSessionHistoryRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `sort` | *Optional[str]* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
|
||||
| `account_id` | *Optional[int]* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
|
||||
| `filter_` | [Optional[operations.Filter]](../../models/operations/filter_.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
|
||||
| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
@@ -3,42 +3,42 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `added_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705543312 |
|
||||
| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
|
||||
| `duration` | *Optional[int]* | :heavy_minus_sign: | N/A | 186240 |
|
||||
| `grandparent_art` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
|
||||
| `grandparent_guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
|
||||
| `grandparent_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
|
||||
| `grandparent_rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 39904 |
|
||||
| `grandparent_thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
|
||||
| `grandparent_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Green Day |
|
||||
| `guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
|
||||
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
|
||||
| `library_section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | 3 |
|
||||
| `library_section_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/3 |
|
||||
| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Music |
|
||||
| `music_analysis_version` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parent_guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
|
||||
| `parent_index` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parent_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
|
||||
| `parent_rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 67084 |
|
||||
| `parent_studio` | *Optional[str]* | :heavy_minus_sign: | N/A | Reprise Records |
|
||||
| `parent_thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
|
||||
| `parent_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Saviors |
|
||||
| `parent_year` | *Optional[int]* | :heavy_minus_sign: | N/A | 2024 |
|
||||
| `rating_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 45885 |
|
||||
| `rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 67085 |
|
||||
| `session_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 203 |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
|
||||
| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
|
||||
| `title_sort` | *Optional[str]* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
|
||||
| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | track |
|
||||
| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705543314 |
|
||||
| `view_offset` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `media` | List[[operations.GetSessionsMedia](../../models/operations/getsessionsmedia.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `user` | [Optional[operations.User]](../../models/operations/user.md) | :heavy_minus_sign: | N/A | |
|
||||
| `player` | [Optional[operations.Player]](../../models/operations/player.md) | :heavy_minus_sign: | N/A | |
|
||||
| `session` | [Optional[operations.Session]](../../models/operations/session.md) | :heavy_minus_sign: | N/A | |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `added_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705543312 |
|
||||
| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
|
||||
| `duration` | *Optional[int]* | :heavy_minus_sign: | N/A | 186240 |
|
||||
| `grandparent_art` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
|
||||
| `grandparent_guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
|
||||
| `grandparent_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
|
||||
| `grandparent_rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 39904 |
|
||||
| `grandparent_thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
|
||||
| `grandparent_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Green Day |
|
||||
| `guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
|
||||
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
|
||||
| `library_section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | 3 |
|
||||
| `library_section_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/3 |
|
||||
| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Music |
|
||||
| `music_analysis_version` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parent_guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
|
||||
| `parent_index` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `parent_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
|
||||
| `parent_rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 67084 |
|
||||
| `parent_studio` | *Optional[str]* | :heavy_minus_sign: | N/A | Reprise Records |
|
||||
| `parent_thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
|
||||
| `parent_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Saviors |
|
||||
| `parent_year` | *Optional[int]* | :heavy_minus_sign: | N/A | 2024 |
|
||||
| `rating_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 45885 |
|
||||
| `rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 67085 |
|
||||
| `session_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 203 |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
|
||||
| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
|
||||
| `title_sort` | *Optional[str]* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
|
||||
| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | track |
|
||||
| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705543314 |
|
||||
| `view_offset` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `media` | List[[operations.GetSessionsMedia](../../models/operations/getsessionsmedia.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `user` | [Optional[operations.GetSessionsUser]](../../models/operations/getsessionsuser.md) | :heavy_minus_sign: | N/A | |
|
||||
| `player` | [Optional[operations.Player]](../../models/operations/player.md) | :heavy_minus_sign: | N/A | |
|
||||
| `session` | [Optional[operations.Session]](../../models/operations/session.md) | :heavy_minus_sign: | N/A | |
|
||||
10
docs/models/operations/getsessionsuser.md
Normal file
10
docs/models/operations/getsessionsuser.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetSessionsUser
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 |
|
||||
| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Blindkitty38 |
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `x_plex_client_identifier` | *str* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
| `x_plex_client_identifier` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||
10
docs/models/operations/gettopwatchedcontentcountry.md
Normal file
10
docs/models/operations/gettopwatchedcontentcountry.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetTopWatchedContentCountry
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 116 |
|
||||
| `filter_` | *Optional[str]* | :heavy_minus_sign: | N/A | country=116 |
|
||||
| `tag` | *Optional[str]* | :heavy_minus_sign: | N/A | United States of America |
|
||||
10
docs/models/operations/gettopwatchedcontentgenre.md
Normal file
10
docs/models/operations/gettopwatchedcontentgenre.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetTopWatchedContentGenre
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 184 |
|
||||
| `filter_` | *Optional[str]* | :heavy_minus_sign: | N/A | genre=184 |
|
||||
| `tag` | *Optional[str]* | :heavy_minus_sign: | N/A | Thriller |
|
||||
8
docs/models/operations/gettopwatchedcontentguids.md
Normal file
8
docs/models/operations/gettopwatchedcontentguids.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetTopWatchedContentGuids
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | tvdb://2337 |
|
||||
13
docs/models/operations/gettopwatchedcontentmediacontainer.md
Normal file
13
docs/models/operations/gettopwatchedcontentmediacontainer.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# GetTopWatchedContentMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `size` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | true |
|
||||
| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||
| `media_tag_prefix` | *Optional[str]* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||
| `media_tag_version` | *Optional[int]* | :heavy_minus_sign: | N/A | 1698860922 |
|
||||
| `metadata` | List[[operations.GetTopWatchedContentMetadata](../../models/operations/gettopwatchedcontentmetadata.md)] | :heavy_minus_sign: | N/A | |
|
||||
39
docs/models/operations/gettopwatchedcontentmetadata.md
Normal file
39
docs/models/operations/gettopwatchedcontentmetadata.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# GetTopWatchedContentMetadata
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `rating_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 17 |
|
||||
| `key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/17 |
|
||||
| `guid` | *Optional[str]* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 |
|
||||
| `slug` | *Optional[str]* | :heavy_minus_sign: | N/A | waterloo-road |
|
||||
| `studio` | *Optional[str]* | :heavy_minus_sign: | N/A | Universal Pictures |
|
||||
| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | movie |
|
||||
| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Serenity |
|
||||
| `library_section_title` | *Optional[str]* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `library_section_key` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/sections/1 |
|
||||
| `content_rating` | *Optional[str]* | :heavy_minus_sign: | N/A | PG-13 |
|
||||
| `summary` | *Optional[str]* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
|
||||
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `audience_rating` | *Optional[float]* | :heavy_minus_sign: | N/A | 9.1 |
|
||||
| `year` | *Optional[int]* | :heavy_minus_sign: | N/A | 2005 |
|
||||
| `tagline` | *Optional[str]* | :heavy_minus_sign: | N/A | They aim to misbehave. |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 |
|
||||
| `art` | *Optional[str]* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 |
|
||||
| `duration` | *Optional[int]* | :heavy_minus_sign: | N/A | 141417 |
|
||||
| `originally_available_at` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC |
|
||||
| `leaf_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 222 |
|
||||
| `viewed_leaf_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 100 |
|
||||
| `child_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 13 |
|
||||
| `added_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705637164 |
|
||||
| `updated_at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1705637165 |
|
||||
| `global_view_count` | *Optional[int]* | :heavy_minus_sign: | N/A | 80 |
|
||||
| `audience_rating_image` | *Optional[str]* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
|
||||
| `genre` | List[[operations.GetTopWatchedContentGenre](../../models/operations/gettopwatchedcontentgenre.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `country` | List[[operations.GetTopWatchedContentCountry](../../models/operations/gettopwatchedcontentcountry.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `guids` | List[[operations.GetTopWatchedContentGuids](../../models/operations/gettopwatchedcontentguids.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `role` | List[[operations.GetTopWatchedContentRole](../../models/operations/gettopwatchedcontentrole.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `user` | List[[operations.User](../../models/operations/user.md)] | :heavy_minus_sign: | N/A | |
|
||||
9
docs/models/operations/gettopwatchedcontentrequest.md
Normal file
9
docs/models/operations/gettopwatchedcontentrequest.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTopWatchedContentRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | 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 |
|
||||
11
docs/models/operations/gettopwatchedcontentresponse.md
Normal file
11
docs/models/operations/gettopwatchedcontentresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetTopWatchedContentResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [Optional[operations.GetTopWatchedContentResponseBody]](../../models/operations/gettopwatchedcontentresponsebody.md) | :heavy_minus_sign: | The metadata of the library item. |
|
||||
10
docs/models/operations/gettopwatchedcontentresponsebody.md
Normal file
10
docs/models/operations/gettopwatchedcontentresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetTopWatchedContentResponseBody
|
||||
|
||||
The metadata of the library item.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `media_container` | [Optional[operations.GetTopWatchedContentMediaContainer]](../../models/operations/gettopwatchedcontentmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
13
docs/models/operations/gettopwatchedcontentrole.md
Normal file
13
docs/models/operations/gettopwatchedcontentrole.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# GetTopWatchedContentRole
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 220 |
|
||||
| `filter_` | *Optional[str]* | :heavy_minus_sign: | N/A | actor=220 |
|
||||
| `tag` | *Optional[str]* | :heavy_minus_sign: | N/A | Dennis Keiffer |
|
||||
| `tag_key` | *Optional[str]* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 |
|
||||
| `role` | *Optional[str]* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg |
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `filter_` | [operations.Filter](../../models/operations/filter_.md) | :heavy_check_mark: | Filter |
|
||||
| `filter_` | [operations.PathParamFilter](../../models/operations/pathparamfilter.md) | :heavy_check_mark: | Filter |
|
||||
| `x_plex_token` | *str* | :heavy_check_mark: | User Token |
|
||||
| `sort` | *Optional[str]* | :heavy_minus_sign: | In the format "field:dir". Available fields are "watchlistedAt" (Added At),<br/>"titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating).<br/>"dir" can be "asc" or "desc"<br/> |
|
||||
| `libtype` | [Optional[operations.Libtype]](../../models/operations/libtype.md) | :heavy_minus_sign: | The type of library to filter. Can be "movie" or "show", or all if not present.<br/> |
|
||||
|
||||
17
docs/models/operations/librarysectionid.md
Normal file
17
docs/models/operations/librarysectionid.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# LibrarySectionID
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `int`
|
||||
|
||||
```python
|
||||
value: int = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
12
docs/models/operations/pathparamfilter.md
Normal file
12
docs/models/operations/pathparamfilter.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# PathParamFilter
|
||||
|
||||
Filter
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ----------- | ----------- |
|
||||
| `ALL` | all |
|
||||
| `AVAILABLE` | available |
|
||||
| `RELEASED` | released |
|
||||
13
docs/models/operations/statisticsbandwidth.md
Normal file
13
docs/models/operations/statisticsbandwidth.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# StatisticsBandwidth
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `account_id` | *Optional[int]* | :heavy_minus_sign: | N/A | 238960586 |
|
||||
| `device_id` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | N/A | 6 |
|
||||
| `at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1718387650 |
|
||||
| `lan` | *Optional[bool]* | :heavy_minus_sign: | N/A | true |
|
||||
| `bytes` | *Optional[int]* | :heavy_minus_sign: | N/A | 22 |
|
||||
13
docs/models/operations/statisticsresources.md
Normal file
13
docs/models/operations/statisticsresources.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# StatisticsResources
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | N/A | 6 |
|
||||
| `at` | *Optional[int]* | :heavy_minus_sign: | N/A | 1718384427 |
|
||||
| `host_cpu_utilization` | *Optional[float]* | :heavy_minus_sign: | N/A | 1.276 |
|
||||
| `process_cpu_utilization` | *Optional[float]* | :heavy_minus_sign: | N/A | 0.025 |
|
||||
| `host_memory_utilization` | *Optional[float]* | :heavy_minus_sign: | N/A | 17.026 |
|
||||
| `process_memory_utilization` | *Optional[float]* | :heavy_minus_sign: | N/A | 0.493 |
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `thumb` | *Optional[str]* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 |
|
||||
| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | Blindkitty38 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *Optional[int]* | :heavy_minus_sign: | N/A | 220 |
|
||||
@@ -18,6 +18,7 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [search_library](#search_library) - Search Library
|
||||
* [get_metadata](#get_metadata) - Get Items Metadata
|
||||
* [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
|
||||
|
||||
## get_file_hash
|
||||
@@ -293,7 +294,7 @@ s = plex_api.PlexAPI(
|
||||
)
|
||||
|
||||
|
||||
res = s.library.get_library_items(section_id='<value>', tag=operations.Tag.GENRE)
|
||||
res = s.library.get_library_items(section_id='<value>', tag=operations.Tag.GENRE, include_guids=1)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -303,10 +304,11 @@ if res.object is not None:
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| 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 |
|
||||
|
||||
|
||||
### Response
|
||||
@@ -477,7 +479,7 @@ s = plex_api.PlexAPI(
|
||||
)
|
||||
|
||||
|
||||
res = s.library.get_metadata_children(rating_key=1539.14)
|
||||
res = s.library.get_metadata_children(rating_key=1539.14, include_elements='<value>')
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -487,9 +489,10 @@ 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 |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `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/> |
|
||||
|
||||
|
||||
### Response
|
||||
@@ -502,6 +505,47 @@ if res.object is not None:
|
||||
| errors.GetMetadataChildrenResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_top_watched_content
|
||||
|
||||
This endpoint will return the top watched content from libraries of a certain type
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
)
|
||||
|
||||
|
||||
res = s.library.get_top_watched_content(type=505531, include_guids=1)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### 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 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetTopWatchedContentResponse](../../models/operations/gettopwatchedcontentresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------- | --------------- | --------------- |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_on_deck
|
||||
|
||||
This endpoint will return the on deck content.
|
||||
|
||||
@@ -8,7 +8,7 @@ Operations against the Plex Media Server System.
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [get_server_capabilities](#get_server_capabilities) - Server Capabilities
|
||||
* [get_server_capabilities](#get_server_capabilities) - Get Server Capabilities
|
||||
* [get_server_preferences](#get_server_preferences) - Get Server Preferences
|
||||
* [get_available_clients](#get_available_clients) - Get Available Clients
|
||||
* [get_devices](#get_devices) - Get Devices
|
||||
@@ -19,7 +19,7 @@ Operations against the Plex Media Server System.
|
||||
|
||||
## get_server_capabilities
|
||||
|
||||
Server Capabilities
|
||||
Get Server Capabilities
|
||||
|
||||
### Example Usage
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ This will Retrieve a listing of all history views.
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
from plex_api.models import operations
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
@@ -62,7 +63,7 @@ s = plex_api.PlexAPI(
|
||||
)
|
||||
|
||||
|
||||
res = s.sessions.get_session_history()
|
||||
res = s.sessions.get_session_history(sort='<value>', account_id=1, filter_=operations.Filter(), library_section_id=12)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
@@ -70,6 +71,15 @@ if res.object is not None:
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `sort` | *Optional[str]* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
|
||||
| `account_id` | *Optional[int]* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
|
||||
| `filter_` | [Optional[operations.Filter]](../../models/operations/filter_.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
|
||||
| `library_section_id` | *Optional[int]* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ API Calls that perform operations with Plex Media Server Statistics
|
||||
### Available Operations
|
||||
|
||||
* [get_statistics](#get_statistics) - Get Media Statistics
|
||||
* [get_resources_statistics](#get_resources_statistics) - Get Resources Statistics
|
||||
* [get_bandwidth_statistics](#get_bandwidth_statistics) - Get Bandwidth Statistics
|
||||
|
||||
## get_statistics
|
||||
|
||||
@@ -49,3 +51,83 @@ if res.object is not None:
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.GetStatisticsResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_resources_statistics
|
||||
|
||||
This will return the resources for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
)
|
||||
|
||||
|
||||
res = s.statistics.get_resources_statistics(timespan=4)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetResourcesStatisticsResponse](../../models/operations/getresourcesstatisticsresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetResourcesStatisticsResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_bandwidth_statistics
|
||||
|
||||
This will return the bandwidth statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
x_plex_client_identifier='Postman',
|
||||
)
|
||||
|
||||
|
||||
res = s.statistics.get_bandwidth_statistics(timespan=4)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `timespan` | *Optional[int]* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetBandwidthStatisticsResponse](../../models/operations/getbandwidthstatisticsresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetBandwidthStatisticsResponseBody | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
@@ -27,7 +27,7 @@ s = plex_api.PlexAPI(
|
||||
|
||||
|
||||
res = s.watchlist.get_watchlist(request=operations.GetWatchlistRequest(
|
||||
filter_=operations.Filter.RELEASED,
|
||||
filter_=operations.PathParamFilter.RELEASED,
|
||||
x_plex_token='<value>',
|
||||
))
|
||||
|
||||
|
||||
2
setup.py
2
setup.py
@@ -19,7 +19,7 @@ except FileNotFoundError:
|
||||
|
||||
setuptools.setup(
|
||||
name='plex-api-client',
|
||||
version='0.9.0',
|
||||
version='0.10.0',
|
||||
author='LukeHagar',
|
||||
description='Python Client SDK Generated by Speakeasy',
|
||||
url='https://github.com/LukeHagar/plexpy.git',
|
||||
|
||||
@@ -393,7 +393,7 @@ class Library:
|
||||
|
||||
|
||||
|
||||
def get_library_items(self, section_id: Any, tag: operations.Tag) -> operations.GetLibraryItemsResponse:
|
||||
def get_library_items(self, section_id: Any, tag: operations.Tag, include_guids: Optional[int] = None) -> operations.GetLibraryItemsResponse:
|
||||
r"""Get Library Items
|
||||
Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
|
||||
- `all`: All items in the section.
|
||||
@@ -420,6 +420,7 @@ class Library:
|
||||
request = operations.GetLibraryItemsRequest(
|
||||
section_id=section_id,
|
||||
tag=tag,
|
||||
include_guids=include_guids,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
@@ -431,6 +432,7 @@ class Library:
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
@@ -706,13 +708,14 @@ class Library:
|
||||
|
||||
|
||||
|
||||
def get_metadata_children(self, rating_key: float) -> operations.GetMetadataChildrenResponse:
|
||||
def get_metadata_children(self, rating_key: float, include_elements: Optional[str] = None) -> operations.GetMetadataChildrenResponse:
|
||||
r"""Get Items Children
|
||||
This endpoint will return the children of of a library item specified with the ratingKey.
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getMetadataChildren', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
request = operations.GetMetadataChildrenRequest(
|
||||
rating_key=rating_key,
|
||||
include_elements=include_elements,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
@@ -724,6 +727,7 @@ class Library:
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
@@ -776,6 +780,69 @@ class Library:
|
||||
|
||||
|
||||
|
||||
def get_top_watched_content(self, type_: int, include_guids: Optional[int] = None) -> operations.GetTopWatchedContentResponse:
|
||||
r"""Get Top Watched Content
|
||||
This endpoint will return the top watched content from libraries of a certain type
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getTopWatchedContent', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
request = operations.GetTopWatchedContentRequest(
|
||||
type=type_,
|
||||
include_guids=include_guids,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
|
||||
url = base_url + '/library/all/top'
|
||||
|
||||
if callable(self.sdk_configuration.security):
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security())
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
|
||||
try:
|
||||
req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers))
|
||||
req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req)
|
||||
http_res = client.send(req)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e)
|
||||
if e is not None:
|
||||
raise e
|
||||
|
||||
if utils.match_status_codes(['4XX','5XX'], http_res.status_code):
|
||||
result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None)
|
||||
if e is not None:
|
||||
raise e
|
||||
if result is not None:
|
||||
http_res = result
|
||||
else:
|
||||
http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res)
|
||||
|
||||
|
||||
|
||||
res = operations.GetTopWatchedContentResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res)
|
||||
|
||||
if http_res.status_code == 200:
|
||||
# pylint: disable=no-else-return
|
||||
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
|
||||
out = utils.unmarshal_json(http_res.text, Optional[operations.GetTopWatchedContentResponseBody])
|
||||
res.object = out
|
||||
else:
|
||||
content_type = http_res.headers.get('Content-Type')
|
||||
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
|
||||
elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
|
||||
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
|
||||
else:
|
||||
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def get_on_deck(self) -> operations.GetOnDeckResponse:
|
||||
r"""Get On Deck
|
||||
This endpoint will return the on deck content.
|
||||
|
||||
@@ -10,6 +10,7 @@ from .deletelibrary import *
|
||||
from .deleteplaylist import *
|
||||
from .enablepapertrail import *
|
||||
from .getavailableclients import *
|
||||
from .getbandwidthstatistics import *
|
||||
from .getbutlertasks import *
|
||||
from .getdevices import *
|
||||
from .getfilehash import *
|
||||
@@ -29,6 +30,7 @@ from .getplaylistcontents import *
|
||||
from .getplaylists import *
|
||||
from .getrecentlyadded import *
|
||||
from .getresizedphoto import *
|
||||
from .getresourcesstatistics import *
|
||||
from .getsearchresults import *
|
||||
from .getserveractivities import *
|
||||
from .getservercapabilities import *
|
||||
@@ -64,4 +66,4 @@ from .updateplaylist import *
|
||||
from .updateplayprogress import *
|
||||
from .uploadplaylist import *
|
||||
|
||||
__all__ = ["AddPlaylistContentsErrors","AddPlaylistContentsResponseBody","ApplyUpdatesErrors","ApplyUpdatesResponseBody","CancelServerActivitiesErrors","CancelServerActivitiesResponseBody","CheckForUpdatesErrors","CheckForUpdatesResponseBody","ClearPlaylistContentsErrors","ClearPlaylistContentsResponseBody","CreatePlaylistErrors","CreatePlaylistResponseBody","DeleteLibraryErrors","DeleteLibraryResponseBody","DeletePlaylistErrors","DeletePlaylistResponseBody","EnablePaperTrailErrors","EnablePaperTrailResponseBody","Errors","GetAvailableClientsErrors","GetAvailableClientsResponseBody","GetButlerTasksErrors","GetButlerTasksResponseBody","GetDevicesErrors","GetDevicesResponseBody","GetFileHashErrors","GetFileHashResponseBody","GetGlobalHubsErrors","GetGlobalHubsResponseBody","GetHomeDataErrors","GetHomeDataResponseBody","GetLibrariesErrors","GetLibrariesResponseBody","GetLibraryErrors","GetLibraryHubsErrors","GetLibraryHubsResponseBody","GetLibraryItemsErrors","GetLibraryItemsResponseBody","GetLibraryResponseBody","GetMetadataChildrenErrors","GetMetadataChildrenResponseBody","GetMetadataErrors","GetMetadataResponseBody","GetMyPlexAccountErrors","GetMyPlexAccountResponseBody","GetOnDeckErrors","GetOnDeckResponseBody","GetPinErrors","GetPinResponseBody","GetPlaylistContentsErrors","GetPlaylistContentsResponseBody","GetPlaylistErrors","GetPlaylistResponseBody","GetPlaylistsErrors","GetPlaylistsResponseBody","GetRecentlyAddedErrors","GetRecentlyAddedResponseBody","GetResizedPhotoErrors","GetResizedPhotoResponseBody","GetSearchResultsErrors","GetSearchResultsResponseBody","GetServerActivitiesErrors","GetServerActivitiesResponseBody","GetServerCapabilitiesResponseBody","GetServerIdentityErrors","GetServerIdentityResponseBody","GetServerListErrors","GetServerListResponseBody","GetServerPreferencesErrors","GetServerPreferencesResponseBody","GetSessionHistoryErrors","GetSessionHistoryResponseBody","GetSessionsErrors","GetSessionsResponseBody","GetSourceConnectionInformationErrors","GetSourceConnectionInformationResponseBody","GetStatisticsErrors","GetStatisticsResponseBody","GetTimelineErrors","GetTimelineResponseBody","GetTokenErrors","GetTokenResponseBody","GetTranscodeSessionsErrors","GetTranscodeSessionsResponseBody","GetTransientTokenErrors","GetTransientTokenResponseBody","GetUpdateStatusErrors","GetUpdateStatusResponseBody","GetWatchlistErrors","GetWatchlistResponseBody","LogLineErrors","LogLineResponseBody","LogMultiLineErrors","LogMultiLineResponseBody","MarkPlayedErrors","MarkPlayedResponseBody","MarkUnplayedErrors","MarkUnplayedResponseBody","PerformSearchErrors","PerformSearchResponseBody","PerformVoiceSearchErrors","PerformVoiceSearchResponseBody","RefreshLibraryErrors","RefreshLibraryResponseBody","SDKError","SearchLibraryErrors","SearchLibraryResponseBody","StartAllTasksErrors","StartAllTasksResponseBody","StartTaskErrors","StartTaskResponseBody","StartUniversalTranscodeErrors","StartUniversalTranscodeResponseBody","StopAllTasksErrors","StopAllTasksResponseBody","StopTaskErrors","StopTaskResponseBody","StopTranscodeSessionErrors","StopTranscodeSessionResponseBody","UpdatePlayProgressErrors","UpdatePlayProgressResponseBody","UpdatePlaylistErrors","UpdatePlaylistResponseBody","UploadPlaylistErrors","UploadPlaylistResponseBody"]
|
||||
__all__ = ["AddPlaylistContentsErrors","AddPlaylistContentsResponseBody","ApplyUpdatesErrors","ApplyUpdatesResponseBody","CancelServerActivitiesErrors","CancelServerActivitiesResponseBody","CheckForUpdatesErrors","CheckForUpdatesResponseBody","ClearPlaylistContentsErrors","ClearPlaylistContentsResponseBody","CreatePlaylistErrors","CreatePlaylistResponseBody","DeleteLibraryErrors","DeleteLibraryResponseBody","DeletePlaylistErrors","DeletePlaylistResponseBody","EnablePaperTrailErrors","EnablePaperTrailResponseBody","Errors","GetAvailableClientsErrors","GetAvailableClientsResponseBody","GetBandwidthStatisticsErrors","GetBandwidthStatisticsResponseBody","GetButlerTasksErrors","GetButlerTasksResponseBody","GetDevicesErrors","GetDevicesResponseBody","GetFileHashErrors","GetFileHashResponseBody","GetGlobalHubsErrors","GetGlobalHubsResponseBody","GetHomeDataErrors","GetHomeDataResponseBody","GetLibrariesErrors","GetLibrariesResponseBody","GetLibraryErrors","GetLibraryHubsErrors","GetLibraryHubsResponseBody","GetLibraryItemsErrors","GetLibraryItemsResponseBody","GetLibraryResponseBody","GetMetadataChildrenErrors","GetMetadataChildrenResponseBody","GetMetadataErrors","GetMetadataResponseBody","GetMyPlexAccountErrors","GetMyPlexAccountResponseBody","GetOnDeckErrors","GetOnDeckResponseBody","GetPinErrors","GetPinResponseBody","GetPlaylistContentsErrors","GetPlaylistContentsResponseBody","GetPlaylistErrors","GetPlaylistResponseBody","GetPlaylistsErrors","GetPlaylistsResponseBody","GetRecentlyAddedErrors","GetRecentlyAddedResponseBody","GetResizedPhotoErrors","GetResizedPhotoResponseBody","GetResourcesStatisticsErrors","GetResourcesStatisticsResponseBody","GetSearchResultsErrors","GetSearchResultsResponseBody","GetServerActivitiesErrors","GetServerActivitiesResponseBody","GetServerCapabilitiesResponseBody","GetServerIdentityErrors","GetServerIdentityResponseBody","GetServerListErrors","GetServerListResponseBody","GetServerPreferencesErrors","GetServerPreferencesResponseBody","GetSessionHistoryErrors","GetSessionHistoryResponseBody","GetSessionsErrors","GetSessionsResponseBody","GetSourceConnectionInformationErrors","GetSourceConnectionInformationResponseBody","GetStatisticsErrors","GetStatisticsResponseBody","GetTimelineErrors","GetTimelineResponseBody","GetTokenErrors","GetTokenResponseBody","GetTranscodeSessionsErrors","GetTranscodeSessionsResponseBody","GetTransientTokenErrors","GetTransientTokenResponseBody","GetUpdateStatusErrors","GetUpdateStatusResponseBody","GetWatchlistErrors","GetWatchlistResponseBody","LogLineErrors","LogLineResponseBody","LogMultiLineErrors","LogMultiLineResponseBody","MarkPlayedErrors","MarkPlayedResponseBody","MarkUnplayedErrors","MarkUnplayedResponseBody","PerformSearchErrors","PerformSearchResponseBody","PerformVoiceSearchErrors","PerformVoiceSearchResponseBody","RefreshLibraryErrors","RefreshLibraryResponseBody","SDKError","SearchLibraryErrors","SearchLibraryResponseBody","StartAllTasksErrors","StartAllTasksResponseBody","StartTaskErrors","StartTaskResponseBody","StartUniversalTranscodeErrors","StartUniversalTranscodeResponseBody","StopAllTasksErrors","StopAllTasksResponseBody","StopTaskErrors","StopTaskResponseBody","StopTranscodeSessionErrors","StopTranscodeSessionResponseBody","UpdatePlayProgressErrors","UpdatePlayProgressResponseBody","UpdatePlaylistErrors","UpdatePlaylistResponseBody","UploadPlaylistErrors","UploadPlaylistResponseBody"]
|
||||
|
||||
32
src/plex_api/models/errors/getbandwidthstatistics.py
Normal file
32
src/plex_api/models/errors/getbandwidthstatistics.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import requests as requests_http
|
||||
from dataclasses_json import Undefined, dataclass_json
|
||||
from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsErrors:
|
||||
code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }})
|
||||
message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
|
||||
status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsResponseBody(Exception):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
errors: Optional[List[GetBandwidthStatisticsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }})
|
||||
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }})
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self, type(self))
|
||||
32
src/plex_api/models/errors/getresourcesstatistics.py
Normal file
32
src/plex_api/models/errors/getresourcesstatistics.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import requests as requests_http
|
||||
from dataclasses_json import Undefined, dataclass_json
|
||||
from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsErrors:
|
||||
code: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }})
|
||||
message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
|
||||
status: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsResponseBody(Exception):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
errors: Optional[List[GetResourcesStatisticsErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }})
|
||||
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'exclude': lambda f: True }})
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self, type(self))
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
from typing import Optional
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Globals:
|
||||
x_plex_client_identifier: str = dataclasses.field(metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
r"""The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
||||
File diff suppressed because one or more lines are too long
92
src/plex_api/models/operations/getbandwidthstatistics.py
Normal file
92
src/plex_api/models/operations/getbandwidthstatistics.py
Normal file
@@ -0,0 +1,92 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import requests as requests_http
|
||||
from dataclasses_json import Undefined, dataclass_json
|
||||
from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsRequest:
|
||||
timespan: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'Timespan', 'style': 'form', 'explode': True }})
|
||||
r"""The timespan to retrieve statistics for
|
||||
the exact meaning of this parameter is not known
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsDevice:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
|
||||
platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }})
|
||||
client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clientIdentifier'), 'exclude': lambda f: f is None }})
|
||||
created_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsAccount:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }})
|
||||
name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
|
||||
default_audio_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultAudioLanguage'), 'exclude': lambda f: f is None }})
|
||||
auto_select_audio: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('autoSelectAudio'), 'exclude': lambda f: f is None }})
|
||||
default_subtitle_language: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultSubtitleLanguage'), 'exclude': lambda f: f is None }})
|
||||
subtitle_mode: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtitleMode'), 'exclude': lambda f: f is None }})
|
||||
thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class StatisticsBandwidth:
|
||||
account_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountID'), 'exclude': lambda f: f is None }})
|
||||
device_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deviceID'), 'exclude': lambda f: f is None }})
|
||||
timespan: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timespan'), 'exclude': lambda f: f is None }})
|
||||
at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('at'), 'exclude': lambda f: f is None }})
|
||||
lan: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lan'), 'exclude': lambda f: f is None }})
|
||||
bytes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bytes'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsMediaContainer:
|
||||
size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }})
|
||||
device: Optional[List[GetBandwidthStatisticsDevice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Device'), 'exclude': lambda f: f is None }})
|
||||
account: Optional[List[GetBandwidthStatisticsAccount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Account'), 'exclude': lambda f: f is None }})
|
||||
statistics_bandwidth: Optional[List[StatisticsBandwidth]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('StatisticsBandwidth'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsResponseBody:
|
||||
r"""Bandwidth Statistics"""
|
||||
media_container: Optional[GetBandwidthStatisticsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetBandwidthStatisticsResponse:
|
||||
content_type: str = dataclasses.field()
|
||||
r"""HTTP response content type for this operation"""
|
||||
status_code: int = dataclasses.field()
|
||||
r"""HTTP response status code for this operation"""
|
||||
raw_response: requests_http.Response = dataclasses.field()
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
object: Optional[GetBandwidthStatisticsResponseBody] = dataclasses.field(default=None)
|
||||
r"""Bandwidth Statistics"""
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from dataclasses_json import Undefined, dataclass_json
|
||||
from datetime import date
|
||||
from enum import Enum
|
||||
from plex_api import utils
|
||||
from typing import Any, List, Optional
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
|
||||
class Tag(str, Enum):
|
||||
@@ -39,6 +39,8 @@ class GetLibraryItemsRequest:
|
||||
r"""the Id of the library to query"""
|
||||
tag: Tag = dataclasses.field(metadata={'path_param': { 'field_name': 'tag', 'style': 'simple', 'explode': False }})
|
||||
r"""A key representing a specific tag within the section."""
|
||||
include_guids: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeGuids', 'style': 'form', 'explode': True }})
|
||||
r"""Adds the Guids object to the response"""
|
||||
|
||||
|
||||
|
||||
@@ -189,7 +191,7 @@ class GetLibraryItemsMediaContainer:
|
||||
allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }})
|
||||
art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }})
|
||||
identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }})
|
||||
library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }})
|
||||
library_section_id: Optional[LibrarySectionID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }})
|
||||
library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }})
|
||||
library_section_uuid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionUUID'), 'exclude': lambda f: f is None }})
|
||||
media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }})
|
||||
@@ -226,3 +228,5 @@ class GetLibraryItemsResponse:
|
||||
r"""The contents of the library by section and tag"""
|
||||
|
||||
|
||||
|
||||
LibrarySectionID = Union[int, str]
|
||||
|
||||
@@ -12,6 +12,8 @@ from typing import List, Optional
|
||||
class GetMetadataChildrenRequest:
|
||||
rating_key: float = dataclasses.field(metadata={'path_param': { 'field_name': 'ratingKey', 'style': 'simple', 'explode': False }})
|
||||
r"""the id of the library item to return the children of."""
|
||||
include_elements: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeElements', 'style': 'form', 'explode': True }})
|
||||
r"""Adds additional elements to the response. Supported types are (Stream)"""
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ GET_PIN_SERVERS = [
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetPinGlobals:
|
||||
x_plex_client_identifier: str = dataclasses.field(metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
r"""The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
@@ -64,6 +64,7 @@ class Location:
|
||||
@dataclasses.dataclass
|
||||
class GetPinResponseBody:
|
||||
r"""The Pin"""
|
||||
UNSET='__SPEAKEASY_UNSET__'
|
||||
id: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
r"""PinID for use with authentication"""
|
||||
code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }})
|
||||
@@ -80,7 +81,7 @@ class GetPinResponseBody:
|
||||
created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }})
|
||||
expires_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expiresAt'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }})
|
||||
auth_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('authToken'), 'exclude': lambda f: f is None }})
|
||||
new_registration: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('newRegistration'), 'exclude': lambda f: f is None }})
|
||||
new_registration: Optional[bool] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('newRegistration'), 'exclude': lambda f: f is GetPinResponseBody.UNSET }})
|
||||
|
||||
|
||||
|
||||
|
||||
63
src/plex_api/models/operations/getresourcesstatistics.py
Normal file
63
src/plex_api/models/operations/getresourcesstatistics.py
Normal file
@@ -0,0 +1,63 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import requests as requests_http
|
||||
from dataclasses_json import Undefined, dataclass_json
|
||||
from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsRequest:
|
||||
timespan: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'Timespan', 'style': 'form', 'explode': True }})
|
||||
r"""The timespan to retrieve statistics for
|
||||
the exact meaning of this parameter is not known
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class StatisticsResources:
|
||||
timespan: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timespan'), 'exclude': lambda f: f is None }})
|
||||
at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('at'), 'exclude': lambda f: f is None }})
|
||||
host_cpu_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostCpuUtilization'), 'exclude': lambda f: f is None }})
|
||||
process_cpu_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('processCpuUtilization'), 'exclude': lambda f: f is None }})
|
||||
host_memory_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hostMemoryUtilization'), 'exclude': lambda f: f is None }})
|
||||
process_memory_utilization: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('processMemoryUtilization'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsMediaContainer:
|
||||
size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }})
|
||||
statistics_resources: Optional[List[StatisticsResources]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('StatisticsResources'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsResponseBody:
|
||||
r"""Resource Statistics"""
|
||||
media_container: Optional[GetResourcesStatisticsMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetResourcesStatisticsResponse:
|
||||
content_type: str = dataclasses.field()
|
||||
r"""HTTP response content type for this operation"""
|
||||
status_code: int = dataclasses.field()
|
||||
r"""HTTP response status code for this operation"""
|
||||
raw_response: requests_http.Response = dataclasses.field()
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
object: Optional[GetResourcesStatisticsResponseBody] = dataclasses.field(default=None)
|
||||
r"""Resource Statistics"""
|
||||
|
||||
|
||||
@@ -9,6 +9,31 @@ from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Filter:
|
||||
r"""Filters content by field and direction/equality
|
||||
(Unknown if viewedAt is the only supported column)
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetSessionHistoryRequest:
|
||||
sort: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'sort', 'style': 'form', 'explode': True }})
|
||||
r"""Sorts the results by the specified field followed by the direction (asc, desc)"""
|
||||
account_id: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'accountId', 'style': 'form', 'explode': True }})
|
||||
r"""Filter results by those that are related to a specific users id"""
|
||||
filter_: Optional[Filter] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'filter', 'style': 'form', 'explode': True }})
|
||||
r"""Filters content by field and direction/equality
|
||||
(Unknown if viewedAt is the only supported column)
|
||||
"""
|
||||
library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'librarySectionID', 'style': 'form', 'explode': True }})
|
||||
r"""Filters the results based on the id of a valid library section"""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetSessionHistoryMetadata:
|
||||
|
||||
@@ -69,7 +69,7 @@ class GetSessionsMedia:
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class User:
|
||||
class GetSessionsUser:
|
||||
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }})
|
||||
title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }})
|
||||
@@ -146,7 +146,7 @@ class GetSessionsMetadata:
|
||||
updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }})
|
||||
view_offset: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewOffset'), 'exclude': lambda f: f is None }})
|
||||
media: Optional[List[GetSessionsMedia]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Media'), 'exclude': lambda f: f is None }})
|
||||
user: Optional[User] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('User'), 'exclude': lambda f: f is None }})
|
||||
user: Optional[GetSessionsUser] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('User'), 'exclude': lambda f: f is None }})
|
||||
player: Optional[Player] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Player'), 'exclude': lambda f: f is None }})
|
||||
session: Optional[Session] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Session'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ GET_TOKEN_SERVERS = [
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetTokenGlobals:
|
||||
x_plex_client_identifier: str = dataclasses.field(metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
x_plex_client_identifier: Optional[str] = dataclasses.field(default=None, metadata={'header': { 'field_name': 'X-Plex-Client-Identifier', 'style': 'simple', 'explode': False }})
|
||||
r"""The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
||||
143
src/plex_api/models/operations/gettopwatchedcontent.py
Normal file
143
src/plex_api/models/operations/gettopwatchedcontent.py
Normal file
@@ -0,0 +1,143 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import requests as requests_http
|
||||
from dataclasses_json import Undefined, dataclass_json
|
||||
from datetime import date
|
||||
from plex_api import utils
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentRequest:
|
||||
type: int = dataclasses.field(metadata={'query_param': { 'field_name': 'type', 'style': 'form', 'explode': True }})
|
||||
r"""the library type (1 - movies, 2 - shows, 3 - music)"""
|
||||
include_guids: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeGuids', 'style': 'form', 'explode': True }})
|
||||
r"""Adds the Guids object to the response"""
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentGenre:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }})
|
||||
tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentCountry:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }})
|
||||
tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentGuids:
|
||||
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentRole:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
filter_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('filter'), 'exclude': lambda f: f is None }})
|
||||
tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tag'), 'exclude': lambda f: f is None }})
|
||||
tag_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagKey'), 'exclude': lambda f: f is None }})
|
||||
role: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('role'), 'exclude': lambda f: f is None }})
|
||||
thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class User:
|
||||
id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentMetadata:
|
||||
rating_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ratingKey'), 'exclude': lambda f: f is None }})
|
||||
key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('key'), 'exclude': lambda f: f is None }})
|
||||
guid: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('guid'), 'exclude': lambda f: f is None }})
|
||||
slug: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('slug'), 'exclude': lambda f: f is None }})
|
||||
studio: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('studio'), 'exclude': lambda f: f is None }})
|
||||
type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
|
||||
title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title'), 'exclude': lambda f: f is None }})
|
||||
library_section_title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionTitle'), 'exclude': lambda f: f is None }})
|
||||
library_section_id: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionID'), 'exclude': lambda f: f is None }})
|
||||
library_section_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('librarySectionKey'), 'exclude': lambda f: f is None }})
|
||||
content_rating: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentRating'), 'exclude': lambda f: f is None }})
|
||||
summary: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('summary'), 'exclude': lambda f: f is None }})
|
||||
index: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }})
|
||||
audience_rating: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRating'), 'exclude': lambda f: f is None }})
|
||||
year: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('year'), 'exclude': lambda f: f is None }})
|
||||
tagline: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tagline'), 'exclude': lambda f: f is None }})
|
||||
thumb: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('thumb'), 'exclude': lambda f: f is None }})
|
||||
art: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('art'), 'exclude': lambda f: f is None }})
|
||||
duration: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration'), 'exclude': lambda f: f is None }})
|
||||
originally_available_at: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('originallyAvailableAt'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }})
|
||||
leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('leafCount'), 'exclude': lambda f: f is None }})
|
||||
viewed_leaf_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('viewedLeafCount'), 'exclude': lambda f: f is None }})
|
||||
child_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('childCount'), 'exclude': lambda f: f is None }})
|
||||
added_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addedAt'), 'exclude': lambda f: f is None }})
|
||||
updated_at: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedAt'), 'exclude': lambda f: f is None }})
|
||||
global_view_count: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('globalViewCount'), 'exclude': lambda f: f is None }})
|
||||
audience_rating_image: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('audienceRatingImage'), 'exclude': lambda f: f is None }})
|
||||
genre: Optional[List[GetTopWatchedContentGenre]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Genre'), 'exclude': lambda f: f is None }})
|
||||
country: Optional[List[GetTopWatchedContentCountry]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Country'), 'exclude': lambda f: f is None }})
|
||||
guids: Optional[List[GetTopWatchedContentGuids]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Guid'), 'exclude': lambda f: f is None }})
|
||||
role: Optional[List[GetTopWatchedContentRole]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Role'), 'exclude': lambda f: f is None }})
|
||||
user: Optional[List[User]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('User'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentMediaContainer:
|
||||
size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }})
|
||||
allow_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allowSync'), 'exclude': lambda f: f is None }})
|
||||
identifier: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('identifier'), 'exclude': lambda f: f is None }})
|
||||
media_tag_prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagPrefix'), 'exclude': lambda f: f is None }})
|
||||
media_tag_version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mediaTagVersion'), 'exclude': lambda f: f is None }})
|
||||
metadata: Optional[List[GetTopWatchedContentMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Metadata'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass_json(undefined=Undefined.EXCLUDE)
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentResponseBody:
|
||||
r"""The metadata of the library item."""
|
||||
media_container: Optional[GetTopWatchedContentMediaContainer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('MediaContainer'), 'exclude': lambda f: f is None }})
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetTopWatchedContentResponse:
|
||||
content_type: str = dataclasses.field()
|
||||
r"""HTTP response content type for this operation"""
|
||||
status_code: int = dataclasses.field()
|
||||
r"""HTTP response status code for this operation"""
|
||||
raw_response: requests_http.Response = dataclasses.field()
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
object: Optional[GetTopWatchedContentResponseBody] = dataclasses.field(default=None)
|
||||
r"""The metadata of the library item."""
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ GET_WATCHLIST_SERVERS = [
|
||||
]
|
||||
|
||||
|
||||
class Filter(str, Enum):
|
||||
class PathParamFilter(str, Enum):
|
||||
r"""Filter"""
|
||||
ALL = 'all'
|
||||
AVAILABLE = 'available'
|
||||
@@ -42,7 +42,7 @@ class IncludeExternalMedia(int, Enum):
|
||||
|
||||
@dataclasses.dataclass
|
||||
class GetWatchlistRequest:
|
||||
filter_: Filter = dataclasses.field(metadata={'path_param': { 'field_name': 'filter', 'style': 'simple', 'explode': False }})
|
||||
filter_: PathParamFilter = dataclasses.field(metadata={'path_param': { 'field_name': 'filter', 'style': 'simple', 'explode': False }})
|
||||
r"""Filter"""
|
||||
x_plex_token: str = dataclasses.field(metadata={'query_param': { 'field_name': 'X-Plex-Token', 'style': 'form', 'explode': True }})
|
||||
r"""User Token"""
|
||||
|
||||
@@ -276,7 +276,7 @@ class Playlists:
|
||||
|
||||
res = operations.DeletePlaylistResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res)
|
||||
|
||||
if http_res.status_code == 200:
|
||||
if http_res.status_code == 204:
|
||||
pass
|
||||
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
|
||||
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
|
||||
|
||||
@@ -19,7 +19,6 @@ SERVERS = [
|
||||
|
||||
|
||||
class ServerProtocol(str, Enum):
|
||||
r"""The protocol to use when connecting to your plex server."""
|
||||
HTTP = 'http'
|
||||
HTTPS = 'https'
|
||||
|
||||
@@ -34,9 +33,9 @@ class SDKConfiguration:
|
||||
server_defaults: List[Dict[str, str]] = field(default_factory=List)
|
||||
language: str = 'python'
|
||||
openapi_doc_version: str = '0.0.3'
|
||||
sdk_version: str = '0.9.0'
|
||||
gen_version: str = '2.342.6'
|
||||
user_agent: str = 'speakeasy-sdk/python 0.9.0 2.342.6 0.0.3 plex-api-client'
|
||||
sdk_version: str = '0.10.0'
|
||||
gen_version: str = '2.349.6'
|
||||
user_agent: str = 'speakeasy-sdk/python 0.10.0 2.349.6 0.0.3 plex-api-client'
|
||||
retry_config: Optional[RetryConfig] = None
|
||||
|
||||
def __post_init__(self):
|
||||
|
||||
@@ -17,8 +17,8 @@ class Server:
|
||||
|
||||
|
||||
def get_server_capabilities(self) -> operations.GetServerCapabilitiesResponse:
|
||||
r"""Server Capabilities
|
||||
Server Capabilities
|
||||
r"""Get Server Capabilities
|
||||
Get Server Capabilities
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getServerCapabilities', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
|
||||
@@ -82,11 +82,18 @@ class Sessions:
|
||||
|
||||
|
||||
|
||||
def get_session_history(self) -> operations.GetSessionHistoryResponse:
|
||||
def get_session_history(self, sort: Optional[str] = None, account_id: Optional[int] = None, filter_: Optional[operations.Filter] = None, library_section_id: Optional[int] = None) -> operations.GetSessionHistoryResponse:
|
||||
r"""Get Session History
|
||||
This will Retrieve a listing of all history views.
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getSessionHistory', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
request = operations.GetSessionHistoryRequest(
|
||||
sort=sort,
|
||||
account_id=account_id,
|
||||
filter_=filter_,
|
||||
library_section_id=library_section_id,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
|
||||
url = base_url + '/status/sessions/history/all'
|
||||
@@ -96,6 +103,7 @@ class Sessions:
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
|
||||
@@ -86,4 +86,146 @@ class Statistics:
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def get_resources_statistics(self, timespan: Optional[int] = None) -> operations.GetResourcesStatisticsResponse:
|
||||
r"""Get Resources Statistics
|
||||
This will return the resources for the server
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getResourcesStatistics', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
request = operations.GetResourcesStatisticsRequest(
|
||||
timespan=timespan,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
|
||||
url = base_url + '/statistics/resources'
|
||||
|
||||
if callable(self.sdk_configuration.security):
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security())
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
|
||||
try:
|
||||
req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers))
|
||||
req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req)
|
||||
http_res = client.send(req)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e)
|
||||
if e is not None:
|
||||
raise e
|
||||
|
||||
if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code):
|
||||
result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None)
|
||||
if e is not None:
|
||||
raise e
|
||||
if result is not None:
|
||||
http_res = result
|
||||
else:
|
||||
http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res)
|
||||
|
||||
|
||||
|
||||
res = operations.GetResourcesStatisticsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res)
|
||||
|
||||
if http_res.status_code == 200:
|
||||
# pylint: disable=no-else-return
|
||||
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
|
||||
out = utils.unmarshal_json(http_res.text, Optional[operations.GetResourcesStatisticsResponseBody])
|
||||
res.object = out
|
||||
else:
|
||||
content_type = http_res.headers.get('Content-Type')
|
||||
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
|
||||
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
|
||||
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
|
||||
elif http_res.status_code == 401:
|
||||
# pylint: disable=no-else-return
|
||||
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
|
||||
out = utils.unmarshal_json(http_res.text, errors.GetResourcesStatisticsResponseBody)
|
||||
out.raw_response = http_res
|
||||
raise out
|
||||
else:
|
||||
content_type = http_res.headers.get('Content-Type')
|
||||
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
|
||||
else:
|
||||
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def get_bandwidth_statistics(self, timespan: Optional[int] = None) -> operations.GetBandwidthStatisticsResponse:
|
||||
r"""Get Bandwidth Statistics
|
||||
This will return the bandwidth statistics for the server
|
||||
"""
|
||||
hook_ctx = HookContext(operation_id='getBandwidthStatistics', oauth2_scopes=[], security_source=self.sdk_configuration.security)
|
||||
request = operations.GetBandwidthStatisticsRequest(
|
||||
timespan=timespan,
|
||||
)
|
||||
|
||||
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
|
||||
|
||||
url = base_url + '/statistics/bandwidth'
|
||||
|
||||
if callable(self.sdk_configuration.security):
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security())
|
||||
else:
|
||||
headers, query_params = utils.get_security(self.sdk_configuration.security)
|
||||
|
||||
query_params = { **utils.get_query_params(request), **query_params }
|
||||
headers['Accept'] = 'application/json'
|
||||
headers['user-agent'] = self.sdk_configuration.user_agent
|
||||
client = self.sdk_configuration.client
|
||||
|
||||
try:
|
||||
req = client.prepare_request(requests_http.Request('GET', url, params=query_params, headers=headers))
|
||||
req = self.sdk_configuration.get_hooks().before_request(BeforeRequestContext(hook_ctx), req)
|
||||
http_res = client.send(req)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), None, e)
|
||||
if e is not None:
|
||||
raise e
|
||||
|
||||
if utils.match_status_codes(['400','401','4XX','5XX'], http_res.status_code):
|
||||
result, e = self.sdk_configuration.get_hooks().after_error(AfterErrorContext(hook_ctx), http_res, None)
|
||||
if e is not None:
|
||||
raise e
|
||||
if result is not None:
|
||||
http_res = result
|
||||
else:
|
||||
http_res = self.sdk_configuration.get_hooks().after_success(AfterSuccessContext(hook_ctx), http_res)
|
||||
|
||||
|
||||
|
||||
res = operations.GetBandwidthStatisticsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type') or '', raw_response=http_res)
|
||||
|
||||
if http_res.status_code == 200:
|
||||
# pylint: disable=no-else-return
|
||||
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
|
||||
out = utils.unmarshal_json(http_res.text, Optional[operations.GetBandwidthStatisticsResponseBody])
|
||||
res.object = out
|
||||
else:
|
||||
content_type = http_res.headers.get('Content-Type')
|
||||
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
|
||||
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
|
||||
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
|
||||
elif http_res.status_code == 401:
|
||||
# pylint: disable=no-else-return
|
||||
if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'):
|
||||
out = utils.unmarshal_json(http_res.text, errors.GetBandwidthStatisticsResponseBody)
|
||||
out.raw_response = http_res
|
||||
raise out
|
||||
else:
|
||||
content_type = http_res.headers.get('Content-Type')
|
||||
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
|
||||
else:
|
||||
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user