ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1

This commit is contained in:
speakeasybot
2025-02-06 00:02:38 +00:00
parent 816a882f01
commit 8eb9395ec4
59 changed files with 2516 additions and 1132 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 3eeea668-4ef4-464e-a888-bdfa023bedf5
management:
docChecksum: a643a64d282d705e3e24f61ed6f068c6
docChecksum: 14b35829d4be91a88269761c3ed01426
docVersion: 0.0.3
speakeasyVersion: 1.476.2
generationVersion: 2.495.1
releaseVersion: 0.21.1
configChecksum: db2fe2bda98c7138ce99a5ee8525cca3
speakeasyVersion: 1.484.1
generationVersion: 2.503.2
releaseVersion: 0.21.2
configChecksum: 8b6dcb5cd25065d9fbc63e5ede1119c9
repoURL: https://github.com/LukeHagar/plexpy.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexpy.git
@@ -15,7 +15,7 @@ features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.10.5
core: 5.10.9
defaultEnabledRetries: 0.2.0
deprecations: 3.0.2
downloadStreams: 1.0.1
@@ -23,7 +23,7 @@ features:
enums: 3.1.1
envVarSecurityUsage: 0.3.2
errors: 3.2.0
flattening: 3.1.0
flattening: 3.1.1
globalSecurity: 3.0.2
globalSecurityCallbacks: 1.0.0
globalSecurityFlattening: 1.0.0
@@ -101,6 +101,10 @@ generatedFiles:
- docs/models/errors/getcompanionsdataerrors.md
- docs/models/errors/getcompanionsdataplexerrors.md
- docs/models/errors/getcompanionsdataunauthorized.md
- docs/models/errors/getcountrieslibrarybadrequest.md
- docs/models/errors/getcountrieslibraryerrors.md
- docs/models/errors/getcountrieslibrarylibraryerrors.md
- docs/models/errors/getcountrieslibraryunauthorized.md
- docs/models/errors/getdevicesbadrequest.md
- docs/models/errors/getdeviceserrors.md
- docs/models/errors/getdevicesservererrors.md
@@ -109,6 +113,10 @@ generatedFiles:
- docs/models/errors/getfilehasherrors.md
- docs/models/errors/getfilehashlibraryerrors.md
- docs/models/errors/getfilehashunauthorized.md
- docs/models/errors/getgenreslibrarybadrequest.md
- docs/models/errors/getgenreslibraryerrors.md
- docs/models/errors/getgenreslibrarylibraryerrors.md
- docs/models/errors/getgenreslibraryunauthorized.md
- docs/models/errors/getgeodatabadrequest.md
- docs/models/errors/getgeodataerrors.md
- docs/models/errors/getgeodataplexerrors.md
@@ -381,7 +389,7 @@ generatedFiles:
- docs/models/operations/enablepapertrailresponse.md
- docs/models/operations/episodesort.md
- docs/models/operations/feature.md
- docs/models/operations/field.md
- docs/models/operations/fieldt.md
- docs/models/operations/fieldtype.md
- docs/models/operations/filter_.md
- docs/models/operations/flattenseasons.md
@@ -408,11 +416,21 @@ generatedFiles:
- docs/models/operations/getbutlertasksresponse.md
- docs/models/operations/getbutlertasksresponsebody.md
- docs/models/operations/getcompanionsdataresponse.md
- docs/models/operations/getcountrieslibrarydirectory.md
- docs/models/operations/getcountrieslibrarymediacontainer.md
- docs/models/operations/getcountrieslibraryrequest.md
- docs/models/operations/getcountrieslibraryresponse.md
- docs/models/operations/getcountrieslibraryresponsebody.md
- docs/models/operations/getdevicesmediacontainer.md
- docs/models/operations/getdevicesresponse.md
- docs/models/operations/getdevicesresponsebody.md
- docs/models/operations/getfilehashrequest.md
- docs/models/operations/getfilehashresponse.md
- docs/models/operations/getgenreslibrarydirectory.md
- docs/models/operations/getgenreslibrarymediacontainer.md
- docs/models/operations/getgenreslibraryrequest.md
- docs/models/operations/getgenreslibraryresponse.md
- docs/models/operations/getgenreslibraryresponsebody.md
- docs/models/operations/getgeodatageodata.md
- docs/models/operations/getgeodataresponse.md
- docs/models/operations/getglobalhubsmediacontainer.md
@@ -890,6 +908,8 @@ generatedFiles:
- src/plex_api_client/models/errors/enablepapertrail.py
- src/plex_api_client/models/errors/get_all_libraries.py
- src/plex_api_client/models/errors/get_banner_image.py
- src/plex_api_client/models/errors/get_countries_library.py
- src/plex_api_client/models/errors/get_genres_library.py
- src/plex_api_client/models/errors/get_library_details.py
- src/plex_api_client/models/errors/get_library_items.py
- src/plex_api_client/models/errors/get_media_providers.py
@@ -967,6 +987,8 @@ generatedFiles:
- src/plex_api_client/models/operations/enablepapertrail.py
- src/plex_api_client/models/operations/get_all_libraries.py
- src/plex_api_client/models/operations/get_banner_image.py
- src/plex_api_client/models/operations/get_countries_library.py
- src/plex_api_client/models/operations/get_genres_library.py
- src/plex_api_client/models/operations/get_library_details.py
- src/plex_api_client/models/operations/get_library_items.py
- src/plex_api_client/models/operations/get_media_providers.py
@@ -2047,5 +2069,29 @@ examples:
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
get-genres-library:
speakeasy-default-get-genres-library:
parameters:
path:
sectionKey: 9518
responses:
"200":
application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows (Reality)", "title2": "By Genre", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/10/all?genre=89", "key": "89", "title": "Action", "type": "genre"}]}}
"400":
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
get-countries-library:
speakeasy-default-get-countries-library:
parameters:
path:
sectionKey: 9518
responses:
"200":
application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Country", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/2/all?country=15491", "key": "15491", "title": "Japan"}]}}
"400":
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
"401":
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
examplesVersion: 1.0.0
generatedTests: {}

View File

@@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 0.21.1
version: 0.21.2
additionalDependencies:
dev: {}
main: {}

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.476.2
speakeasyVersion: 1.484.1
sources:
my-source:
sourceNamespace: my-source
@@ -8,19 +8,19 @@ sources:
- latest
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:e73707dfae50d22dab2166b1661938446b9831bcee252ecd696a1172dfd6ae2c
sourceBlobDigest: sha256:e06caa091ad527fd21714fc0d43e7ea385e181fbad8c4f60296457a89a23c696
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
tags:
- latest
- speakeasy-sdk-regen-1738022506
- speakeasy-sdk-regen-1738800087
targets:
plexpy:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:e73707dfae50d22dab2166b1661938446b9831bcee252ecd696a1172dfd6ae2c
sourceBlobDigest: sha256:e06caa091ad527fd21714fc0d43e7ea385e181fbad8c4f60296457a89a23c696
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
codeSamplesNamespace: code-samples-python-plexpy
codeSamplesRevisionDigest: sha256:bc15ff165c65f5567be1675febe04ab81d64f96e0d364efbf9b6c61b0fbb46e9
codeSamplesRevisionDigest: sha256:e060abd1e6124c442333335008e39e994ede6ecf685a0d1e0e1c0813fc496ca5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest

View File

@@ -87,6 +87,37 @@ pip install plex-api-client
```bash
poetry add plex-api-client
```
### Shell and script usage with `uv`
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
```shell
uvx --from plex-api-client python
```
It's also possible to write a standalone Python script without needing to set up a whole project like so:
```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# dependencies = [
# "plex-api-client",
# ]
# ///
from plex_api_client import PlexAPI
sdk = PlexAPI(
# SDK arguments
)
# Rest of script here...
```
Once that is saved to a file, you can run it with `uv run script.py` where
`script.py` can be replaced with the actual file name.
<!-- End SDK Installation [installation] -->
<!-- Start IDE Support [idesupport] -->
@@ -186,6 +217,8 @@ asyncio.run(main())
* [get_library_items](docs/sdks/library/README.md#get_library_items) - Get Library Items
* [get_refresh_library_metadata](docs/sdks/library/README.md#get_refresh_library_metadata) - Refresh Metadata Of The Library
* [get_search_library](docs/sdks/library/README.md#get_search_library) - Search Library
* [get_genres_library](docs/sdks/library/README.md#get_genres_library) - Get Genres of library media
* [get_countries_library](docs/sdks/library/README.md#get_countries_library) - Get Countries of library media
* [get_search_all_libraries](docs/sdks/library/README.md#get_search_all_libraries) - Search All Libraries
* [get_meta_data_by_rating_key](docs/sdks/library/README.md#get_meta_data_by_rating_key) - Get Metadata by RatingKey
* [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children

View File

@@ -908,4 +908,14 @@ Based on:
### Generated
- [python v0.21.1] .
### Releases
- [PyPI v0.21.1] https://pypi.org/project/plex-api-client/0.21.1 - .
- [PyPI v0.21.1] https://pypi.org/project/plex-api-client/0.21.1 - .
## 2025-02-06 00:01:12
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.21.2] .
### Releases
- [PyPI v0.21.2] https://pypi.org/project/plex-api-client/0.21.2 - .

View File

@@ -392,9 +392,6 @@ actions:
"content_directory_id": 470161,
"section_id": 2,
"type": operations.Type.TV_SHOW,
"include_meta": operations.IncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None
@@ -413,7 +410,7 @@ actions:
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.search.perform_search(query="dylan", limit=5)
res = plex_api.search.perform_search(query="dylan")
assert res is not None
@@ -431,7 +428,7 @@ actions:
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.search.perform_voice_search(query="dead+poop", limit=5)
res = plex_api.search.perform_voice_search(query="dead+poop")
assert res is not None
@@ -643,9 +640,6 @@ actions:
],
"section_id": 2,
"type": operations.QueryParamType.TV_SHOW,
"include_meta": operations.QueryParamIncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None
@@ -671,8 +665,6 @@ actions:
"search_types": [
operations.SearchTypes.PEOPLE,
],
"include_collections": operations.QueryParamIncludeCollections.ENABLE,
"include_external_media": operations.QueryParamIncludeExternalMedia.ENABLE,
})
assert res.object is not None
@@ -712,8 +704,6 @@ actions:
res = plex_api.watchlist.get_watch_list(request={
"filter_": operations.Filter.AVAILABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
"x_plex_token": "CV5xoxjTpFKUzBTShsaf",
})
@@ -746,13 +736,48 @@ actions:
label: details
source: |-
from plex_api_client import PlexAPI
from plex_api_client.models import operations
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_library_details(section_key=9518, include_details=operations.IncludeDetails.ZERO)
res = plex_api.library.get_library_details(section_key=9518)
assert res.object is not None
# Handle response
print(res.object)
- target: $["paths"]["/library/sections/{sectionKey}/country"]["get"]
update:
x-codeSamples:
- lang: python
label: library
source: |-
from plex_api_client import PlexAPI
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_countries_library(section_key=9518)
assert res.object is not None
# Handle response
print(res.object)
- target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"]
update:
x-codeSamples:
- lang: python
label: library
source: |-
from plex_api_client import PlexAPI
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_genres_library(section_key=9518)
assert res.object is not None
@@ -811,12 +836,8 @@ actions:
res = plex_api.library.get_library_items(request={
"tag": operations.Tag.EDITION,
"include_guids": operations.IncludeGuids.ENABLE,
"type": operations.GetLibraryItemsQueryParamType.TV_SHOW,
"section_key": 9518,
"include_meta": operations.GetLibraryItemsQueryParamIncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None
@@ -954,7 +975,6 @@ actions:
with PlexAPI() as plex_api:
res = plex_api.plex.get_pin(request={
"strong": False,
"client_id": "3381b62b-9ab7-4e37-827b-203e9809eb58",
"client_name": "Plex for Roku",
"device_nickname": "Roku 3",
@@ -1166,13 +1186,12 @@ actions:
label: resources
source: |-
from plex_api_client import PlexAPI
from plex_api_client.models import operations
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.plex.get_server_resources(client_id="3381b62b-9ab7-4e37-827b-203e9809eb58", include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE)
res = plex_api.plex.get_server_resources(client_id="3381b62b-9ab7-4e37-827b-203e9809eb58")
assert res.plex_devices is not None
@@ -1470,7 +1489,6 @@ actions:
"request_body": {
"login": "username@email.com",
"password": "password123",
"remember_me": False,
"verification_code": "123456",
},
})

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `errors` | List[[errors.GetCountriesLibraryErrors](../../models/errors/getcountrieslibraryerrors.md)] | :heavy_minus_sign: | N/A |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `errors` | List[[errors.GetCountriesLibraryLibraryErrors](../../models/errors/getcountrieslibrarylibraryerrors.md)] | :heavy_minus_sign: | N/A |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `errors` | List[[errors.GetGenresLibraryErrors](../../models/errors/getgenreslibraryerrors.md)] | :heavy_minus_sign: | N/A |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *Optional[int]* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *Optional[int]* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `errors` | List[[errors.GetGenresLibraryLibraryErrors](../../models/errors/getgenreslibrarylibraryerrors.md)] | :heavy_minus_sign: | N/A |
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -1,4 +1,4 @@
# Field
# FieldT
## Fields

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `fast_key` | *str* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 |
| `key` | *str* | :heavy_check_mark: | N/A | 15491 |
| `title` | *str* | :heavy_check_mark: | N/A | Japan |

View File

@@ -0,0 +1,22 @@
# GetCountriesLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `size` | *float* | :heavy_check_mark: | N/A | 50 |
| `identifier` | *str* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `allow_sync` | *bool* | :heavy_check_mark: | N/A | false |
| `art` | *str* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `content` | *str* | :heavy_check_mark: | N/A | secondary |
| `media_tag_prefix` | *str* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `media_tag_version` | *int* | :heavy_check_mark: | N/A | 1734362201 |
| `nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `thumb` | *str* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `title1` | *str* | :heavy_check_mark: | N/A | TV Series |
| `title2` | *str* | :heavy_check_mark: | N/A | By Country |
| `view_group` | *str* | :heavy_check_mark: | N/A | secondary |
| `offset` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `total_size` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `directory` | List[[operations.GetCountriesLibraryDirectory](../../models/operations/getcountrieslibrarydirectory.md)] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetCountriesLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryResponse
## 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` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [Optional[operations.GetCountriesLibraryResponseBody]](../../models/operations/getcountrieslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `media_container` | [Optional[operations.GetCountriesLibraryMediaContainer]](../../models/operations/getcountrieslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `fast_key` | *str* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 |
| `key` | *str* | :heavy_check_mark: | N/A | 89 |
| `title` | *str* | :heavy_check_mark: | N/A | Action |
| `type` | *str* | :heavy_check_mark: | N/A | genre |

View File

@@ -0,0 +1,22 @@
# GetGenresLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `size` | *float* | :heavy_check_mark: | N/A | 50 |
| `identifier` | *str* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `allow_sync` | *bool* | :heavy_check_mark: | N/A | false |
| `art` | *str* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `content` | *str* | :heavy_check_mark: | N/A | secondary |
| `media_tag_prefix` | *str* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `media_tag_version` | *int* | :heavy_check_mark: | N/A | 1734362201 |
| `nocache` | *bool* | :heavy_check_mark: | N/A | true |
| `thumb` | *str* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `title1` | *str* | :heavy_check_mark: | N/A | TV Shows (Reality) |
| `title2` | *str* | :heavy_check_mark: | N/A | By Genre |
| `view_group` | *str* | :heavy_check_mark: | N/A | secondary |
| `offset` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `total_size` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `directory` | List[[operations.GetGenresLibraryDirectory](../../models/operations/getgenreslibrarydirectory.md)] | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetGenresLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryResponse
## 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` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [Optional[operations.GetGenresLibraryResponseBody]](../../models/operations/getgenreslibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `media_container` | [Optional[operations.GetGenresLibraryMediaContainer]](../../models/operations/getgenreslibrarymediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -11,4 +11,4 @@
| `active` | *bool* | :heavy_check_mark: | N/A | false |
| `filter_` | List[[operations.GetRecentlyAddedLibraryFilter](../../models/operations/getrecentlyaddedlibraryfilter.md)] | :heavy_minus_sign: | N/A | |
| `sort` | List[[operations.Sort](../../models/operations/sort.md)] | :heavy_minus_sign: | N/A | |
| `field` | List[[operations.Field](../../models/operations/field.md)] | :heavy_minus_sign: | N/A | |
| `field` | List[[operations.FieldT](../../models/operations/fieldt.md)] | :heavy_minus_sign: | N/A | |

View File

@@ -9,6 +9,6 @@
| `offset` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `total_size` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `identifier` | *Optional[str]* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `allow_sync` | *Optional[bool]* | :heavy_minus_sign: | N/A | false |
| `meta` | [Optional[operations.Meta]](../../models/operations/meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |
| `metadata` | List[[operations.GetRecentlyAddedMetadata](../../models/operations/getrecentlyaddedmetadata.md)] | :heavy_minus_sign: | N/A | |

View File

@@ -161,7 +161,6 @@ with PlexAPI() as plex_api:
"request_body": {
"login": "username@email.com",
"password": "password123",
"remember_me": False,
"verification_code": "123456",
},
})

View File

@@ -73,9 +73,6 @@ with PlexAPI(
"content_directory_id": 470161,
"type": operations.Type.TV_SHOW,
"section_id": 2,
"include_meta": operations.IncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None

View File

@@ -16,6 +16,8 @@ API Calls interacting with Plex Media Server Libraries
* [get_library_items](#get_library_items) - Get Library Items
* [get_refresh_library_metadata](#get_refresh_library_metadata) - Refresh Metadata Of The Library
* [get_search_library](#get_search_library) - Search Library
* [get_genres_library](#get_genres_library) - Get Genres of library media
* [get_countries_library](#get_countries_library) - Get Countries of library media
* [get_search_all_libraries](#get_search_all_libraries) - Search All Libraries
* [get_meta_data_by_rating_key](#get_meta_data_by_rating_key) - Get Metadata by RatingKey
* [get_metadata_children](#get_metadata_children) - Get Items Children
@@ -97,9 +99,6 @@ with PlexAPI(
17,
],
"section_id": 2,
"include_meta": operations.QueryParamIncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None
@@ -221,13 +220,12 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
```python
from plex_api_client import PlexAPI
from plex_api_client.models import operations
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_library_details(section_key=9518, include_details=operations.IncludeDetails.ZERO)
res = plex_api.library.get_library_details(section_key=9518)
assert res.object is not None
@@ -335,11 +333,7 @@ with PlexAPI(
res = plex_api.library.get_library_items(request={
"tag": operations.Tag.EDITION,
"section_key": 9518,
"include_guids": operations.IncludeGuids.ENABLE,
"type": operations.GetLibraryItemsQueryParamType.TV_SHOW,
"include_meta": operations.GetLibraryItemsQueryParamIncludeMeta.ENABLE,
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None
@@ -473,6 +467,90 @@ with PlexAPI(
| errors.GetSearchLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## get_genres_library
Retrieves a list of all the genres that are found for the media in this library.
### Example Usage
```python
from plex_api_client import PlexAPI
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_genres_library(section_key=9518)
assert res.object is not None
# Handle response
print(res.object)
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
**[operations.GetGenresLibraryResponse](../../models/operations/getgenreslibraryresponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.GetGenresLibraryBadRequest | 400 | application/json |
| errors.GetGenresLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## get_countries_library
Retrieves a list of all the countries that are found for the media in this library.
### Example Usage
```python
from plex_api_client import PlexAPI
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.library.get_countries_library(section_key=9518)
assert res.object is not None
# Handle response
print(res.object)
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `section_key` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
**[operations.GetCountriesLibraryResponse](../../models/operations/getcountrieslibraryresponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| errors.GetCountriesLibraryBadRequest | 400 | application/json |
| errors.GetCountriesLibraryUnauthorized | 401 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
## get_search_all_libraries
Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
@@ -494,8 +572,6 @@ with PlexAPI(
"search_types": [
operations.SearchTypes.PEOPLE,
],
"include_collections": operations.QueryParamIncludeCollections.ENABLE,
"include_external_media": operations.QueryParamIncludeExternalMedia.ENABLE,
})
assert res.object is not None

View File

@@ -185,13 +185,12 @@ Get Plex server access tokens and server connections
```python
from plex_api_client import PlexAPI
from plex_api_client.models import operations
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.plex.get_server_resources(client_id="3381b62b-9ab7-4e37-827b-203e9809eb58", include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE)
res = plex_api.plex.get_server_resources(client_id="3381b62b-9ab7-4e37-827b-203e9809eb58")
assert res.plex_devices is not None
@@ -236,7 +235,6 @@ with PlexAPI() as plex_api:
res = plex_api.plex.get_pin(request={
"client_id": "3381b62b-9ab7-4e37-827b-203e9809eb58",
"strong": False,
"client_name": "Plex for Roku",
"device_nickname": "Roku 3",
"client_version": "2.4.1",

View File

@@ -37,7 +37,7 @@ with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.search.perform_search(query="dylan", limit=5)
res = plex_api.search.perform_search(query="dylan")
assert res is not None
@@ -84,7 +84,7 @@ with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
) as plex_api:
res = plex_api.search.perform_voice_search(query="dead+poop", limit=5)
res = plex_api.search.perform_voice_search(query="dead+poop")
assert res is not None

View File

@@ -27,8 +27,6 @@ with PlexAPI(
res = plex_api.watchlist.get_watch_list(request={
"filter_": operations.Filter.AVAILABLE,
"x_plex_token": "CV5xoxjTpFKUzBTShsaf",
"x_plex_container_start": 0,
"x_plex_container_size": 50,
})
assert res.object is not None

14
poetry.lock generated
View File

@@ -208,18 +208,6 @@ files = [
[package.extras]
colors = ["colorama (>=0.4.6)"]
[[package]]
name = "jsonpath-python"
version = "1.0.6"
description = "A more powerful JSONPath implementation in modern python"
optional = false
python-versions = ">=3.6"
groups = ["main"]
files = [
{file = "jsonpath-python-1.0.6.tar.gz", hash = "sha256:dd5be4a72d8a2995c3f583cf82bf3cd1a9544cfdabf2d22595b67aff07349666"},
{file = "jsonpath_python-1.0.6-py3-none-any.whl", hash = "sha256:1e3b78df579f5efc23565293612decee04214609208a2335884b3ee3f786b575"},
]
[[package]]
name = "mccabe"
version = "0.7.0"
@@ -593,4 +581,4 @@ typing-extensions = ">=3.7.4"
[metadata]
lock-version = "2.1"
python-versions = ">=3.9"
content-hash = "17ee8ce85dd5ac9f352e21dba9eb0fd4cf2c084fd797ca222e426ba7d39002ef"
content-hash = "1f0dcb22a1bf4d933c50fbaab2e7f694592f680adf1171c2dc13507e4259a9c0"

View File

@@ -1,6 +1,6 @@
[project]
name = "plex-api-client"
version = "0.21.1"
version = "0.21.2"
description = "Python Client SDK Generated by Speakeasy"
authors = [{ name = "Speakeasy" },]
readme = "README-PYPI.md"
@@ -8,7 +8,6 @@ requires-python = ">=3.9"
dependencies = [
"eval-type-backport >=0.2.0",
"httpx >=0.28.1",
"jsonpath-python >=1.0.6",
"pydantic >=2.10.3",
"python-dateutil >=2.8.2",
"typing-inspect >=0.9.0",
@@ -37,6 +36,7 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
pythonpath = ["src"]
[tool.mypy]

View File

@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "plex-api-client"
__version__: str = "0.21.1"
__version__: str = "0.21.2"
__openapi_doc_version__: str = "0.0.3"
__gen_version__: str = "2.495.1"
__user_agent__: str = "speakeasy-sdk/python 0.21.1 2.495.1 0.0.3 plex-api-client"
__gen_version__: str = "2.503.2"
__user_agent__: str = "speakeasy-sdk/python 0.21.2 2.503.2 0.0.3 plex-api-client"
try:
if __package__ is not None:

View File

@@ -78,7 +78,7 @@ class Activities(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerActivitiesResponse(
object=utils.unmarshal_json(
@@ -89,17 +89,17 @@ class Activities(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerActivitiesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerActivitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerActivitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerActivitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerActivitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerActivitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -179,7 +179,7 @@ class Activities(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerActivitiesResponse(
object=utils.unmarshal_json(
@@ -190,17 +190,17 @@ class Activities(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerActivitiesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerActivitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerActivitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerActivitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerActivitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerActivitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -287,7 +287,7 @@ class Activities(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.CancelServerActivitiesResponse(
status_code=http_res.status_code,
@@ -295,17 +295,17 @@ class Activities(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CancelServerActivitiesBadRequestData
)
data.raw_response = http_res
raise errors.CancelServerActivitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CancelServerActivitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CancelServerActivitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.CancelServerActivitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CancelServerActivitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -392,7 +392,7 @@ class Activities(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.CancelServerActivitiesResponse(
status_code=http_res.status_code,
@@ -400,17 +400,17 @@ class Activities(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CancelServerActivitiesBadRequestData
)
data.raw_response = http_res
raise errors.CancelServerActivitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CancelServerActivitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CancelServerActivitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.CancelServerActivitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CancelServerActivitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -81,7 +81,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetTransientTokenResponse(
status_code=http_res.status_code,
@@ -89,17 +89,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTransientTokenBadRequestData
)
data.raw_response = http_res
raise errors.GetTransientTokenBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTransientTokenBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTransientTokenUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTransientTokenUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTransientTokenUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -190,7 +190,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetTransientTokenResponse(
status_code=http_res.status_code,
@@ -198,17 +198,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTransientTokenBadRequestData
)
data.raw_response = http_res
raise errors.GetTransientTokenBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTransientTokenBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTransientTokenUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTransientTokenUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTransientTokenUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -297,7 +297,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetSourceConnectionInformationResponse(
status_code=http_res.status_code,
@@ -305,17 +305,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSourceConnectionInformationBadRequestData
)
data.raw_response = http_res
raise errors.GetSourceConnectionInformationBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSourceConnectionInformationBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSourceConnectionInformationUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSourceConnectionInformationUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSourceConnectionInformationUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -404,7 +404,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetSourceConnectionInformationResponse(
status_code=http_res.status_code,
@@ -412,17 +412,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSourceConnectionInformationBadRequestData
)
data.raw_response = http_res
raise errors.GetSourceConnectionInformationBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSourceConnectionInformationBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSourceConnectionInformationUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSourceConnectionInformationUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSourceConnectionInformationUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -504,7 +504,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTokenDetailsResponse(
user_plex_account=utils.unmarshal_json(
@@ -515,17 +515,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenDetailsBadRequestData
)
data.raw_response = http_res
raise errors.GetTokenDetailsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTokenDetailsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenDetailsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTokenDetailsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTokenDetailsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -607,7 +607,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTokenDetailsResponse(
user_plex_account=utils.unmarshal_json(
@@ -618,17 +618,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenDetailsBadRequestData
)
data.raw_response = http_res
raise errors.GetTokenDetailsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTokenDetailsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenDetailsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTokenDetailsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTokenDetailsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -726,7 +726,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
return operations.PostUsersSignInDataResponse(
user_plex_account=utils.unmarshal_json(
@@ -738,17 +738,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PostUsersSignInDataBadRequestData
)
data.raw_response = http_res
raise errors.PostUsersSignInDataBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PostUsersSignInDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PostUsersSignInDataUnauthorizedData
)
data.raw_response = http_res
raise errors.PostUsersSignInDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PostUsersSignInDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -846,7 +846,7 @@ class Authentication(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
return operations.PostUsersSignInDataResponse(
user_plex_account=utils.unmarshal_json(
@@ -858,17 +858,17 @@ class Authentication(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PostUsersSignInDataBadRequestData
)
data.raw_response = http_res
raise errors.PostUsersSignInDataBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PostUsersSignInDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PostUsersSignInDataUnauthorizedData
)
data.raw_response = http_res
raise errors.PostUsersSignInDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PostUsersSignInDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -70,7 +70,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetButlerTasksResponse(
object=utils.unmarshal_json(
@@ -81,17 +81,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetButlerTasksBadRequestData
)
data.raw_response = http_res
raise errors.GetButlerTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetButlerTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetButlerTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.GetButlerTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetButlerTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -171,7 +171,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetButlerTasksResponse(
object=utils.unmarshal_json(
@@ -182,17 +182,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetButlerTasksBadRequestData
)
data.raw_response = http_res
raise errors.GetButlerTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetButlerTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetButlerTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.GetButlerTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetButlerTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -277,7 +277,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StartAllTasksResponse(
status_code=http_res.status_code,
@@ -285,17 +285,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartAllTasksBadRequestData
)
data.raw_response = http_res
raise errors.StartAllTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StartAllTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartAllTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.StartAllTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StartAllTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -380,7 +380,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StartAllTasksResponse(
status_code=http_res.status_code,
@@ -388,17 +388,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartAllTasksBadRequestData
)
data.raw_response = http_res
raise errors.StartAllTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StartAllTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartAllTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.StartAllTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StartAllTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -479,7 +479,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StopAllTasksResponse(
status_code=http_res.status_code,
@@ -487,17 +487,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopAllTasksBadRequestData
)
data.raw_response = http_res
raise errors.StopAllTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StopAllTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopAllTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.StopAllTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StopAllTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -578,7 +578,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StopAllTasksResponse(
status_code=http_res.status_code,
@@ -586,17 +586,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopAllTasksBadRequestData
)
data.raw_response = http_res
raise errors.StopAllTasksBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StopAllTasksBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopAllTasksUnauthorizedData
)
data.raw_response = http_res
raise errors.StopAllTasksUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StopAllTasksUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -688,7 +688,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, ["200", "202"], "*"):
return operations.StartTaskResponse(
status_code=http_res.status_code,
@@ -696,13 +696,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StartTaskBadRequestData)
data.raw_response = http_res
raise errors.StartTaskBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StartTaskBadRequestData
)
response_data.raw_response = http_res
raise errors.StartTaskBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StartTaskUnauthorizedData)
data.raw_response = http_res
raise errors.StartTaskUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StartTaskUnauthorizedData
)
response_data.raw_response = http_res
raise errors.StartTaskUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -794,7 +798,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, ["200", "202"], "*"):
return operations.StartTaskResponse(
status_code=http_res.status_code,
@@ -802,13 +806,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StartTaskBadRequestData)
data.raw_response = http_res
raise errors.StartTaskBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StartTaskBadRequestData
)
response_data.raw_response = http_res
raise errors.StartTaskBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StartTaskUnauthorizedData)
data.raw_response = http_res
raise errors.StartTaskUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StartTaskUnauthorizedData
)
response_data.raw_response = http_res
raise errors.StartTaskUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -896,7 +904,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StopTaskResponse(
status_code=http_res.status_code,
@@ -904,13 +912,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StopTaskBadRequestData)
data.raw_response = http_res
raise errors.StopTaskBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StopTaskBadRequestData
)
response_data.raw_response = http_res
raise errors.StopTaskBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StopTaskUnauthorizedData)
data.raw_response = http_res
raise errors.StopTaskUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StopTaskUnauthorizedData
)
response_data.raw_response = http_res
raise errors.StopTaskUnauthorized(data=response_data)
if utils.match_response(http_res, ["404", "4XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -998,7 +1010,7 @@ class Butler(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StopTaskResponse(
status_code=http_res.status_code,
@@ -1006,13 +1018,17 @@ class Butler(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StopTaskBadRequestData)
data.raw_response = http_res
raise errors.StopTaskBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StopTaskBadRequestData
)
response_data.raw_response = http_res
raise errors.StopTaskBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.StopTaskUnauthorizedData)
data.raw_response = http_res
raise errors.StopTaskUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.StopTaskUnauthorizedData
)
response_data.raw_response = http_res
raise errors.StopTaskUnauthorized(data=response_data)
if utils.match_response(http_res, ["404", "4XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -80,7 +80,7 @@ class Hubs(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetGlobalHubsResponse(
object=utils.unmarshal_json(
@@ -91,17 +91,17 @@ class Hubs(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGlobalHubsBadRequestData
)
data.raw_response = http_res
raise errors.GetGlobalHubsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetGlobalHubsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGlobalHubsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetGlobalHubsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetGlobalHubsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -191,7 +191,7 @@ class Hubs(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetGlobalHubsResponse(
object=utils.unmarshal_json(
@@ -202,17 +202,17 @@ class Hubs(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGlobalHubsBadRequestData
)
data.raw_response = http_res
raise errors.GetGlobalHubsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetGlobalHubsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGlobalHubsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetGlobalHubsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetGlobalHubsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -504,7 +504,7 @@ class Hubs(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetLibraryHubsResponse(
object=utils.unmarshal_json(
@@ -515,17 +515,17 @@ class Hubs(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetLibraryHubsBadRequestData
)
data.raw_response = http_res
raise errors.GetLibraryHubsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetLibraryHubsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetLibraryHubsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetLibraryHubsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetLibraryHubsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -619,7 +619,7 @@ class Hubs(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetLibraryHubsResponse(
object=utils.unmarshal_json(
@@ -630,17 +630,17 @@ class Hubs(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetLibraryHubsBadRequestData
)
data.raw_response = http_res
raise errors.GetLibraryHubsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetLibraryHubsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetLibraryHubsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetLibraryHubsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetLibraryHubsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

File diff suppressed because it is too large Load Diff

View File

@@ -84,7 +84,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.LogLineResponse(
status_code=http_res.status_code,
@@ -92,13 +92,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.LogLineBadRequestData)
data.raw_response = http_res
raise errors.LogLineBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.LogLineBadRequestData
)
response_data.raw_response = http_res
raise errors.LogLineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.LogLineUnauthorizedData)
data.raw_response = http_res
raise errors.LogLineUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.LogLineUnauthorizedData
)
response_data.raw_response = http_res
raise errors.LogLineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -192,7 +196,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.LogLineResponse(
status_code=http_res.status_code,
@@ -200,13 +204,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.LogLineBadRequestData)
data.raw_response = http_res
raise errors.LogLineBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.LogLineBadRequestData
)
response_data.raw_response = http_res
raise errors.LogLineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.LogLineUnauthorizedData)
data.raw_response = http_res
raise errors.LogLineUnauthorized(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.LogLineUnauthorizedData
)
response_data.raw_response = http_res
raise errors.LogLineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -313,7 +321,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.LogMultiLineResponse(
status_code=http_res.status_code,
@@ -321,17 +329,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.LogMultiLineBadRequestData
)
data.raw_response = http_res
raise errors.LogMultiLineBadRequest(data=data)
response_data.raw_response = http_res
raise errors.LogMultiLineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.LogMultiLineUnauthorizedData
)
data.raw_response = http_res
raise errors.LogMultiLineUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.LogMultiLineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -438,7 +446,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.LogMultiLineResponse(
status_code=http_res.status_code,
@@ -446,17 +454,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.LogMultiLineBadRequestData
)
data.raw_response = http_res
raise errors.LogMultiLineBadRequest(data=data)
response_data.raw_response = http_res
raise errors.LogMultiLineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.LogMultiLineUnauthorizedData
)
data.raw_response = http_res
raise errors.LogMultiLineUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.LogMultiLineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -537,7 +545,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.EnablePaperTrailResponse(
status_code=http_res.status_code,
@@ -545,17 +553,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.EnablePaperTrailBadRequestData
)
data.raw_response = http_res
raise errors.EnablePaperTrailBadRequest(data=data)
response_data.raw_response = http_res
raise errors.EnablePaperTrailBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.EnablePaperTrailUnauthorizedData
)
data.raw_response = http_res
raise errors.EnablePaperTrailUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.EnablePaperTrailUnauthorized(data=response_data)
if utils.match_response(http_res, ["403", "4XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -636,7 +644,7 @@ class Log(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.EnablePaperTrailResponse(
status_code=http_res.status_code,
@@ -644,17 +652,17 @@ class Log(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.EnablePaperTrailBadRequestData
)
data.raw_response = http_res
raise errors.EnablePaperTrailBadRequest(data=data)
response_data.raw_response = http_res
raise errors.EnablePaperTrailBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.EnablePaperTrailUnauthorizedData
)
data.raw_response = http_res
raise errors.EnablePaperTrailUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.EnablePaperTrailUnauthorized(data=response_data)
if utils.match_response(http_res, ["403", "4XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -77,7 +77,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.MarkPlayedResponse(
status_code=http_res.status_code,
@@ -85,15 +85,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.MarkPlayedBadRequestData)
data.raw_response = http_res
raise errors.MarkPlayedBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.MarkPlayedBadRequestData
)
response_data.raw_response = http_res
raise errors.MarkPlayedBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkPlayedUnauthorizedData
)
data.raw_response = http_res
raise errors.MarkPlayedUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.MarkPlayedUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -180,7 +182,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.MarkPlayedResponse(
status_code=http_res.status_code,
@@ -188,15 +190,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.MarkPlayedBadRequestData)
data.raw_response = http_res
raise errors.MarkPlayedBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.MarkPlayedBadRequestData
)
response_data.raw_response = http_res
raise errors.MarkPlayedBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkPlayedUnauthorizedData
)
data.raw_response = http_res
raise errors.MarkPlayedUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.MarkPlayedUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -283,7 +287,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.MarkUnplayedResponse(
status_code=http_res.status_code,
@@ -291,17 +295,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkUnplayedBadRequestData
)
data.raw_response = http_res
raise errors.MarkUnplayedBadRequest(data=data)
response_data.raw_response = http_res
raise errors.MarkUnplayedBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkUnplayedUnauthorizedData
)
data.raw_response = http_res
raise errors.MarkUnplayedUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.MarkUnplayedUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -388,7 +392,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.MarkUnplayedResponse(
status_code=http_res.status_code,
@@ -396,17 +400,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkUnplayedBadRequestData
)
data.raw_response = http_res
raise errors.MarkUnplayedBadRequest(data=data)
response_data.raw_response = http_res
raise errors.MarkUnplayedBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.MarkUnplayedUnauthorizedData
)
data.raw_response = http_res
raise errors.MarkUnplayedUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.MarkUnplayedUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -500,7 +504,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UpdatePlayProgressResponse(
status_code=http_res.status_code,
@@ -508,17 +512,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlayProgressBadRequestData
)
data.raw_response = http_res
raise errors.UpdatePlayProgressBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlayProgressBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlayProgressUnauthorizedData
)
data.raw_response = http_res
raise errors.UpdatePlayProgressUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlayProgressUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -612,7 +616,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UpdatePlayProgressResponse(
status_code=http_res.status_code,
@@ -620,17 +624,17 @@ class Media(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlayProgressBadRequestData
)
data.raw_response = http_res
raise errors.UpdatePlayProgressBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlayProgressBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlayProgressUnauthorizedData
)
data.raw_response = http_res
raise errors.UpdatePlayProgressUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlayProgressUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -720,7 +724,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "image/jpeg"):
return operations.GetBannerImageResponse(
response_stream=http_res,
@@ -731,18 +735,18 @@ class Media(BaseSDK):
)
if utils.match_response(http_res, "400", "application/json"):
http_res_text = utils.stream_to_text(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetBannerImageBadRequestData
)
data.raw_response = http_res
raise errors.GetBannerImageBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetBannerImageBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
http_res_text = utils.stream_to_text(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetBannerImageUnauthorizedData
)
data.raw_response = http_res
raise errors.GetBannerImageUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetBannerImageUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -832,7 +836,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "image/jpeg"):
return operations.GetBannerImageResponse(
response_stream=http_res,
@@ -843,18 +847,18 @@ class Media(BaseSDK):
)
if utils.match_response(http_res, "400", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetBannerImageBadRequestData
)
data.raw_response = http_res
raise errors.GetBannerImageBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetBannerImageBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetBannerImageUnauthorizedData
)
data.raw_response = http_res
raise errors.GetBannerImageUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetBannerImageUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -944,7 +948,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "image/jpeg"):
return operations.GetThumbImageResponse(
response_stream=http_res,
@@ -955,18 +959,18 @@ class Media(BaseSDK):
)
if utils.match_response(http_res, "400", "application/json"):
http_res_text = utils.stream_to_text(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetThumbImageBadRequestData
)
data.raw_response = http_res
raise errors.GetThumbImageBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetThumbImageBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
http_res_text = utils.stream_to_text(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetThumbImageUnauthorizedData
)
data.raw_response = http_res
raise errors.GetThumbImageUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetThumbImageUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1056,7 +1060,7 @@ class Media(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "image/jpeg"):
return operations.GetThumbImageResponse(
response_stream=http_res,
@@ -1067,18 +1071,18 @@ class Media(BaseSDK):
)
if utils.match_response(http_res, "400", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetThumbImageBadRequestData
)
data.raw_response = http_res
raise errors.GetThumbImageBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetThumbImageBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res_text, errors.GetThumbImageUnauthorizedData
)
data.raw_response = http_res
raise errors.GetThumbImageUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetThumbImageUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -110,6 +110,26 @@ from .get_banner_image import (
GetBannerImageUnauthorized,
GetBannerImageUnauthorizedData,
)
from .get_countries_library import (
GetCountriesLibraryBadRequest,
GetCountriesLibraryBadRequestData,
GetCountriesLibraryErrors,
GetCountriesLibraryErrorsTypedDict,
GetCountriesLibraryLibraryErrors,
GetCountriesLibraryLibraryErrorsTypedDict,
GetCountriesLibraryUnauthorized,
GetCountriesLibraryUnauthorizedData,
)
from .get_genres_library import (
GetGenresLibraryBadRequest,
GetGenresLibraryBadRequestData,
GetGenresLibraryErrors,
GetGenresLibraryErrorsTypedDict,
GetGenresLibraryLibraryErrors,
GetGenresLibraryLibraryErrorsTypedDict,
GetGenresLibraryUnauthorized,
GetGenresLibraryUnauthorizedData,
)
from .get_library_details import (
GetLibraryDetailsBadRequest,
GetLibraryDetailsBadRequestData,
@@ -866,6 +886,14 @@ __all__ = [
"GetCompanionsDataPlexErrorsTypedDict",
"GetCompanionsDataUnauthorized",
"GetCompanionsDataUnauthorizedData",
"GetCountriesLibraryBadRequest",
"GetCountriesLibraryBadRequestData",
"GetCountriesLibraryErrors",
"GetCountriesLibraryErrorsTypedDict",
"GetCountriesLibraryLibraryErrors",
"GetCountriesLibraryLibraryErrorsTypedDict",
"GetCountriesLibraryUnauthorized",
"GetCountriesLibraryUnauthorizedData",
"GetDevicesBadRequest",
"GetDevicesBadRequestData",
"GetDevicesErrors",
@@ -882,6 +910,14 @@ __all__ = [
"GetFileHashLibraryErrorsTypedDict",
"GetFileHashUnauthorized",
"GetFileHashUnauthorizedData",
"GetGenresLibraryBadRequest",
"GetGenresLibraryBadRequestData",
"GetGenresLibraryErrors",
"GetGenresLibraryErrorsTypedDict",
"GetGenresLibraryLibraryErrors",
"GetGenresLibraryLibraryErrorsTypedDict",
"GetGenresLibraryUnauthorized",
"GetGenresLibraryUnauthorizedData",
"GetGeoDataBadRequest",
"GetGeoDataBadRequestData",
"GetGeoDataErrors",

View File

@@ -0,0 +1,79 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
from plex_api_client import utils
from plex_api_client.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetCountriesLibraryLibraryErrorsTypedDict(TypedDict):
code: NotRequired[int]
message: NotRequired[str]
status: NotRequired[int]
class GetCountriesLibraryLibraryErrors(BaseModel):
code: Optional[int] = None
message: Optional[str] = None
status: Optional[int] = None
class GetCountriesLibraryUnauthorizedData(BaseModel):
errors: Optional[List[GetCountriesLibraryLibraryErrors]] = None
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
None
)
r"""Raw HTTP response; suitable for custom response parsing"""
class GetCountriesLibraryUnauthorized(Exception):
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
data: GetCountriesLibraryUnauthorizedData
def __init__(self, data: GetCountriesLibraryUnauthorizedData):
self.data = data
def __str__(self) -> str:
return utils.marshal_json(self.data, GetCountriesLibraryUnauthorizedData)
class GetCountriesLibraryErrorsTypedDict(TypedDict):
code: NotRequired[int]
message: NotRequired[str]
status: NotRequired[int]
class GetCountriesLibraryErrors(BaseModel):
code: Optional[int] = None
message: Optional[str] = None
status: Optional[int] = None
class GetCountriesLibraryBadRequestData(BaseModel):
errors: Optional[List[GetCountriesLibraryErrors]] = None
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
None
)
r"""Raw HTTP response; suitable for custom response parsing"""
class GetCountriesLibraryBadRequest(Exception):
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
data: GetCountriesLibraryBadRequestData
def __init__(self, data: GetCountriesLibraryBadRequestData):
self.data = data
def __str__(self) -> str:
return utils.marshal_json(self.data, GetCountriesLibraryBadRequestData)

View File

@@ -0,0 +1,79 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
from plex_api_client import utils
from plex_api_client.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetGenresLibraryLibraryErrorsTypedDict(TypedDict):
code: NotRequired[int]
message: NotRequired[str]
status: NotRequired[int]
class GetGenresLibraryLibraryErrors(BaseModel):
code: Optional[int] = None
message: Optional[str] = None
status: Optional[int] = None
class GetGenresLibraryUnauthorizedData(BaseModel):
errors: Optional[List[GetGenresLibraryLibraryErrors]] = None
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
None
)
r"""Raw HTTP response; suitable for custom response parsing"""
class GetGenresLibraryUnauthorized(Exception):
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
data: GetGenresLibraryUnauthorizedData
def __init__(self, data: GetGenresLibraryUnauthorizedData):
self.data = data
def __str__(self) -> str:
return utils.marshal_json(self.data, GetGenresLibraryUnauthorizedData)
class GetGenresLibraryErrorsTypedDict(TypedDict):
code: NotRequired[int]
message: NotRequired[str]
status: NotRequired[int]
class GetGenresLibraryErrors(BaseModel):
code: Optional[int] = None
message: Optional[str] = None
status: Optional[int] = None
class GetGenresLibraryBadRequestData(BaseModel):
errors: Optional[List[GetGenresLibraryErrors]] = None
raw_response: Annotated[Optional[httpx.Response], pydantic.Field(exclude=True)] = (
None
)
r"""Raw HTTP response; suitable for custom response parsing"""
class GetGenresLibraryBadRequest(Exception):
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
data: GetGenresLibraryBadRequestData
def __init__(self, data: GetGenresLibraryBadRequestData):
self.data = data
def __str__(self) -> str:
return utils.marshal_json(self.data, GetGenresLibraryBadRequestData)

View File

@@ -87,6 +87,30 @@ from .get_banner_image import (
GetBannerImageResponse,
GetBannerImageResponseTypedDict,
)
from .get_countries_library import (
GetCountriesLibraryDirectory,
GetCountriesLibraryDirectoryTypedDict,
GetCountriesLibraryMediaContainer,
GetCountriesLibraryMediaContainerTypedDict,
GetCountriesLibraryRequest,
GetCountriesLibraryRequestTypedDict,
GetCountriesLibraryResponse,
GetCountriesLibraryResponseBody,
GetCountriesLibraryResponseBodyTypedDict,
GetCountriesLibraryResponseTypedDict,
)
from .get_genres_library import (
GetGenresLibraryDirectory,
GetGenresLibraryDirectoryTypedDict,
GetGenresLibraryMediaContainer,
GetGenresLibraryMediaContainerTypedDict,
GetGenresLibraryRequest,
GetGenresLibraryRequestTypedDict,
GetGenresLibraryResponse,
GetGenresLibraryResponseBody,
GetGenresLibraryResponseBodyTypedDict,
GetGenresLibraryResponseTypedDict,
)
from .get_library_details import (
GetLibraryDetailsDirectory,
GetLibraryDetailsDirectoryTypedDict,
@@ -317,10 +341,10 @@ from .get_recently_added import (
from .get_recently_added_library import (
ActiveDirection,
DefaultDirection,
Field,
FieldT,
FieldTTypedDict,
FieldType,
FieldTypeTypedDict,
FieldTypedDict,
GetRecentlyAddedLibraryCountry,
GetRecentlyAddedLibraryCountryTypedDict,
GetRecentlyAddedLibraryDirector,
@@ -1150,10 +1174,10 @@ __all__ = [
"EpisodeSort",
"Feature",
"FeatureTypedDict",
"Field",
"FieldT",
"FieldTTypedDict",
"FieldType",
"FieldTypeTypedDict",
"FieldTypedDict",
"Filter",
"FlattenSeasons",
"Force",
@@ -1209,6 +1233,16 @@ __all__ = [
"GetButlerTasksResponseTypedDict",
"GetCompanionsDataResponse",
"GetCompanionsDataResponseTypedDict",
"GetCountriesLibraryDirectory",
"GetCountriesLibraryDirectoryTypedDict",
"GetCountriesLibraryMediaContainer",
"GetCountriesLibraryMediaContainerTypedDict",
"GetCountriesLibraryRequest",
"GetCountriesLibraryRequestTypedDict",
"GetCountriesLibraryResponse",
"GetCountriesLibraryResponseBody",
"GetCountriesLibraryResponseBodyTypedDict",
"GetCountriesLibraryResponseTypedDict",
"GetDevicesMediaContainer",
"GetDevicesMediaContainerTypedDict",
"GetDevicesResponse",
@@ -1219,6 +1253,16 @@ __all__ = [
"GetFileHashRequestTypedDict",
"GetFileHashResponse",
"GetFileHashResponseTypedDict",
"GetGenresLibraryDirectory",
"GetGenresLibraryDirectoryTypedDict",
"GetGenresLibraryMediaContainer",
"GetGenresLibraryMediaContainerTypedDict",
"GetGenresLibraryRequest",
"GetGenresLibraryRequestTypedDict",
"GetGenresLibraryResponse",
"GetGenresLibraryResponseBody",
"GetGenresLibraryResponseBodyTypedDict",
"GetGenresLibraryResponseTypedDict",
"GetGeoDataGeoData",
"GetGeoDataGeoDataTypedDict",
"GetGeoDataResponse",

View File

@@ -0,0 +1,135 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
from plex_api_client.types import BaseModel
from plex_api_client.utils import FieldMetadata, PathParamMetadata
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetCountriesLibraryRequestTypedDict(TypedDict):
section_key: int
r"""The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
"""
class GetCountriesLibraryRequest(BaseModel):
section_key: Annotated[
int,
pydantic.Field(alias="sectionKey"),
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
]
r"""The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
"""
class GetCountriesLibraryDirectoryTypedDict(TypedDict):
fast_key: str
key: str
title: str
class GetCountriesLibraryDirectory(BaseModel):
fast_key: Annotated[str, pydantic.Field(alias="fastKey")]
key: str
title: str
class GetCountriesLibraryMediaContainerTypedDict(TypedDict):
size: float
identifier: str
allow_sync: bool
art: str
content: str
media_tag_prefix: str
media_tag_version: int
nocache: bool
thumb: str
title1: str
title2: str
view_group: str
offset: NotRequired[int]
total_size: NotRequired[int]
directory: NotRequired[List[GetCountriesLibraryDirectoryTypedDict]]
class GetCountriesLibraryMediaContainer(BaseModel):
size: float
identifier: str
allow_sync: Annotated[bool, pydantic.Field(alias="allowSync")]
art: str
content: str
media_tag_prefix: Annotated[str, pydantic.Field(alias="mediaTagPrefix")]
media_tag_version: Annotated[int, pydantic.Field(alias="mediaTagVersion")]
nocache: bool
thumb: str
title1: str
title2: str
view_group: Annotated[str, pydantic.Field(alias="viewGroup")]
offset: Optional[int] = None
total_size: Annotated[Optional[int], pydantic.Field(alias="totalSize")] = None
directory: Annotated[
Optional[List[GetCountriesLibraryDirectory]], pydantic.Field(alias="Directory")
] = None
class GetCountriesLibraryResponseBodyTypedDict(TypedDict):
r"""Successful response containing media container data."""
media_container: NotRequired[GetCountriesLibraryMediaContainerTypedDict]
class GetCountriesLibraryResponseBody(BaseModel):
r"""Successful response containing media container data."""
media_container: Annotated[
Optional[GetCountriesLibraryMediaContainer],
pydantic.Field(alias="MediaContainer"),
] = None
class GetCountriesLibraryResponseTypedDict(TypedDict):
content_type: str
r"""HTTP response content type for this operation"""
status_code: int
r"""HTTP response status code for this operation"""
raw_response: httpx.Response
r"""Raw HTTP response; suitable for custom response parsing"""
object: NotRequired[GetCountriesLibraryResponseBodyTypedDict]
r"""Successful response containing media container data."""
class GetCountriesLibraryResponse(BaseModel):
content_type: str
r"""HTTP response content type for this operation"""
status_code: int
r"""HTTP response status code for this operation"""
raw_response: httpx.Response
r"""Raw HTTP response; suitable for custom response parsing"""
object: Optional[GetCountriesLibraryResponseBody] = None
r"""Successful response containing media container data."""

View File

@@ -0,0 +1,137 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
import httpx
from plex_api_client.types import BaseModel
from plex_api_client.utils import FieldMetadata, PathParamMetadata
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetGenresLibraryRequestTypedDict(TypedDict):
section_key: int
r"""The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
"""
class GetGenresLibraryRequest(BaseModel):
section_key: Annotated[
int,
pydantic.Field(alias="sectionKey"),
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
]
r"""The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
"""
class GetGenresLibraryDirectoryTypedDict(TypedDict):
fast_key: str
key: str
title: str
type: str
class GetGenresLibraryDirectory(BaseModel):
fast_key: Annotated[str, pydantic.Field(alias="fastKey")]
key: str
title: str
type: str
class GetGenresLibraryMediaContainerTypedDict(TypedDict):
size: float
identifier: str
allow_sync: bool
art: str
content: str
media_tag_prefix: str
media_tag_version: int
nocache: bool
thumb: str
title1: str
title2: str
view_group: str
offset: NotRequired[int]
total_size: NotRequired[int]
directory: NotRequired[List[GetGenresLibraryDirectoryTypedDict]]
class GetGenresLibraryMediaContainer(BaseModel):
size: float
identifier: str
allow_sync: Annotated[bool, pydantic.Field(alias="allowSync")]
art: str
content: str
media_tag_prefix: Annotated[str, pydantic.Field(alias="mediaTagPrefix")]
media_tag_version: Annotated[int, pydantic.Field(alias="mediaTagVersion")]
nocache: bool
thumb: str
title1: str
title2: str
view_group: Annotated[str, pydantic.Field(alias="viewGroup")]
offset: Optional[int] = None
total_size: Annotated[Optional[int], pydantic.Field(alias="totalSize")] = None
directory: Annotated[
Optional[List[GetGenresLibraryDirectory]], pydantic.Field(alias="Directory")
] = None
class GetGenresLibraryResponseBodyTypedDict(TypedDict):
r"""Successful response containing media container data."""
media_container: NotRequired[GetGenresLibraryMediaContainerTypedDict]
class GetGenresLibraryResponseBody(BaseModel):
r"""Successful response containing media container data."""
media_container: Annotated[
Optional[GetGenresLibraryMediaContainer], pydantic.Field(alias="MediaContainer")
] = None
class GetGenresLibraryResponseTypedDict(TypedDict):
content_type: str
r"""HTTP response content type for this operation"""
status_code: int
r"""HTTP response status code for this operation"""
raw_response: httpx.Response
r"""Raw HTTP response; suitable for custom response parsing"""
object: NotRequired[GetGenresLibraryResponseBodyTypedDict]
r"""Successful response containing media container data."""
class GetGenresLibraryResponse(BaseModel):
content_type: str
r"""HTTP response content type for this operation"""
status_code: int
r"""HTTP response status code for this operation"""
raw_response: httpx.Response
r"""Raw HTTP response; suitable for custom response parsing"""
object: Optional[GetGenresLibraryResponseBody] = None
r"""Successful response containing media container data."""

View File

@@ -215,14 +215,14 @@ class Sort(BaseModel):
] = None
class FieldTypedDict(TypedDict):
class FieldTTypedDict(TypedDict):
key: str
title: str
type: str
sub_type: NotRequired[str]
class Field(BaseModel):
class FieldT(BaseModel):
key: str
title: str
@@ -239,7 +239,7 @@ class GetRecentlyAddedLibraryTypeTypedDict(TypedDict):
active: bool
filter_: NotRequired[List[GetRecentlyAddedLibraryFilterTypedDict]]
sort: NotRequired[List[SortTypedDict]]
field: NotRequired[List[FieldTypedDict]]
field: NotRequired[List[FieldTTypedDict]]
class GetRecentlyAddedLibraryType(BaseModel):
@@ -257,7 +257,7 @@ class GetRecentlyAddedLibraryType(BaseModel):
sort: Annotated[Optional[List[Sort]], pydantic.Field(alias="Sort")] = None
field: Annotated[Optional[List[Field]], pydantic.Field(alias="Field")] = None
field: Annotated[Optional[List[FieldT]], pydantic.Field(alias="Field")] = None
class OperatorTypedDict(TypedDict):

View File

@@ -87,7 +87,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.CreatePlaylistResponse(
object=utils.unmarshal_json(
@@ -98,17 +98,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CreatePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.CreatePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CreatePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CreatePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.CreatePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CreatePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -200,7 +200,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.CreatePlaylistResponse(
object=utils.unmarshal_json(
@@ -211,17 +211,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CreatePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.CreatePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CreatePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CreatePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.CreatePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CreatePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -311,7 +311,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistsResponse(
object=utils.unmarshal_json(
@@ -322,17 +322,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistsBadRequestData
)
data.raw_response = http_res
raise errors.GetPlaylistsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -422,7 +422,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistsResponse(
object=utils.unmarshal_json(
@@ -433,17 +433,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistsBadRequestData
)
data.raw_response = http_res
raise errors.GetPlaylistsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -532,7 +532,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistResponse(
object=utils.unmarshal_json(
@@ -543,15 +543,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetPlaylistBadRequestData)
data.raw_response = http_res
raise errors.GetPlaylistBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistBadRequestData
)
response_data.raw_response = http_res
raise errors.GetPlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -640,7 +642,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistResponse(
object=utils.unmarshal_json(
@@ -651,15 +653,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetPlaylistBadRequestData)
data.raw_response = http_res
raise errors.GetPlaylistBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistBadRequestData
)
response_data.raw_response = http_res
raise errors.GetPlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -747,7 +751,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "204", "*"):
return operations.DeletePlaylistResponse(
status_code=http_res.status_code,
@@ -755,17 +759,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.DeletePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.DeletePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.DeletePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.DeletePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.DeletePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.DeletePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -853,7 +857,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "204", "*"):
return operations.DeletePlaylistResponse(
status_code=http_res.status_code,
@@ -861,17 +865,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.DeletePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.DeletePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.DeletePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.DeletePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.DeletePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.DeletePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -965,7 +969,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UpdatePlaylistResponse(
status_code=http_res.status_code,
@@ -973,17 +977,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.UpdatePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.UpdatePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1077,7 +1081,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UpdatePlaylistResponse(
status_code=http_res.status_code,
@@ -1085,17 +1089,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlaylistBadRequestData
)
data.raw_response = http_res
raise errors.UpdatePlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UpdatePlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.UpdatePlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UpdatePlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1189,7 +1193,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistContentsResponse(
object=utils.unmarshal_json(
@@ -1200,17 +1204,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.GetPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1304,7 +1308,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetPlaylistContentsResponse(
object=utils.unmarshal_json(
@@ -1315,17 +1319,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.GetPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1413,7 +1417,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.ClearPlaylistContentsResponse(
status_code=http_res.status_code,
@@ -1421,17 +1425,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ClearPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.ClearPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.ClearPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ClearPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.ClearPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.ClearPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1519,7 +1523,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.ClearPlaylistContentsResponse(
status_code=http_res.status_code,
@@ -1527,17 +1531,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ClearPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.ClearPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.ClearPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ClearPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.ClearPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.ClearPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1632,7 +1636,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.AddPlaylistContentsResponse(
object=utils.unmarshal_json(
@@ -1643,17 +1647,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.AddPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.AddPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.AddPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.AddPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.AddPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.AddPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1748,7 +1752,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.AddPlaylistContentsResponse(
object=utils.unmarshal_json(
@@ -1759,17 +1763,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.AddPlaylistContentsBadRequestData
)
data.raw_response = http_res
raise errors.AddPlaylistContentsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.AddPlaylistContentsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.AddPlaylistContentsUnauthorizedData
)
data.raw_response = http_res
raise errors.AddPlaylistContentsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.AddPlaylistContentsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1863,7 +1867,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UploadPlaylistResponse(
status_code=http_res.status_code,
@@ -1871,17 +1875,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UploadPlaylistBadRequestData
)
data.raw_response = http_res
raise errors.UploadPlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UploadPlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UploadPlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.UploadPlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UploadPlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1975,7 +1979,7 @@ class Playlists(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.UploadPlaylistResponse(
status_code=http_res.status_code,
@@ -1983,17 +1987,17 @@ class Playlists(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UploadPlaylistBadRequestData
)
data.raw_response = http_res
raise errors.UploadPlaylistBadRequest(data=data)
response_data.raw_response = http_res
raise errors.UploadPlaylistBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.UploadPlaylistUnauthorizedData
)
data.raw_response = http_res
raise errors.UploadPlaylistUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.UploadPlaylistUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -72,7 +72,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetCompanionsDataResponse(
response_bodies=utils.unmarshal_json(
@@ -83,17 +83,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetCompanionsDataBadRequestData
)
data.raw_response = http_res
raise errors.GetCompanionsDataBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetCompanionsDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetCompanionsDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetCompanionsDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetCompanionsDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -175,7 +175,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetCompanionsDataResponse(
response_bodies=utils.unmarshal_json(
@@ -186,17 +186,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetCompanionsDataBadRequestData
)
data.raw_response = http_res
raise errors.GetCompanionsDataBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetCompanionsDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetCompanionsDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetCompanionsDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetCompanionsDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -278,7 +278,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetUserFriendsResponse(
friends=utils.unmarshal_json(
@@ -289,17 +289,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUserFriendsBadRequestData
)
data.raw_response = http_res
raise errors.GetUserFriendsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetUserFriendsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUserFriendsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetUserFriendsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetUserFriendsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -381,7 +381,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetUserFriendsResponse(
friends=utils.unmarshal_json(
@@ -392,17 +392,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUserFriendsBadRequestData
)
data.raw_response = http_res
raise errors.GetUserFriendsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetUserFriendsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUserFriendsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetUserFriendsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetUserFriendsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -481,7 +481,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetGeoDataResponse(
geo_data=utils.unmarshal_json(
@@ -492,15 +492,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetGeoDataBadRequestData)
data.raw_response = http_res
raise errors.GetGeoDataBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetGeoDataBadRequestData
)
response_data.raw_response = http_res
raise errors.GetGeoDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGeoDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetGeoDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetGeoDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -579,7 +581,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetGeoDataResponse(
geo_data=utils.unmarshal_json(
@@ -590,15 +592,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetGeoDataBadRequestData)
data.raw_response = http_res
raise errors.GetGeoDataBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetGeoDataBadRequestData
)
response_data.raw_response = http_res
raise errors.GetGeoDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetGeoDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetGeoDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetGeoDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -678,7 +682,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetHomeDataResponse(
object=utils.unmarshal_json(
@@ -689,15 +693,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetHomeDataBadRequestData)
data.raw_response = http_res
raise errors.GetHomeDataBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetHomeDataBadRequestData
)
response_data.raw_response = http_res
raise errors.GetHomeDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetHomeDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetHomeDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetHomeDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -777,7 +783,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetHomeDataResponse(
object=utils.unmarshal_json(
@@ -788,15 +794,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetHomeDataBadRequestData)
data.raw_response = http_res
raise errors.GetHomeDataBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetHomeDataBadRequestData
)
response_data.raw_response = http_res
raise errors.GetHomeDataBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetHomeDataUnauthorizedData
)
data.raw_response = http_res
raise errors.GetHomeDataUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetHomeDataUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -900,7 +908,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerResourcesResponse(
plex_devices=utils.unmarshal_json(
@@ -911,17 +919,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerResourcesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerResourcesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerResourcesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerResourcesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerResourcesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerResourcesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1025,7 +1033,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerResourcesResponse(
plex_devices=utils.unmarshal_json(
@@ -1036,17 +1044,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerResourcesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerResourcesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerResourcesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerResourcesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerResourcesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerResourcesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1132,7 +1140,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
return operations.GetPinResponse(
auth_pin_container=utils.unmarshal_json(
@@ -1143,9 +1151,11 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetPinBadRequestData)
data.raw_response = http_res
raise errors.GetPinBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetPinBadRequestData
)
response_data.raw_response = http_res
raise errors.GetPinBadRequest(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1231,7 +1241,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
return operations.GetPinResponse(
auth_pin_container=utils.unmarshal_json(
@@ -1242,9 +1252,11 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetPinBadRequestData)
data.raw_response = http_res
raise errors.GetPinBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetPinBadRequestData
)
response_data.raw_response = http_res
raise errors.GetPinBadRequest(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1333,7 +1345,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTokenByPinIDResponse(
auth_pin_container=utils.unmarshal_json(
@@ -1344,17 +1356,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenByPinIDBadRequestData
)
data.raw_response = http_res
raise errors.GetTokenByPinIDBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTokenByPinIDBadRequest(data=response_data)
if utils.match_response(http_res, "404", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenByPinIDResponseBodyData
)
data.raw_response = http_res
raise errors.GetTokenByPinIDResponseBody(data=data)
response_data.raw_response = http_res
raise errors.GetTokenByPinIDResponseBody(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1443,7 +1455,7 @@ class Plex(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTokenByPinIDResponse(
auth_pin_container=utils.unmarshal_json(
@@ -1454,17 +1466,17 @@ class Plex(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenByPinIDBadRequestData
)
data.raw_response = http_res
raise errors.GetTokenByPinIDBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTokenByPinIDBadRequest(data=response_data)
if utils.match_response(http_res, "404", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTokenByPinIDResponseBodyData
)
data.raw_response = http_res
raise errors.GetTokenByPinIDResponseBody(data=data)
response_data.raw_response = http_res
raise errors.GetTokenByPinIDResponseBody(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -95,7 +95,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.PerformSearchResponse(
status_code=http_res.status_code,
@@ -103,17 +103,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformSearchBadRequestData
)
data.raw_response = http_res
raise errors.PerformSearchBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PerformSearchBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformSearchUnauthorizedData
)
data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -218,7 +218,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.PerformSearchResponse(
status_code=http_res.status_code,
@@ -226,17 +226,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformSearchBadRequestData
)
data.raw_response = http_res
raise errors.PerformSearchBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PerformSearchBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformSearchUnauthorizedData
)
data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -333,7 +333,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.PerformVoiceSearchResponse(
status_code=http_res.status_code,
@@ -341,17 +341,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformVoiceSearchBadRequestData
)
data.raw_response = http_res
raise errors.PerformVoiceSearchBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PerformVoiceSearchBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformVoiceSearchUnauthorizedData
)
data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -448,7 +448,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.PerformVoiceSearchResponse(
status_code=http_res.status_code,
@@ -456,17 +456,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformVoiceSearchBadRequestData
)
data.raw_response = http_res
raise errors.PerformVoiceSearchBadRequest(data=data)
response_data.raw_response = http_res
raise errors.PerformVoiceSearchBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.PerformVoiceSearchUnauthorizedData
)
data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -553,7 +553,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSearchResultsResponse(
object=utils.unmarshal_json(
@@ -564,17 +564,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSearchResultsBadRequestData
)
data.raw_response = http_res
raise errors.GetSearchResultsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSearchResultsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSearchResultsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -661,7 +661,7 @@ class Search(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSearchResultsResponse(
object=utils.unmarshal_json(
@@ -672,17 +672,17 @@ class Search(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSearchResultsBadRequestData
)
data.raw_response = http_res
raise errors.GetSearchResultsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSearchResultsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSearchResultsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -70,7 +70,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerCapabilitiesResponse(
object=utils.unmarshal_json(
@@ -82,17 +82,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerCapabilitiesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerCapabilitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerCapabilitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerCapabilitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerCapabilitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerCapabilitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -172,7 +172,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerCapabilitiesResponse(
object=utils.unmarshal_json(
@@ -184,17 +184,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerCapabilitiesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerCapabilitiesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerCapabilitiesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerCapabilitiesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerCapabilitiesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerCapabilitiesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -274,7 +274,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerPreferencesResponse(
object=utils.unmarshal_json(
@@ -285,17 +285,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerPreferencesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerPreferencesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerPreferencesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerPreferencesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerPreferencesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerPreferencesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -375,7 +375,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerPreferencesResponse(
object=utils.unmarshal_json(
@@ -386,17 +386,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerPreferencesBadRequestData
)
data.raw_response = http_res
raise errors.GetServerPreferencesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerPreferencesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerPreferencesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerPreferencesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerPreferencesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -476,7 +476,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetAvailableClientsResponse(
object=utils.unmarshal_json(
@@ -487,17 +487,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetAvailableClientsBadRequestData
)
data.raw_response = http_res
raise errors.GetAvailableClientsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetAvailableClientsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetAvailableClientsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetAvailableClientsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetAvailableClientsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -577,7 +577,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetAvailableClientsResponse(
object=utils.unmarshal_json(
@@ -588,17 +588,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetAvailableClientsBadRequestData
)
data.raw_response = http_res
raise errors.GetAvailableClientsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetAvailableClientsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetAvailableClientsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetAvailableClientsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetAvailableClientsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -678,7 +678,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetDevicesResponse(
object=utils.unmarshal_json(
@@ -689,15 +689,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetDevicesBadRequestData)
data.raw_response = http_res
raise errors.GetDevicesBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetDevicesBadRequestData
)
response_data.raw_response = http_res
raise errors.GetDevicesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetDevicesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetDevicesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetDevicesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -777,7 +779,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetDevicesResponse(
object=utils.unmarshal_json(
@@ -788,15 +790,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetDevicesBadRequestData)
data.raw_response = http_res
raise errors.GetDevicesBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetDevicesBadRequestData
)
response_data.raw_response = http_res
raise errors.GetDevicesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetDevicesUnauthorizedData
)
data.raw_response = http_res
raise errors.GetDevicesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetDevicesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -875,7 +879,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerIdentityResponse(
object=utils.unmarshal_json(
@@ -886,11 +890,11 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "408", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerIdentityRequestTimeoutData
)
data.raw_response = http_res
raise errors.GetServerIdentityRequestTimeout(data=data)
response_data.raw_response = http_res
raise errors.GetServerIdentityRequestTimeout(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -969,7 +973,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerIdentityResponse(
object=utils.unmarshal_json(
@@ -980,11 +984,11 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "408", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerIdentityRequestTimeoutData
)
data.raw_response = http_res
raise errors.GetServerIdentityRequestTimeout(data=data)
response_data.raw_response = http_res
raise errors.GetServerIdentityRequestTimeout(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1064,7 +1068,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetMyPlexAccountResponse(
object=utils.unmarshal_json(
@@ -1075,17 +1079,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMyPlexAccountBadRequestData
)
data.raw_response = http_res
raise errors.GetMyPlexAccountBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetMyPlexAccountBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMyPlexAccountUnauthorizedData
)
data.raw_response = http_res
raise errors.GetMyPlexAccountUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetMyPlexAccountUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1165,7 +1169,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetMyPlexAccountResponse(
object=utils.unmarshal_json(
@@ -1176,17 +1180,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMyPlexAccountBadRequestData
)
data.raw_response = http_res
raise errors.GetMyPlexAccountBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetMyPlexAccountBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMyPlexAccountUnauthorizedData
)
data.raw_response = http_res
raise errors.GetMyPlexAccountUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetMyPlexAccountUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1277,7 +1281,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetResizedPhotoResponse(
status_code=http_res.status_code,
@@ -1285,17 +1289,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResizedPhotoBadRequestData
)
data.raw_response = http_res
raise errors.GetResizedPhotoBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetResizedPhotoBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResizedPhotoUnauthorizedData
)
data.raw_response = http_res
raise errors.GetResizedPhotoUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetResizedPhotoUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1386,7 +1390,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetResizedPhotoResponse(
status_code=http_res.status_code,
@@ -1394,17 +1398,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResizedPhotoBadRequestData
)
data.raw_response = http_res
raise errors.GetResizedPhotoBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetResizedPhotoBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResizedPhotoUnauthorizedData
)
data.raw_response = http_res
raise errors.GetResizedPhotoUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetResizedPhotoUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1491,7 +1495,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetMediaProvidersResponse(
object=utils.unmarshal_json(
@@ -1502,17 +1506,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMediaProvidersBadRequestData
)
data.raw_response = http_res
raise errors.GetMediaProvidersBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetMediaProvidersBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMediaProvidersUnauthorizedData
)
data.raw_response = http_res
raise errors.GetMediaProvidersUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetMediaProvidersUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1599,7 +1603,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetMediaProvidersResponse(
object=utils.unmarshal_json(
@@ -1610,17 +1614,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMediaProvidersBadRequestData
)
data.raw_response = http_res
raise errors.GetMediaProvidersBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetMediaProvidersBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetMediaProvidersUnauthorizedData
)
data.raw_response = http_res
raise errors.GetMediaProvidersUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetMediaProvidersUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -1700,7 +1704,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerListResponse(
object=utils.unmarshal_json(
@@ -1711,17 +1715,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerListBadRequestData
)
data.raw_response = http_res
raise errors.GetServerListBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerListBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerListUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerListUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerListUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -1801,7 +1805,7 @@ class Server(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetServerListResponse(
object=utils.unmarshal_json(
@@ -1812,17 +1816,17 @@ class Server(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerListBadRequestData
)
data.raw_response = http_res
raise errors.GetServerListBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetServerListBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetServerListUnauthorizedData
)
data.raw_response = http_res
raise errors.GetServerListUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetServerListUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -70,7 +70,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSessionsResponse(
object=utils.unmarshal_json(
@@ -81,15 +81,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetSessionsBadRequestData)
data.raw_response = http_res
raise errors.GetSessionsBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionsBadRequestData
)
response_data.raw_response = http_res
raise errors.GetSessionsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSessionsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSessionsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -169,7 +171,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSessionsResponse(
object=utils.unmarshal_json(
@@ -180,15 +182,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetSessionsBadRequestData)
data.raw_response = http_res
raise errors.GetSessionsBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionsBadRequestData
)
response_data.raw_response = http_res
raise errors.GetSessionsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSessionsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSessionsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -288,7 +292,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSessionHistoryResponse(
object=utils.unmarshal_json(
@@ -299,17 +303,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionHistoryBadRequestData
)
data.raw_response = http_res
raise errors.GetSessionHistoryBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSessionHistoryBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionHistoryUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSessionHistoryUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSessionHistoryUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -409,7 +413,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetSessionHistoryResponse(
object=utils.unmarshal_json(
@@ -420,17 +424,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionHistoryBadRequestData
)
data.raw_response = http_res
raise errors.GetSessionHistoryBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetSessionHistoryBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetSessionHistoryUnauthorizedData
)
data.raw_response = http_res
raise errors.GetSessionHistoryUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetSessionHistoryUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -510,7 +514,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTranscodeSessionsResponse(
object=utils.unmarshal_json(
@@ -521,17 +525,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTranscodeSessionsBadRequestData
)
data.raw_response = http_res
raise errors.GetTranscodeSessionsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTranscodeSessionsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTranscodeSessionsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTranscodeSessionsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTranscodeSessionsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -611,7 +615,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetTranscodeSessionsResponse(
object=utils.unmarshal_json(
@@ -622,17 +626,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTranscodeSessionsBadRequestData
)
data.raw_response = http_res
raise errors.GetTranscodeSessionsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetTranscodeSessionsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTranscodeSessionsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTranscodeSessionsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTranscodeSessionsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -719,7 +723,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "204", "*"):
return operations.StopTranscodeSessionResponse(
status_code=http_res.status_code,
@@ -727,17 +731,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopTranscodeSessionBadRequestData
)
data.raw_response = http_res
raise errors.StopTranscodeSessionBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StopTranscodeSessionBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopTranscodeSessionUnauthorizedData
)
data.raw_response = http_res
raise errors.StopTranscodeSessionUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StopTranscodeSessionUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -824,7 +828,7 @@ class Sessions(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "204", "*"):
return operations.StopTranscodeSessionResponse(
status_code=http_res.status_code,
@@ -832,17 +836,17 @@ class Sessions(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopTranscodeSessionBadRequestData
)
data.raw_response = http_res
raise errors.StopTranscodeSessionBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StopTranscodeSessionBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StopTranscodeSessionUnauthorizedData
)
data.raw_response = http_res
raise errors.StopTranscodeSessionUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StopTranscodeSessionUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -77,7 +77,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetStatisticsResponse(
object=utils.unmarshal_json(
@@ -88,17 +88,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -185,7 +185,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetStatisticsResponse(
object=utils.unmarshal_json(
@@ -196,17 +196,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -293,7 +293,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetResourcesStatisticsResponse(
object=utils.unmarshal_json(
@@ -305,17 +305,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResourcesStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetResourcesStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetResourcesStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResourcesStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetResourcesStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetResourcesStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -402,7 +402,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetResourcesStatisticsResponse(
object=utils.unmarshal_json(
@@ -414,17 +414,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResourcesStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetResourcesStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetResourcesStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetResourcesStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetResourcesStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetResourcesStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -511,7 +511,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetBandwidthStatisticsResponse(
object=utils.unmarshal_json(
@@ -523,17 +523,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetBandwidthStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetBandwidthStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetBandwidthStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetBandwidthStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetBandwidthStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetBandwidthStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -620,7 +620,7 @@ class Statistics(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetBandwidthStatisticsResponse(
object=utils.unmarshal_json(
@@ -632,17 +632,17 @@ class Statistics(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetBandwidthStatisticsBadRequestData
)
data.raw_response = http_res
raise errors.GetBandwidthStatisticsBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetBandwidthStatisticsBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetBandwidthStatisticsUnauthorizedData
)
data.raw_response = http_res
raise errors.GetBandwidthStatisticsUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetBandwidthStatisticsUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -73,7 +73,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetUpdateStatusResponse(
object=utils.unmarshal_json(
@@ -84,17 +84,17 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUpdateStatusBadRequestData
)
data.raw_response = http_res
raise errors.GetUpdateStatusBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetUpdateStatusBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUpdateStatusUnauthorizedData
)
data.raw_response = http_res
raise errors.GetUpdateStatusUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetUpdateStatusUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -174,7 +174,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetUpdateStatusResponse(
object=utils.unmarshal_json(
@@ -185,17 +185,17 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUpdateStatusBadRequestData
)
data.raw_response = http_res
raise errors.GetUpdateStatusBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetUpdateStatusBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetUpdateStatusUnauthorizedData
)
data.raw_response = http_res
raise errors.GetUpdateStatusUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetUpdateStatusUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -282,7 +282,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.CheckForUpdatesResponse(
status_code=http_res.status_code,
@@ -290,17 +290,17 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CheckForUpdatesBadRequestData
)
data.raw_response = http_res
raise errors.CheckForUpdatesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CheckForUpdatesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CheckForUpdatesUnauthorizedData
)
data.raw_response = http_res
raise errors.CheckForUpdatesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CheckForUpdatesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -387,7 +387,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.CheckForUpdatesResponse(
status_code=http_res.status_code,
@@ -395,17 +395,17 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CheckForUpdatesBadRequestData
)
data.raw_response = http_res
raise errors.CheckForUpdatesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.CheckForUpdatesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.CheckForUpdatesUnauthorizedData
)
data.raw_response = http_res
raise errors.CheckForUpdatesUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.CheckForUpdatesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -496,7 +496,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.ApplyUpdatesResponse(
status_code=http_res.status_code,
@@ -504,23 +504,23 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ApplyUpdatesBadRequestData
)
data.raw_response = http_res
raise errors.ApplyUpdatesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.ApplyUpdatesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ApplyUpdatesUnauthorizedData
)
data.raw_response = http_res
raise errors.ApplyUpdatesUnauthorized(data=data)
if utils.match_response(http_res, ["500", "5XX"], "*"):
response_data.raw_response = http_res
raise errors.ApplyUpdatesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
)
if utils.match_response(http_res, "4XX", "*"):
if utils.match_response(http_res, ["500", "5XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
@@ -605,7 +605,7 @@ class Updater(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.ApplyUpdatesResponse(
status_code=http_res.status_code,
@@ -613,23 +613,23 @@ class Updater(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ApplyUpdatesBadRequestData
)
data.raw_response = http_res
raise errors.ApplyUpdatesBadRequest(data=data)
response_data.raw_response = http_res
raise errors.ApplyUpdatesBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.ApplyUpdatesUnauthorizedData
)
data.raw_response = http_res
raise errors.ApplyUpdatesUnauthorized(data=data)
if utils.match_response(http_res, ["500", "5XX"], "*"):
response_data.raw_response = http_res
raise errors.ApplyUpdatesUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res
)
if utils.match_response(http_res, "4XX", "*"):
if utils.match_response(http_res, ["500", "5XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res_text, http_res

View File

@@ -79,7 +79,7 @@ class Video(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetTimelineResponse(
status_code=http_res.status_code,
@@ -87,15 +87,17 @@ class Video(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetTimelineBadRequestData)
data.raw_response = http_res
raise errors.GetTimelineBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetTimelineBadRequestData
)
response_data.raw_response = http_res
raise errors.GetTimelineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTimelineUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTimelineUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTimelineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -184,7 +186,7 @@ class Video(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.GetTimelineResponse(
status_code=http_res.status_code,
@@ -192,15 +194,17 @@ class Video(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(http_res.text, errors.GetTimelineBadRequestData)
data.raw_response = http_res
raise errors.GetTimelineBadRequest(data=data)
response_data = utils.unmarshal_json(
http_res.text, errors.GetTimelineBadRequestData
)
response_data.raw_response = http_res
raise errors.GetTimelineBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetTimelineUnauthorizedData
)
data.raw_response = http_res
raise errors.GetTimelineUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetTimelineUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
@@ -292,7 +296,7 @@ class Video(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StartUniversalTranscodeResponse(
status_code=http_res.status_code,
@@ -300,17 +304,17 @@ class Video(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartUniversalTranscodeBadRequestData
)
data.raw_response = http_res
raise errors.StartUniversalTranscodeBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StartUniversalTranscodeBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartUniversalTranscodeUnauthorizedData
)
data.raw_response = http_res
raise errors.StartUniversalTranscodeUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StartUniversalTranscodeUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -402,7 +406,7 @@ class Video(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "*"):
return operations.StartUniversalTranscodeResponse(
status_code=http_res.status_code,
@@ -410,17 +414,17 @@ class Video(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartUniversalTranscodeBadRequestData
)
data.raw_response = http_res
raise errors.StartUniversalTranscodeBadRequest(data=data)
response_data.raw_response = http_res
raise errors.StartUniversalTranscodeBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.StartUniversalTranscodeUnauthorizedData
)
data.raw_response = http_res
raise errors.StartUniversalTranscodeUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.StartUniversalTranscodeUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(

View File

@@ -81,7 +81,7 @@ class Watchlist(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetWatchListResponse(
object=utils.unmarshal_json(
@@ -92,17 +92,17 @@ class Watchlist(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetWatchListBadRequestData
)
data.raw_response = http_res
raise errors.GetWatchListBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetWatchListBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetWatchListUnauthorizedData
)
data.raw_response = http_res
raise errors.GetWatchListUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetWatchListUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
@@ -193,7 +193,7 @@ class Watchlist(BaseSDK):
retry_config=retry_config,
)
data: Any = None
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return operations.GetWatchListResponse(
object=utils.unmarshal_json(
@@ -204,17 +204,17 @@ class Watchlist(BaseSDK):
raw_response=http_res,
)
if utils.match_response(http_res, "400", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetWatchListBadRequestData
)
data.raw_response = http_res
raise errors.GetWatchListBadRequest(data=data)
response_data.raw_response = http_res
raise errors.GetWatchListBadRequest(data=response_data)
if utils.match_response(http_res, "401", "application/json"):
data = utils.unmarshal_json(
response_data = utils.unmarshal_json(
http_res.text, errors.GetWatchListUnauthorizedData
)
data.raw_response = http_res
raise errors.GetWatchListUnauthorized(data=data)
response_data.raw_response = http_res
raise errors.GetWatchListUnauthorized(data=response_data)
if utils.match_response(http_res, "4XX", "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(