mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.598.0
This commit is contained in:
@@ -3,10 +3,10 @@ id: 3eeea668-4ef4-464e-a888-bdfa023bedf5
|
||||
management:
|
||||
docChecksum: 77bdddd188d0778dc73b7f7906e1677c
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.558.1
|
||||
generationVersion: 2.623.4
|
||||
releaseVersion: 0.28.2
|
||||
configChecksum: c2b77fa004a60ce087dfa61844f66be9
|
||||
speakeasyVersion: 1.598.0
|
||||
generationVersion: 2.674.1
|
||||
releaseVersion: 0.29.0
|
||||
configChecksum: 3ffacf9e19a64bb4ce4211cf73d7ec53
|
||||
repoURL: https://github.com/LukeHagar/plexpy.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexpy.git
|
||||
@@ -15,14 +15,14 @@ features:
|
||||
python:
|
||||
additionalDependencies: 1.0.0
|
||||
constsAndDefaults: 1.0.5
|
||||
core: 5.19.2
|
||||
core: 5.19.6
|
||||
defaultEnabledRetries: 0.2.0
|
||||
deprecations: 3.0.2
|
||||
downloadStreams: 1.0.1
|
||||
enumUnions: 0.1.0
|
||||
enums: 3.1.2
|
||||
envVarSecurityUsage: 0.3.2
|
||||
errors: 3.2.0
|
||||
errors: 3.3.1
|
||||
flattening: 3.1.1
|
||||
globalSecurity: 3.0.3
|
||||
globalSecurityCallbacks: 1.0.0
|
||||
@@ -39,7 +39,6 @@ features:
|
||||
uploadStreams: 1.0.0
|
||||
generatedFiles:
|
||||
- .gitattributes
|
||||
- .python-version
|
||||
- .vscode/settings.json
|
||||
- USAGE.md
|
||||
- docs/models/components/security.md
|
||||
@@ -1063,9 +1062,12 @@ generatedFiles:
|
||||
- src/plex_api_client/models/errors/logmultiline.py
|
||||
- src/plex_api_client/models/errors/markplayed.py
|
||||
- src/plex_api_client/models/errors/markunplayed.py
|
||||
- src/plex_api_client/models/errors/no_response_error.py
|
||||
- src/plex_api_client/models/errors/performsearch.py
|
||||
- src/plex_api_client/models/errors/performvoicesearch.py
|
||||
- src/plex_api_client/models/errors/plexapierror.py
|
||||
- src/plex_api_client/models/errors/post_users_sign_in_data.py
|
||||
- src/plex_api_client/models/errors/responsevalidationerror.py
|
||||
- src/plex_api_client/models/errors/sdkerror.py
|
||||
- src/plex_api_client/models/errors/startalltasks.py
|
||||
- src/plex_api_client/models/errors/starttask.py
|
||||
@@ -1188,6 +1190,7 @@ generatedFiles:
|
||||
- src/plex_api_client/utils/retries.py
|
||||
- src/plex_api_client/utils/security.py
|
||||
- src/plex_api_client/utils/serializers.py
|
||||
- src/plex_api_client/utils/unmarshal_json_response.py
|
||||
- src/plex_api_client/utils/url.py
|
||||
- src/plex_api_client/utils/values.py
|
||||
- src/plex_api_client/video.py
|
||||
@@ -1314,6 +1317,17 @@ 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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||
speakeasy-default-update-play-progress:
|
||||
parameters:
|
||||
query:
|
||||
key: "<key>"
|
||||
time: 90000
|
||||
state: "played"
|
||||
responses:
|
||||
"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}]}
|
||||
get-banner-image:
|
||||
speakeasy-default-get-banner-image:
|
||||
parameters:
|
||||
@@ -1371,6 +1385,24 @@ 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}, {"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}]}
|
||||
speakeasy-default-get-timeline:
|
||||
parameters:
|
||||
query:
|
||||
ratingKey: 23409
|
||||
key: "/library/metadata/23409"
|
||||
state: "playing"
|
||||
hasMDE: 1
|
||||
time: 2000
|
||||
duration: 10000
|
||||
context: "home:hub.continueWatching"
|
||||
playQueueItemID: 1
|
||||
playBackTime: 2000
|
||||
row: 1
|
||||
responses:
|
||||
"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}]}
|
||||
startUniversalTranscode:
|
||||
"":
|
||||
parameters:
|
||||
@@ -1396,6 +1428,30 @@ 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}, {"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}]}
|
||||
speakeasy-default-start-universal-transcode:
|
||||
parameters:
|
||||
query:
|
||||
hasMDE: 1
|
||||
path: "/library/metadata/23409"
|
||||
mediaIndex: 0
|
||||
partIndex: 0
|
||||
protocol: "hls"
|
||||
fastSeek: 0
|
||||
directPlay: 0
|
||||
directStream: 0
|
||||
subtitleSize: 100
|
||||
subtites: "burn"
|
||||
audioBoost: 100
|
||||
location: "lan"
|
||||
mediaBufferSize: 102400
|
||||
session: "zvcage8b7rkioqcm8f4uns4c"
|
||||
addDebugOverlay: 0
|
||||
autoAdjustQuality: 0
|
||||
responses:
|
||||
"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}]}
|
||||
getServerActivities:
|
||||
speakeasy-default-get-server-activities:
|
||||
responses:
|
||||
@@ -1415,6 +1471,15 @@ 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}]}
|
||||
speakeasy-default-cancel-server-activities:
|
||||
parameters:
|
||||
path:
|
||||
activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"
|
||||
responses:
|
||||
"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}]}
|
||||
getButlerTasks:
|
||||
speakeasy-default-get-butler-tasks:
|
||||
responses:
|
||||
@@ -1510,6 +1575,21 @@ 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}, {"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}]}
|
||||
speakeasy-default-get-server-resources:
|
||||
parameters:
|
||||
query:
|
||||
includeHttps: 1
|
||||
includeRelay: 1
|
||||
includeIPv6: 1
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
responses:
|
||||
"200":
|
||||
application/json: [{"name": "<value>", "product": "Ergonomic Plastic Hat", "productVersion": "<value>", "platform": "<value>", "platformVersion": "<value>", "device": "Mobile", "clientIdentifier": "<value>", "createdAt": "2019-06-24T11:38:02Z", "lastSeenAt": "2019-06-24T11:38:02Z", "provides": "<value>", "ownerId": null, "sourceTitle": "<value>", "publicAddress": "<value>", "accessToken": "<value>", "owned": true, "home": false, "synced": false, "relay": true, "presence": false, "httpsRequired": true, "publicAddressMatches": false, "dnsRebindingProtection": true, "natLoopbackSupported": false, "connections": [{"protocol": "http", "address": "5746 Mount Street", "port": 441996, "uri": "https://wide-kick.name/", "local": false, "relay": true, "IPv6": true}]}]
|
||||
"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}]}
|
||||
getPin:
|
||||
"":
|
||||
parameters:
|
||||
@@ -1526,6 +1606,21 @@ examples:
|
||||
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||
"400":
|
||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||
speakeasy-default-get-pin:
|
||||
parameters:
|
||||
query:
|
||||
strong: false
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
X-Plex-Product: "Plex for Roku"
|
||||
X-Plex-Device: "Roku 3"
|
||||
X-Plex-Version: "2.4.1"
|
||||
X-Plex-Platform: "Roku"
|
||||
responses:
|
||||
"201":
|
||||
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||
"400":
|
||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||
getTokenByPinId:
|
||||
"":
|
||||
parameters:
|
||||
@@ -1540,6 +1635,23 @@ examples:
|
||||
responses:
|
||||
"404":
|
||||
application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]}
|
||||
speakeasy-default-get-token-by-pin-id:
|
||||
parameters:
|
||||
path:
|
||||
pinID: 232248
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
X-Plex-Product: "Plex for Roku"
|
||||
X-Plex-Device: "Roku 3"
|
||||
X-Plex-Version: "2.4.1"
|
||||
X-Plex-Platform: "Roku"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||
"400":
|
||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||
"404":
|
||||
application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]}
|
||||
getGlobalHubs:
|
||||
speakeasy-default-get-global-hubs:
|
||||
responses:
|
||||
@@ -1794,6 +1906,22 @@ examples:
|
||||
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}]}
|
||||
speakeasy-default-get-search-all-libraries:
|
||||
parameters:
|
||||
query:
|
||||
query: "<value>"
|
||||
searchTypes: ["people"]
|
||||
includeCollections: 1
|
||||
includeExternalMedia: 1
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "SearchResult": [{"score": 0.92, "Directory": {"key": "/library/sections/3/all?actor=197429", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "librarySectionType": 1, "type": "tag", "id": 197429, "filter": "actor=197429", "tag": "Ben Stiller", "tagType": 4, "tagKey": "5d776826999c64001ec2c606", "thumb": "https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg", "count": 10}, "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "banner": "/library/metadata/58683/banner/1703239236", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "parentYear": 2010, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}"}], "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "showOrdering": "absolute", "flattenSeasons": "1", "skipChildren": false, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": "4k", "container": "mp4", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1"}]}], "Genre": [{"id": 259, "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}]}}]}}
|
||||
"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}]}
|
||||
get-media-meta-data:
|
||||
speakeasy-default-get-media-meta-data:
|
||||
parameters:
|
||||
@@ -2115,6 +2243,23 @@ 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}]}
|
||||
speakeasy-default-post-users-sign-in-data:
|
||||
parameters:
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
X-Plex-Product: "Plex for Roku"
|
||||
X-Plex-Device: "Roku 3"
|
||||
X-Plex-Version: "2.4.1"
|
||||
X-Plex-Platform: "Roku"
|
||||
requestBody:
|
||||
application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "rememberMe": false, "verificationCode": "123456"}
|
||||
responses:
|
||||
"201":
|
||||
application/json: {"adsConsent": null, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "ru", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "<value>", "services": [], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "<value>", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [], "trials": []}
|
||||
"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}]}
|
||||
getStatistics:
|
||||
"":
|
||||
parameters:
|
||||
@@ -2127,6 +2272,17 @@ 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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||
speakeasy-default-get-statistics:
|
||||
parameters:
|
||||
query:
|
||||
timespan: 4
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsMedia": [{"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}]}}
|
||||
"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}]}
|
||||
getResourcesStatistics:
|
||||
"":
|
||||
parameters:
|
||||
@@ -2139,6 +2295,17 @@ examples:
|
||||
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}]}
|
||||
speakeasy-default-get-resources-statistics:
|
||||
parameters:
|
||||
query:
|
||||
timespan: 4
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": [{"timespan": 6, "at": 1718384427, "hostCpuUtilization": 1.276, "processCpuUtilization": 0.025, "hostMemoryUtilization": 17.026, "processMemoryUtilization": 0.493}]}}
|
||||
"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}]}
|
||||
getBandwidthStatistics:
|
||||
"":
|
||||
parameters:
|
||||
@@ -2151,6 +2318,17 @@ examples:
|
||||
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}]}
|
||||
speakeasy-default-get-bandwidth-statistics:
|
||||
parameters:
|
||||
query:
|
||||
timespan: 4
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsBandwidth": [{"accountID": 238960586, "deviceID": 208, "timespan": 6, "at": 1718387650, "lan": true, "bytes": 22}]}}
|
||||
"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}]}
|
||||
getSessions:
|
||||
speakeasy-default-get-sessions:
|
||||
responses:
|
||||
@@ -2243,6 +2421,19 @@ examples:
|
||||
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}]}
|
||||
speakeasy-default-get-session-history:
|
||||
parameters:
|
||||
query:
|
||||
accountId: 1
|
||||
filter: {}
|
||||
librarySectionID: 12
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}, {"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}, {"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}}
|
||||
"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}]}
|
||||
getTranscodeSessions:
|
||||
speakeasy-default-get-transcode-sessions:
|
||||
responses:
|
||||
@@ -2281,6 +2472,15 @@ 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}]}
|
||||
speakeasy-default-check-for-updates:
|
||||
parameters:
|
||||
query:
|
||||
download: 1
|
||||
responses:
|
||||
"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}]}
|
||||
applyUpdates:
|
||||
"":
|
||||
parameters:
|
||||
@@ -2292,6 +2492,16 @@ 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}]}
|
||||
speakeasy-default-apply-updates:
|
||||
parameters:
|
||||
query:
|
||||
tonight: 1
|
||||
skip: 1
|
||||
responses:
|
||||
"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}]}
|
||||
get-users:
|
||||
"":
|
||||
parameters:
|
||||
@@ -2316,6 +2526,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}]}
|
||||
speakeasy-default-get-users:
|
||||
parameters:
|
||||
header:
|
||||
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||
X-Plex-Product: "Plex for Roku"
|
||||
X-Plex-Device: "Roku 3"
|
||||
X-Plex-Device-Name: "Chrome"
|
||||
X-Plex-Device-Screen-Resolution: "1487x1165,2560x1440"
|
||||
X-Plex-Version: "2.4.1"
|
||||
X-Plex-Platform: "Roku"
|
||||
X-Plex-Features: "external-media,indirect-media,hub-style-list"
|
||||
X-Plex-Model: "4200X"
|
||||
X-Plex-Session-Id: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca"
|
||||
X-Plex-Language: "en"
|
||||
X-Plex-Platform-Version: "4.3 build 1057"
|
||||
X-Plex-Token: "CV5xoxjTpFKUzBTShsaf"
|
||||
responses:
|
||||
"200":
|
||||
application/xml: "0xfD5052DbD1"
|
||||
"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}]}
|
||||
get-library-sections-all:
|
||||
speakeasy-default-get-library-sections-all:
|
||||
parameters:
|
||||
|
||||
@@ -16,8 +16,12 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
tests:
|
||||
generateTests: true
|
||||
generateNewTests: false
|
||||
skipResponseBodyAssertions: false
|
||||
python:
|
||||
version: 0.28.2
|
||||
version: 0.29.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.558.1
|
||||
speakeasyVersion: 1.598.0
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -8,19 +8,19 @@ sources:
|
||||
- latest
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
|
||||
sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
|
||||
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1749513686
|
||||
- speakeasy-sdk-regen-1754438487
|
||||
targets:
|
||||
plexpy:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
|
||||
sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
|
||||
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||
codeSamplesNamespace: code-samples-python-plexpy
|
||||
codeSamplesRevisionDigest: sha256:80b0bb2691ad853eb319483f842ded70eed016c74ac990ae8314ff6bf1a7e116
|
||||
codeSamplesRevisionDigest: sha256:7188a481e55bb01d0e3d949172712786cf2d0e51a86f37e97f0fc7d77b88f872
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
226
README.md
226
README.md
@@ -400,27 +400,18 @@ with PlexAPI(
|
||||
<!-- Start Error Handling [errors] -->
|
||||
## Error Handling
|
||||
|
||||
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
|
||||
[`PlexAPIError`](./src/plex_api_client/models/errors/plexapierror.py) is the base class for all HTTP error responses. It has the following properties:
|
||||
|
||||
By default, an API error will raise a errors.SDKError exception, which has the following properties:
|
||||
|
||||
| Property | Type | Description |
|
||||
|-----------------|------------------|-----------------------|
|
||||
| `.status_code` | *int* | The HTTP status code |
|
||||
| `.message` | *str* | The error message |
|
||||
| `.raw_response` | *httpx.Response* | The raw HTTP response |
|
||||
| `.body` | *str* | The response content |
|
||||
|
||||
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_server_capabilities_async` method may raise the following exceptions:
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------- | ----------- | ---------------- |
|
||||
| errors.GetServerCapabilitiesBadRequest | 400 | application/json |
|
||||
| errors.GetServerCapabilitiesUnauthorized | 401 | application/json |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
| Property | Type | Description |
|
||||
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
||||
| `err.message` | `str` | Error message |
|
||||
| `err.status_code` | `int` | HTTP response status code eg `404` |
|
||||
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
||||
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
||||
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
||||
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import errors
|
||||
@@ -439,16 +430,197 @@ with PlexAPI(
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
except errors.GetServerCapabilitiesBadRequest as e:
|
||||
# handle e.data: errors.GetServerCapabilitiesBadRequestData
|
||||
raise(e)
|
||||
except errors.GetServerCapabilitiesUnauthorized as e:
|
||||
# handle e.data: errors.GetServerCapabilitiesUnauthorizedData
|
||||
raise(e)
|
||||
except errors.SDKError as e:
|
||||
# handle exception
|
||||
raise(e)
|
||||
|
||||
except errors.PlexAPIError as e:
|
||||
# The base class for HTTP error responses
|
||||
print(e.message)
|
||||
print(e.status_code)
|
||||
print(e.body)
|
||||
print(e.headers)
|
||||
print(e.raw_response)
|
||||
|
||||
# Depending on the method different errors may be thrown
|
||||
if isinstance(e, errors.GetServerCapabilitiesBadRequest):
|
||||
print(e.data.errors) # Optional[List[errors.Errors]]
|
||||
print(e.data.raw_response) # Optional[httpx.Response]
|
||||
```
|
||||
|
||||
### Error Classes
|
||||
**Primary error:**
|
||||
* [`PlexAPIError`](./src/plex_api_client/models/errors/plexapierror.py): The base class for HTTP error responses.
|
||||
|
||||
<details><summary>Less common errors (161)</summary>
|
||||
|
||||
<br />
|
||||
|
||||
**Network errors:**
|
||||
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
|
||||
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
|
||||
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
||||
|
||||
|
||||
**Inherit from [`PlexAPIError`](./src/plex_api_client/models/errors/plexapierror.py)**:
|
||||
* [`GetServerCapabilitiesBadRequest`](./src/plex_api_client/models/errors/getservercapabilitiesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerPreferencesBadRequest`](./src/plex_api_client/models/errors/getserverpreferencesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetAvailableClientsBadRequest`](./src/plex_api_client/models/errors/getavailableclientsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetDevicesBadRequest`](./src/plex_api_client/models/errors/getdevicesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMyPlexAccountBadRequest`](./src/plex_api_client/models/errors/getmyplexaccountbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetResizedPhotoBadRequest`](./src/plex_api_client/models/errors/getresizedphotobadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMediaProvidersBadRequest`](./src/plex_api_client/models/errors/getmediaprovidersbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerListBadRequest`](./src/plex_api_client/models/errors/getserverlistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`MarkPlayedBadRequest`](./src/plex_api_client/models/errors/markplayedbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`MarkUnplayedBadRequest`](./src/plex_api_client/models/errors/markunplayedbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`UpdatePlayProgressBadRequest`](./src/plex_api_client/models/errors/updateplayprogressbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetBannerImageBadRequest`](./src/plex_api_client/models/errors/getbannerimagebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetThumbImageBadRequest`](./src/plex_api_client/models/errors/getthumbimagebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTimelineBadRequest`](./src/plex_api_client/models/errors/gettimelinebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StartUniversalTranscodeBadRequest`](./src/plex_api_client/models/errors/startuniversaltranscodebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerActivitiesBadRequest`](./src/plex_api_client/models/errors/getserveractivitiesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`CancelServerActivitiesBadRequest`](./src/plex_api_client/models/errors/cancelserveractivitiesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetButlerTasksBadRequest`](./src/plex_api_client/models/errors/getbutlertasksbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StartAllTasksBadRequest`](./src/plex_api_client/models/errors/startalltasksbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StopAllTasksBadRequest`](./src/plex_api_client/models/errors/stopalltasksbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StartTaskBadRequest`](./src/plex_api_client/models/errors/starttaskbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StopTaskBadRequest`](./src/plex_api_client/models/errors/stoptaskbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetCompanionsDataBadRequest`](./src/plex_api_client/models/errors/getcompanionsdatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUserFriendsBadRequest`](./src/plex_api_client/models/errors/getuserfriendsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGeoDataBadRequest`](./src/plex_api_client/models/errors/getgeodatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetHomeDataBadRequest`](./src/plex_api_client/models/errors/gethomedatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerResourcesBadRequest`](./src/plex_api_client/models/errors/getserverresourcesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPinBadRequest`](./src/plex_api_client/models/errors/getpinbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTokenByPinIDBadRequest`](./src/plex_api_client/models/errors/gettokenbypinidbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGlobalHubsBadRequest`](./src/plex_api_client/models/errors/getglobalhubsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryHubsBadRequest`](./src/plex_api_client/models/errors/getlibraryhubsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`PerformSearchBadRequest`](./src/plex_api_client/models/errors/performsearchbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`PerformVoiceSearchBadRequest`](./src/plex_api_client/models/errors/performvoicesearchbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchResultsBadRequest`](./src/plex_api_client/models/errors/getsearchresultsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetFileHashBadRequest`](./src/plex_api_client/models/errors/getfilehashbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetRecentlyAddedLibraryBadRequest`](./src/plex_api_client/models/errors/getrecentlyaddedlibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetAllLibrariesBadRequest`](./src/plex_api_client/models/errors/getalllibrariesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryDetailsBadRequest`](./src/plex_api_client/models/errors/getlibrarydetailsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`DeleteLibraryBadRequest`](./src/plex_api_client/models/errors/deletelibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryItemsBadRequest`](./src/plex_api_client/models/errors/getlibraryitemsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibrarySectionsAllBadRequest`](./src/plex_api_client/models/errors/getlibrarysectionsallbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetRefreshLibraryMetadataBadRequest`](./src/plex_api_client/models/errors/getrefreshlibrarymetadatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchLibraryBadRequest`](./src/plex_api_client/models/errors/getsearchlibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGenresLibraryBadRequest`](./src/plex_api_client/models/errors/getgenreslibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetCountriesLibraryBadRequest`](./src/plex_api_client/models/errors/getcountrieslibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetActorsLibraryBadRequest`](./src/plex_api_client/models/errors/getactorslibrarybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchAllLibrariesBadRequest`](./src/plex_api_client/models/errors/getsearchalllibrariesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMediaMetaDataBadRequest`](./src/plex_api_client/models/errors/getmediametadatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMetadataChildrenBadRequest`](./src/plex_api_client/models/errors/getmetadatachildrenbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTopWatchedContentBadRequest`](./src/plex_api_client/models/errors/gettopwatchedcontentbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetWatchListBadRequest`](./src/plex_api_client/models/errors/getwatchlistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`LogLineBadRequest`](./src/plex_api_client/models/errors/loglinebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`LogMultiLineBadRequest`](./src/plex_api_client/models/errors/logmultilinebadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`EnablePaperTrailBadRequest`](./src/plex_api_client/models/errors/enablepapertrailbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`CreatePlaylistBadRequest`](./src/plex_api_client/models/errors/createplaylistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistsBadRequest`](./src/plex_api_client/models/errors/getplaylistsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistBadRequest`](./src/plex_api_client/models/errors/getplaylistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`DeletePlaylistBadRequest`](./src/plex_api_client/models/errors/deleteplaylistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`UpdatePlaylistBadRequest`](./src/plex_api_client/models/errors/updateplaylistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistContentsBadRequest`](./src/plex_api_client/models/errors/getplaylistcontentsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`ClearPlaylistContentsBadRequest`](./src/plex_api_client/models/errors/clearplaylistcontentsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`AddPlaylistContentsBadRequest`](./src/plex_api_client/models/errors/addplaylistcontentsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`UploadPlaylistBadRequest`](./src/plex_api_client/models/errors/uploadplaylistbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTransientTokenBadRequest`](./src/plex_api_client/models/errors/gettransienttokenbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSourceConnectionInformationBadRequest`](./src/plex_api_client/models/errors/getsourceconnectioninformationbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTokenDetailsBadRequest`](./src/plex_api_client/models/errors/gettokendetailsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`PostUsersSignInDataBadRequest`](./src/plex_api_client/models/errors/postuserssignindatabadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetStatisticsBadRequest`](./src/plex_api_client/models/errors/getstatisticsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetResourcesStatisticsBadRequest`](./src/plex_api_client/models/errors/getresourcesstatisticsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetBandwidthStatisticsBadRequest`](./src/plex_api_client/models/errors/getbandwidthstatisticsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSessionsBadRequest`](./src/plex_api_client/models/errors/getsessionsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSessionHistoryBadRequest`](./src/plex_api_client/models/errors/getsessionhistorybadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTranscodeSessionsBadRequest`](./src/plex_api_client/models/errors/gettranscodesessionsbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`StopTranscodeSessionBadRequest`](./src/plex_api_client/models/errors/stoptranscodesessionbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUpdateStatusBadRequest`](./src/plex_api_client/models/errors/getupdatestatusbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`CheckForUpdatesBadRequest`](./src/plex_api_client/models/errors/checkforupdatesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`ApplyUpdatesBadRequest`](./src/plex_api_client/models/errors/applyupdatesbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUsersBadRequest`](./src/plex_api_client/models/errors/getusersbadrequest.py): Bad Request - A parameter was not specified, or was specified incorrectly. Status code `400`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerCapabilitiesUnauthorized`](./src/plex_api_client/models/errors/getservercapabilitiesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerPreferencesUnauthorized`](./src/plex_api_client/models/errors/getserverpreferencesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetAvailableClientsUnauthorized`](./src/plex_api_client/models/errors/getavailableclientsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetDevicesUnauthorized`](./src/plex_api_client/models/errors/getdevicesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMyPlexAccountUnauthorized`](./src/plex_api_client/models/errors/getmyplexaccountunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetResizedPhotoUnauthorized`](./src/plex_api_client/models/errors/getresizedphotounauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMediaProvidersUnauthorized`](./src/plex_api_client/models/errors/getmediaprovidersunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerListUnauthorized`](./src/plex_api_client/models/errors/getserverlistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`MarkPlayedUnauthorized`](./src/plex_api_client/models/errors/markplayedunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`MarkUnplayedUnauthorized`](./src/plex_api_client/models/errors/markunplayedunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`UpdatePlayProgressUnauthorized`](./src/plex_api_client/models/errors/updateplayprogressunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetBannerImageUnauthorized`](./src/plex_api_client/models/errors/getbannerimageunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetThumbImageUnauthorized`](./src/plex_api_client/models/errors/getthumbimageunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTimelineUnauthorized`](./src/plex_api_client/models/errors/gettimelineunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StartUniversalTranscodeUnauthorized`](./src/plex_api_client/models/errors/startuniversaltranscodeunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerActivitiesUnauthorized`](./src/plex_api_client/models/errors/getserveractivitiesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`CancelServerActivitiesUnauthorized`](./src/plex_api_client/models/errors/cancelserveractivitiesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetButlerTasksUnauthorized`](./src/plex_api_client/models/errors/getbutlertasksunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StartAllTasksUnauthorized`](./src/plex_api_client/models/errors/startalltasksunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StopAllTasksUnauthorized`](./src/plex_api_client/models/errors/stopalltasksunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StartTaskUnauthorized`](./src/plex_api_client/models/errors/starttaskunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StopTaskUnauthorized`](./src/plex_api_client/models/errors/stoptaskunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetCompanionsDataUnauthorized`](./src/plex_api_client/models/errors/getcompanionsdataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUserFriendsUnauthorized`](./src/plex_api_client/models/errors/getuserfriendsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGeoDataUnauthorized`](./src/plex_api_client/models/errors/getgeodataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetHomeDataUnauthorized`](./src/plex_api_client/models/errors/gethomedataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerResourcesUnauthorized`](./src/plex_api_client/models/errors/getserverresourcesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGlobalHubsUnauthorized`](./src/plex_api_client/models/errors/getglobalhubsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryHubsUnauthorized`](./src/plex_api_client/models/errors/getlibraryhubsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`PerformSearchUnauthorized`](./src/plex_api_client/models/errors/performsearchunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`PerformVoiceSearchUnauthorized`](./src/plex_api_client/models/errors/performvoicesearchunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchResultsUnauthorized`](./src/plex_api_client/models/errors/getsearchresultsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetFileHashUnauthorized`](./src/plex_api_client/models/errors/getfilehashunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetRecentlyAddedLibraryUnauthorized`](./src/plex_api_client/models/errors/getrecentlyaddedlibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetAllLibrariesUnauthorized`](./src/plex_api_client/models/errors/getalllibrariesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryDetailsUnauthorized`](./src/plex_api_client/models/errors/getlibrarydetailsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`DeleteLibraryUnauthorized`](./src/plex_api_client/models/errors/deletelibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibraryItemsUnauthorized`](./src/plex_api_client/models/errors/getlibraryitemsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetLibrarySectionsAllUnauthorized`](./src/plex_api_client/models/errors/getlibrarysectionsallunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetRefreshLibraryMetadataUnauthorized`](./src/plex_api_client/models/errors/getrefreshlibrarymetadataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchLibraryUnauthorized`](./src/plex_api_client/models/errors/getsearchlibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetGenresLibraryUnauthorized`](./src/plex_api_client/models/errors/getgenreslibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetCountriesLibraryUnauthorized`](./src/plex_api_client/models/errors/getcountrieslibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetActorsLibraryUnauthorized`](./src/plex_api_client/models/errors/getactorslibraryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSearchAllLibrariesUnauthorized`](./src/plex_api_client/models/errors/getsearchalllibrariesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMediaMetaDataUnauthorized`](./src/plex_api_client/models/errors/getmediametadataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetMetadataChildrenUnauthorized`](./src/plex_api_client/models/errors/getmetadatachildrenunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTopWatchedContentUnauthorized`](./src/plex_api_client/models/errors/gettopwatchedcontentunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetWatchListUnauthorized`](./src/plex_api_client/models/errors/getwatchlistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`LogLineUnauthorized`](./src/plex_api_client/models/errors/loglineunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`LogMultiLineUnauthorized`](./src/plex_api_client/models/errors/logmultilineunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`EnablePaperTrailUnauthorized`](./src/plex_api_client/models/errors/enablepapertrailunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`CreatePlaylistUnauthorized`](./src/plex_api_client/models/errors/createplaylistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistsUnauthorized`](./src/plex_api_client/models/errors/getplaylistsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistUnauthorized`](./src/plex_api_client/models/errors/getplaylistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`DeletePlaylistUnauthorized`](./src/plex_api_client/models/errors/deleteplaylistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`UpdatePlaylistUnauthorized`](./src/plex_api_client/models/errors/updateplaylistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetPlaylistContentsUnauthorized`](./src/plex_api_client/models/errors/getplaylistcontentsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`ClearPlaylistContentsUnauthorized`](./src/plex_api_client/models/errors/clearplaylistcontentsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`AddPlaylistContentsUnauthorized`](./src/plex_api_client/models/errors/addplaylistcontentsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`UploadPlaylistUnauthorized`](./src/plex_api_client/models/errors/uploadplaylistunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTransientTokenUnauthorized`](./src/plex_api_client/models/errors/gettransienttokenunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSourceConnectionInformationUnauthorized`](./src/plex_api_client/models/errors/getsourceconnectioninformationunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTokenDetailsUnauthorized`](./src/plex_api_client/models/errors/gettokendetailsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`PostUsersSignInDataUnauthorized`](./src/plex_api_client/models/errors/postuserssignindataunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetStatisticsUnauthorized`](./src/plex_api_client/models/errors/getstatisticsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetResourcesStatisticsUnauthorized`](./src/plex_api_client/models/errors/getresourcesstatisticsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetBandwidthStatisticsUnauthorized`](./src/plex_api_client/models/errors/getbandwidthstatisticsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSessionsUnauthorized`](./src/plex_api_client/models/errors/getsessionsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetSessionHistoryUnauthorized`](./src/plex_api_client/models/errors/getsessionhistoryunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTranscodeSessionsUnauthorized`](./src/plex_api_client/models/errors/gettranscodesessionsunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`StopTranscodeSessionUnauthorized`](./src/plex_api_client/models/errors/stoptranscodesessionunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUpdateStatusUnauthorized`](./src/plex_api_client/models/errors/getupdatestatusunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`CheckForUpdatesUnauthorized`](./src/plex_api_client/models/errors/checkforupdatesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`ApplyUpdatesUnauthorized`](./src/plex_api_client/models/errors/applyupdatesunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetUsersUnauthorized`](./src/plex_api_client/models/errors/getusersunauthorized.py): Unauthorized - Returned if the X-Plex-Token is missing from the header or query. Status code `401`. Applicable to 1 of 84 methods.*
|
||||
* [`GetTokenByPinIDResponseBody`](./src/plex_api_client/models/errors/gettokenbypinidresponsebody.py): Not Found or Expired. Status code `404`. Applicable to 1 of 84 methods.*
|
||||
* [`GetServerIdentityRequestTimeout`](./src/plex_api_client/models/errors/getserveridentityrequesttimeout.py): Request Timeout. Status code `408`. Applicable to 1 of 84 methods.*
|
||||
* [`ResponseValidationError`](./src/plex_api_client/models/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
||||
|
||||
</details>
|
||||
|
||||
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
|
||||
<!-- End Error Handling [errors] -->
|
||||
|
||||
<!-- Start Server Selection [server] -->
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -1068,4 +1068,14 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.28.2] .
|
||||
### Releases
|
||||
- [PyPI v0.28.2] https://pypi.org/project/plex-api-client/0.28.2 - .
|
||||
- [PyPI v0.28.2] https://pypi.org/project/plex-api-client/0.28.2 - .
|
||||
|
||||
## 2025-08-06 00:01:11
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.598.0 (2.674.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.29.0] .
|
||||
### Releases
|
||||
- [PyPI v0.29.0] https://pypi.org/project/plex-api-client/0.29.0 - .
|
||||
@@ -527,7 +527,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_file_hash(url="file://C:\Image.png&type=13")
|
||||
res = plex_api.library.get_file_hash(url="file://C:\\Image.png&type=13")
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ Get Server Activities
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getServerActivities" method="get" path="/activities" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -64,6 +65,7 @@ Cancel Server Activities
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="cancelServerActivities" method="delete" path="/activities/{activityUUID}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ This endpoint provides the caller with a temporary token with the same access le
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTransientToken" method="get" path="/security/token" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -66,6 +67,7 @@ Note: requires Plex Media Server >= 1.15.4.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getSourceConnectionInformation" method="get" path="/security/resources" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -108,6 +110,7 @@ Get the User data from the provided X-Plex-Token
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTokenDetails" method="get" path="/user" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -150,6 +153,7 @@ Sign in user with username and password and return user data with Plex authentic
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="post-users-sign-in-data" method="post" path="/users/signin" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ Returns a list of butler tasks
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getButlerTasks" method="get" path="/butler" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -66,6 +67,7 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="startAllTasks" method="post" path="/butler" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -108,6 +110,7 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="stopAllTasks" method="delete" path="/butler" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -154,6 +157,7 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="startTask" method="post" path="/butler/{taskName}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -198,6 +202,7 @@ This endpoint will stop a currently running task by name, or remove it from the
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="stopTask" method="delete" path="/butler/{taskName}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
@@ -18,6 +18,7 @@ Get Global Hubs filtered by the parameters provided.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getGlobalHubs" method="get" path="/hubs" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -62,6 +63,7 @@ This endpoint will return the recently added content.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-recently-added" method="get" path="/hubs/home/recentlyAdded" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -109,6 +111,7 @@ This endpoint will return a list of library specific hubs
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getLibraryHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ This resource returns hash values for local files
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getFileHash" method="get" path="/library/hashes" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -43,7 +44,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_file_hash(url="file://C:\Image.png&type=13")
|
||||
res = plex_api.library.get_file_hash(url="file://C:\\Image.png&type=13")
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -79,6 +80,7 @@ This endpoint will return the recently added content.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-recently-added-library" method="get" path="/library/recentlyAdded" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -147,6 +149,7 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-all-libraries" method="get" path="/library/sections" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -227,6 +230,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-library-details" method="get" path="/library/sections/{sectionKey}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -271,6 +275,7 @@ Delete a library using a specific section id
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="deleteLibrary" method="delete" path="/library/sections/{sectionKey}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -334,6 +339,7 @@ Fetches details from a specific section of the library identified by a section k
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-library-items" method="get" path="/library/sections/{sectionKey}/{tag}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -384,6 +390,7 @@ Retrieves a list of all general media data for this library.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-library-sections-all" method="get" path="/library/sections/{sectionKey}/all" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -436,6 +443,7 @@ This endpoint Refreshes all the Metadata of the library.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-refresh-library-metadata" method="get" path="/library/sections/{sectionKey}/refresh" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -498,6 +506,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-search-library" method="get" path="/library/sections/{sectionKey}/search" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -543,6 +552,7 @@ Retrieves a list of all the genres that are found for the media in this library.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-genres-library" method="get" path="/library/sections/{sectionKey}/genre" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -588,6 +598,7 @@ Retrieves a list of all the countries that are found for the media in this libra
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-countries-library" method="get" path="/library/sections/{sectionKey}/country" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -633,6 +644,7 @@ Retrieves a list of all the actors that are found for the media in this library.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-actors-library" method="get" path="/library/sections/{sectionKey}/actor" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -678,6 +690,7 @@ Search the provided query across all library sections, or a single section, and
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-search-all-libraries" method="get" path="/library/search" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -731,6 +744,7 @@ Multiple rating keys can be provided as a comma-separated list (e.g., "21119,216
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-media-meta-data" method="get" path="/library/metadata/{ratingKey}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -788,6 +802,7 @@ Returns the background artwork for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-media-arts" method="get" path="/library/metadata/{ratingKey}/arts" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -828,6 +843,7 @@ Uploads an image to use as the background artwork for a library item, either fro
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="post-media-arts" method="post" path="/library/metadata/{ratingKey}/arts" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -870,6 +886,7 @@ Returns the available posters for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-media-posters" method="get" path="/library/metadata/{ratingKey}/posters" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -910,6 +927,7 @@ Uploads a poster to a library item, either from a local file or a remote URL
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="post-media-poster" method="post" path="/library/metadata/{ratingKey}/posters" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -953,6 +971,7 @@ This endpoint will return the children of of a library item specified with the r
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getMetadataChildren" method="get" path="/library/metadata/{ratingKey}/children" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -997,6 +1016,7 @@ This endpoint will return the top watched content from libraries of a certain ty
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTopWatchedContent" method="get" path="/library/all/top" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
@@ -19,6 +19,7 @@ This endpoint will write a single-line log message, including a level and source
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="logLine" method="get" path="/log" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -85,6 +86,7 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="logMultiLine" method="post" path="/log" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -130,6 +132,7 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="enablePaperTrail" method="get" path="/log/networked" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ This will mark the provided media key as Played.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="markPlayed" method="get" path="/:/scrobble" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -62,6 +63,7 @@ This will mark the provided media key as Unplayed.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="markUnplayed" method="get" path="/:/unscrobble" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -105,6 +107,7 @@ This API command can be used to update the play progress of a media item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="updatePlayProgress" method="post" path="/:/progress" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -149,6 +152,7 @@ Gets the banner image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-banner-image" method="get" path="/library/metadata/{ratingKey}/banner" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -198,6 +202,7 @@ Gets the thumbnail image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-thumb-image" method="get" path="/library/metadata/{ratingKey}/thumb" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="createPlaylist" method="post" path="/playlists" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -78,6 +79,7 @@ Get All Playlists given the specified filters.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getPlaylists" method="get" path="/playlists" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -123,6 +125,7 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getPlaylist" method="get" path="/playlists/{playlistID}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -166,6 +169,7 @@ This endpoint will delete a playlist
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="deletePlaylist" method="delete" path="/playlists/{playlistID}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -209,6 +213,7 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="updatePlaylist" method="put" path="/playlists/{playlistID}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -257,6 +262,7 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getPlaylistContents" method="get" path="/playlists/{playlistID}/items" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -302,6 +308,7 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="clearPlaylistContents" method="delete" path="/playlists/{playlistID}/items" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -346,6 +353,7 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="addPlaylistContents" method="put" path="/playlists/{playlistID}/items" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -391,6 +399,7 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="uploadPlaylist" method="post" path="/playlists/upload" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
@@ -22,6 +22,7 @@ Get Companions Data
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getCompanionsData" method="get" path="/companions" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -64,6 +65,7 @@ Get friends of provided auth token.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getUserFriends" method="get" path="/friends" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -106,6 +108,7 @@ Returns the geolocation and locale data of the caller
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getGeoData" method="get" path="/geoip" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -146,6 +149,7 @@ Retrieves the home data for the authenticated user, including details like home
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getHomeData" method="get" path="/home" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -187,6 +191,7 @@ Get Plex server access tokens and server connections
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-server-resources" method="get" path="/resources" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -234,6 +239,7 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getPin" method="post" path="/pins" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -280,6 +286,7 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTokenByPinId" method="get" path="/pins/{pinID}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ This request is intended to be very fast, and called as the user types.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="performSearch" method="get" path="/hubs/search" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -78,6 +79,7 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="performVoiceSearch" method="get" path="/hubs/search/voice" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -122,6 +124,7 @@ This will search the database for the string provided.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getSearchResults" method="get" path="/search" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ Get Server Capabilities
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getServerCapabilities" method="get" path="/" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -65,6 +66,7 @@ Get Server Preferences
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getServerPreferences" method="get" path="/:/prefs" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -106,6 +108,7 @@ Get Available Clients
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getAvailableClients" method="get" path="/clients" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -147,6 +150,7 @@ Get Devices
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getDevices" method="get" path="/devices" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -188,6 +192,7 @@ This request is useful to determine if the server is online or offline
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-server-identity" method="get" path="/identity" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -226,6 +231,7 @@ Returns MyPlex Account Information
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getMyPlexAccount" method="get" path="/myplex/account" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -268,6 +274,7 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getResizedPhoto" method="get" path="/photo/:/transcode" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -318,6 +325,7 @@ Retrieves media providers and their features from the Plex server.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-media-providers" method="get" path="/media/providers" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -360,6 +368,7 @@ Get Server List
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getServerList" method="get" path="/servers" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getSessions" method="get" path="/status/sessions" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -60,6 +61,7 @@ This will Retrieve a listing of all history views.
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getSessionHistory" method="get" path="/status/sessions/history/all" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -105,6 +107,7 @@ Get Transcode Sessions
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTranscodeSessions" method="get" path="/transcode/sessions" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -146,6 +149,7 @@ Stop a Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="stopTranscodeSession" method="delete" path="/transcode/sessions/{sessionKey}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ This will return the media statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getStatistics" method="get" path="/statistics/media" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -60,6 +61,7 @@ This will return the resources for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getResourcesStatistics" method="get" path="/statistics/resources" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -102,6 +104,7 @@ This will return the bandwidth statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getBandwidthStatistics" method="get" path="/statistics/bandwidth" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ Querying status of updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getUpdateStatus" method="get" path="/updater/status" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
@@ -60,6 +61,7 @@ Checking for updates
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="checkForUpdates" method="put" path="/updater/check" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -104,6 +106,7 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="applyUpdates" method="put" path="/updater/apply" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
@@ -13,6 +13,7 @@ Get list of all users that are friends and have library access with the provided
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-users" method="get" path="/users" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ Get the timeline for a media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="getTimeline" method="get" path="/:/timeline" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
@@ -71,6 +72,7 @@ Begin a Universal Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="startUniversalTranscode" method="get" path="/video/:/transcode/universal/start.mpd" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Get User Watchlist
|
||||
|
||||
### Example Usage
|
||||
|
||||
<!-- UsageSnippet language="python" operationID="get-watch-list" method="get" path="/library/sections/watchlist/{filter}" -->
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "plex-api-client"
|
||||
version = "0.28.2"
|
||||
version = "0.29.0"
|
||||
description = "Python Client SDK Generated by Speakeasy"
|
||||
authors = [{ name = "Speakeasy" },]
|
||||
readme = "README-PYPI.md"
|
||||
@@ -38,6 +38,8 @@ pythonpath = ["src"]
|
||||
|
||||
[tool.mypy]
|
||||
disable_error_code = "misc"
|
||||
explicit_package_bases = true
|
||||
mypy_path = "src"
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "typing_inspect"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "plex-api-client"
|
||||
__version__: str = "0.28.2"
|
||||
__version__: str = "0.29.0"
|
||||
__openapi_doc_version__: str = "0.0.3"
|
||||
__gen_version__: str = "2.623.4"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.28.2 2.623.4 0.0.3 plex-api-client"
|
||||
__gen_version__: str = "2.674.1"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.29.0 2.674.1 0.0.3 plex-api-client"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
@@ -85,44 +86,33 @@ class Activities(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetServerActivitiesResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetServerActivitiesResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetServerActivitiesResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetServerActivitiesBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetServerActivitiesBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetServerActivitiesBadRequest(data=response_data)
|
||||
raise errors.GetServerActivitiesBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetServerActivitiesUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetServerActivitiesUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetServerActivitiesUnauthorized(data=response_data)
|
||||
raise errors.GetServerActivitiesUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_server_activities_async(
|
||||
self,
|
||||
@@ -190,44 +180,33 @@ class Activities(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetServerActivitiesResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetServerActivitiesResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetServerActivitiesResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetServerActivitiesBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetServerActivitiesBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetServerActivitiesBadRequest(data=response_data)
|
||||
raise errors.GetServerActivitiesBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetServerActivitiesUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetServerActivitiesUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetServerActivitiesUnauthorized(data=response_data)
|
||||
raise errors.GetServerActivitiesUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def cancel_server_activities(
|
||||
self,
|
||||
@@ -307,36 +286,25 @@ class Activities(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.CancelServerActivitiesBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.CancelServerActivitiesBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.CancelServerActivitiesBadRequest(data=response_data)
|
||||
raise errors.CancelServerActivitiesBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.CancelServerActivitiesUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.CancelServerActivitiesUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.CancelServerActivitiesUnauthorized(data=response_data)
|
||||
raise errors.CancelServerActivitiesUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def cancel_server_activities_async(
|
||||
self,
|
||||
@@ -416,33 +384,22 @@ class Activities(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.CancelServerActivitiesBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.CancelServerActivitiesBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.CancelServerActivitiesBadRequest(data=response_data)
|
||||
raise errors.CancelServerActivitiesBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.CancelServerActivitiesUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.CancelServerActivitiesUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.CancelServerActivitiesUnauthorized(data=response_data)
|
||||
raise errors.CancelServerActivitiesUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import BaseModel, OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional, Union, cast
|
||||
|
||||
|
||||
@@ -93,36 +94,25 @@ class Authentication(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTransientTokenBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTransientTokenBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTransientTokenBadRequest(data=response_data)
|
||||
raise errors.GetTransientTokenBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTransientTokenUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTransientTokenUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTransientTokenUnauthorized(data=response_data)
|
||||
raise errors.GetTransientTokenUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_transient_token_async(
|
||||
self,
|
||||
@@ -206,36 +196,25 @@ class Authentication(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTransientTokenBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTransientTokenBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTransientTokenBadRequest(data=response_data)
|
||||
raise errors.GetTransientTokenBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTransientTokenUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTransientTokenUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTransientTokenUnauthorized(data=response_data)
|
||||
raise errors.GetTransientTokenUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def get_source_connection_information(
|
||||
self,
|
||||
@@ -317,36 +296,29 @@ class Authentication(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetSourceConnectionInformationBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetSourceConnectionInformationBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetSourceConnectionInformationBadRequest(data=response_data)
|
||||
raise errors.GetSourceConnectionInformationBadRequest(
|
||||
response_data, http_res
|
||||
)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetSourceConnectionInformationUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetSourceConnectionInformationUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetSourceConnectionInformationUnauthorized(data=response_data)
|
||||
raise errors.GetSourceConnectionInformationUnauthorized(
|
||||
response_data, http_res
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_source_connection_information_async(
|
||||
self,
|
||||
@@ -428,36 +400,29 @@ class Authentication(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetSourceConnectionInformationBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetSourceConnectionInformationBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetSourceConnectionInformationBadRequest(data=response_data)
|
||||
raise errors.GetSourceConnectionInformationBadRequest(
|
||||
response_data, http_res
|
||||
)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetSourceConnectionInformationUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetSourceConnectionInformationUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetSourceConnectionInformationUnauthorized(data=response_data)
|
||||
raise errors.GetSourceConnectionInformationUnauthorized(
|
||||
response_data, http_res
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def get_token_details(
|
||||
self,
|
||||
@@ -525,44 +490,33 @@ class Authentication(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetTokenDetailsResponse(
|
||||
user_plex_account=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetTokenDetailsUserPlexAccount]
|
||||
user_plex_account=unmarshal_json_response(
|
||||
Optional[operations.GetTokenDetailsUserPlexAccount], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTokenDetailsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTokenDetailsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTokenDetailsBadRequest(data=response_data)
|
||||
raise errors.GetTokenDetailsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTokenDetailsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTokenDetailsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTokenDetailsUnauthorized(data=response_data)
|
||||
raise errors.GetTokenDetailsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_token_details_async(
|
||||
self,
|
||||
@@ -630,44 +584,33 @@ class Authentication(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetTokenDetailsResponse(
|
||||
user_plex_account=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetTokenDetailsUserPlexAccount]
|
||||
user_plex_account=unmarshal_json_response(
|
||||
Optional[operations.GetTokenDetailsUserPlexAccount], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTokenDetailsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTokenDetailsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTokenDetailsBadRequest(data=response_data)
|
||||
raise errors.GetTokenDetailsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetTokenDetailsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetTokenDetailsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetTokenDetailsUnauthorized(data=response_data)
|
||||
raise errors.GetTokenDetailsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def post_users_sign_in_data(
|
||||
self,
|
||||
@@ -751,45 +694,33 @@ class Authentication(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "201", "application/json"):
|
||||
return operations.PostUsersSignInDataResponse(
|
||||
user_plex_account=utils.unmarshal_json(
|
||||
http_res.text,
|
||||
Optional[operations.PostUsersSignInDataUserPlexAccount],
|
||||
user_plex_account=unmarshal_json_response(
|
||||
Optional[operations.PostUsersSignInDataUserPlexAccount], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.PostUsersSignInDataBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.PostUsersSignInDataBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.PostUsersSignInDataBadRequest(data=response_data)
|
||||
raise errors.PostUsersSignInDataBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.PostUsersSignInDataUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.PostUsersSignInDataUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.PostUsersSignInDataUnauthorized(data=response_data)
|
||||
raise errors.PostUsersSignInDataUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def post_users_sign_in_data_async(
|
||||
self,
|
||||
@@ -873,42 +804,30 @@ class Authentication(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "201", "application/json"):
|
||||
return operations.PostUsersSignInDataResponse(
|
||||
user_plex_account=utils.unmarshal_json(
|
||||
http_res.text,
|
||||
Optional[operations.PostUsersSignInDataUserPlexAccount],
|
||||
user_plex_account=unmarshal_json_response(
|
||||
Optional[operations.PostUsersSignInDataUserPlexAccount], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.PostUsersSignInDataBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.PostUsersSignInDataBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.PostUsersSignInDataBadRequest(data=response_data)
|
||||
raise errors.PostUsersSignInDataBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.PostUsersSignInDataUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.PostUsersSignInDataUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.PostUsersSignInDataUnauthorized(data=response_data)
|
||||
raise errors.PostUsersSignInDataUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
@@ -245,7 +245,7 @@ class BaseSDK:
|
||||
|
||||
if http_res is None:
|
||||
logger.debug("Raising no response SDK error")
|
||||
raise errors.SDKError("No response received")
|
||||
raise errors.NoResponseError("No response received")
|
||||
|
||||
logger.debug(
|
||||
"Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
||||
@@ -266,7 +266,7 @@ class BaseSDK:
|
||||
http_res = result
|
||||
else:
|
||||
logger.debug("Raising unexpected SDK error")
|
||||
raise errors.SDKError("Unexpected error occurred")
|
||||
raise errors.SDKError("Unexpected error occurred", http_res)
|
||||
|
||||
return http_res
|
||||
|
||||
@@ -317,7 +317,7 @@ class BaseSDK:
|
||||
|
||||
if http_res is None:
|
||||
logger.debug("Raising no response SDK error")
|
||||
raise errors.SDKError("No response received")
|
||||
raise errors.NoResponseError("No response received")
|
||||
|
||||
logger.debug(
|
||||
"Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
||||
@@ -338,7 +338,7 @@ class BaseSDK:
|
||||
http_res = result
|
||||
else:
|
||||
logger.debug("Raising unexpected SDK error")
|
||||
raise errors.SDKError("Unexpected error occurred")
|
||||
raise errors.SDKError("Unexpected error occurred", http_res)
|
||||
|
||||
return http_res
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
@@ -77,44 +78,33 @@ class Butler(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetButlerTasksResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetButlerTasksResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetButlerTasksResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetButlerTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetButlerTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetButlerTasksBadRequest(data=response_data)
|
||||
raise errors.GetButlerTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetButlerTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetButlerTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetButlerTasksUnauthorized(data=response_data)
|
||||
raise errors.GetButlerTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_butler_tasks_async(
|
||||
self,
|
||||
@@ -182,44 +172,33 @@ class Butler(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetButlerTasksResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetButlerTasksResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetButlerTasksResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetButlerTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetButlerTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetButlerTasksBadRequest(data=response_data)
|
||||
raise errors.GetButlerTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetButlerTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetButlerTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetButlerTasksUnauthorized(data=response_data)
|
||||
raise errors.GetButlerTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def start_all_tasks(
|
||||
self,
|
||||
@@ -297,36 +276,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartAllTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartAllTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartAllTasksBadRequest(data=response_data)
|
||||
raise errors.StartAllTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartAllTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartAllTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartAllTasksUnauthorized(data=response_data)
|
||||
raise errors.StartAllTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def start_all_tasks_async(
|
||||
self,
|
||||
@@ -404,36 +372,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartAllTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartAllTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartAllTasksBadRequest(data=response_data)
|
||||
raise errors.StartAllTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartAllTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartAllTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartAllTasksUnauthorized(data=response_data)
|
||||
raise errors.StartAllTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def stop_all_tasks(
|
||||
self,
|
||||
@@ -507,36 +464,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopAllTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopAllTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopAllTasksBadRequest(data=response_data)
|
||||
raise errors.StopAllTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopAllTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopAllTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopAllTasksUnauthorized(data=response_data)
|
||||
raise errors.StopAllTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def stop_all_tasks_async(
|
||||
self,
|
||||
@@ -610,36 +556,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopAllTasksBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopAllTasksBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopAllTasksBadRequest(data=response_data)
|
||||
raise errors.StopAllTasksBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopAllTasksUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopAllTasksUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopAllTasksUnauthorized(data=response_data)
|
||||
raise errors.StopAllTasksUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def start_task(
|
||||
self,
|
||||
@@ -724,36 +659,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartTaskBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartTaskBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartTaskBadRequest(data=response_data)
|
||||
raise errors.StartTaskBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartTaskUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartTaskUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartTaskUnauthorized(data=response_data)
|
||||
raise errors.StartTaskUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def start_task_async(
|
||||
self,
|
||||
@@ -838,36 +762,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartTaskBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartTaskBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartTaskBadRequest(data=response_data)
|
||||
raise errors.StartTaskBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StartTaskUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StartTaskUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StartTaskUnauthorized(data=response_data)
|
||||
raise errors.StartTaskUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def stop_task(
|
||||
self,
|
||||
@@ -948,36 +861,25 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopTaskBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopTaskBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopTaskBadRequest(data=response_data)
|
||||
raise errors.StopTaskBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopTaskUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopTaskUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopTaskUnauthorized(data=response_data)
|
||||
raise errors.StopTaskUnauthorized(response_data, http_res)
|
||||
if utils.match_response(http_res, ["404", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def stop_task_async(
|
||||
self,
|
||||
@@ -1058,33 +960,22 @@ class Butler(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopTaskBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopTaskBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopTaskBadRequest(data=response_data)
|
||||
raise errors.StopTaskBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.StopTaskUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.StopTaskUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.StopTaskUnauthorized(data=response_data)
|
||||
raise errors.StopTaskUnauthorized(response_data, http_res)
|
||||
if utils.match_response(http_res, ["404", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import BaseModel, OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional, Union, cast
|
||||
|
||||
|
||||
@@ -87,44 +88,33 @@ class Hubs(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetGlobalHubsResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetGlobalHubsResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetGlobalHubsResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetGlobalHubsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetGlobalHubsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetGlobalHubsBadRequest(data=response_data)
|
||||
raise errors.GetGlobalHubsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetGlobalHubsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetGlobalHubsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetGlobalHubsUnauthorized(data=response_data)
|
||||
raise errors.GetGlobalHubsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_global_hubs_async(
|
||||
self,
|
||||
@@ -202,44 +192,33 @@ class Hubs(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetGlobalHubsResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetGlobalHubsResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetGlobalHubsResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetGlobalHubsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetGlobalHubsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetGlobalHubsBadRequest(data=response_data)
|
||||
raise errors.GetGlobalHubsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetGlobalHubsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetGlobalHubsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetGlobalHubsUnauthorized(data=response_data)
|
||||
raise errors.GetGlobalHubsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def get_recently_added(
|
||||
self,
|
||||
@@ -317,8 +296,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetRecentlyAddedResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetRecentlyAddedResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetRecentlyAddedResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
@@ -326,23 +305,12 @@ class Hubs(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, ["400", "401", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_recently_added_async(
|
||||
self,
|
||||
@@ -420,8 +388,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetRecentlyAddedResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetRecentlyAddedResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetRecentlyAddedResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
@@ -429,23 +397,12 @@ class Hubs(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, ["400", "401", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def get_library_hubs(
|
||||
self,
|
||||
@@ -527,44 +484,33 @@ class Hubs(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetLibraryHubsResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetLibraryHubsResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetLibraryHubsResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetLibraryHubsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetLibraryHubsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetLibraryHubsBadRequest(data=response_data)
|
||||
raise errors.GetLibraryHubsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetLibraryHubsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetLibraryHubsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetLibraryHubsUnauthorized(data=response_data)
|
||||
raise errors.GetLibraryHubsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def get_library_hubs_async(
|
||||
self,
|
||||
@@ -646,41 +592,30 @@ class Hubs(BaseSDK):
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return operations.GetLibraryHubsResponse(
|
||||
object=utils.unmarshal_json(
|
||||
http_res.text, Optional[operations.GetLibraryHubsResponseBody]
|
||||
object=unmarshal_json_response(
|
||||
Optional[operations.GetLibraryHubsResponseBody], http_res
|
||||
),
|
||||
status_code=http_res.status_code,
|
||||
content_type=http_res.headers.get("Content-Type") or "",
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetLibraryHubsBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetLibraryHubsBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetLibraryHubsBadRequest(data=response_data)
|
||||
raise errors.GetLibraryHubsBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.GetLibraryHubsUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetLibraryHubsUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetLibraryHubsUnauthorized(data=response_data)
|
||||
raise errors.GetLibraryHubsUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
@@ -96,36 +97,25 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogLineBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogLineBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogLineBadRequest(data=response_data)
|
||||
raise errors.LogLineBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogLineUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogLineUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogLineUnauthorized(data=response_data)
|
||||
raise errors.LogLineUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def log_line_async(
|
||||
self,
|
||||
@@ -212,36 +202,25 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogLineBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogLineBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogLineBadRequest(data=response_data)
|
||||
raise errors.LogLineBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogLineUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogLineUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogLineUnauthorized(data=response_data)
|
||||
raise errors.LogLineUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def log_multi_line(
|
||||
self,
|
||||
@@ -341,36 +320,25 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogMultiLineBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogMultiLineBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogMultiLineBadRequest(data=response_data)
|
||||
raise errors.LogMultiLineBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogMultiLineUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogMultiLineUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogMultiLineUnauthorized(data=response_data)
|
||||
raise errors.LogMultiLineUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def log_multi_line_async(
|
||||
self,
|
||||
@@ -470,36 +438,25 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogMultiLineBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogMultiLineBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogMultiLineBadRequest(data=response_data)
|
||||
raise errors.LogMultiLineBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.LogMultiLineUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.LogMultiLineUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.LogMultiLineUnauthorized(data=response_data)
|
||||
raise errors.LogMultiLineUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def enable_paper_trail(
|
||||
self,
|
||||
@@ -573,36 +530,25 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.EnablePaperTrailBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.EnablePaperTrailBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.EnablePaperTrailBadRequest(data=response_data)
|
||||
raise errors.EnablePaperTrailBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.EnablePaperTrailUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.EnablePaperTrailUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.EnablePaperTrailUnauthorized(data=response_data)
|
||||
raise errors.EnablePaperTrailUnauthorized(response_data, http_res)
|
||||
if utils.match_response(http_res, ["403", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def enable_paper_trail_async(
|
||||
self,
|
||||
@@ -676,33 +622,22 @@ class Log(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.EnablePaperTrailBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.EnablePaperTrailBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.EnablePaperTrailBadRequest(data=response_data)
|
||||
raise errors.EnablePaperTrailBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.EnablePaperTrailUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.EnablePaperTrailUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.EnablePaperTrailUnauthorized(data=response_data)
|
||||
raise errors.EnablePaperTrailUnauthorized(response_data, http_res)
|
||||
if utils.match_response(http_res, ["403", "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
@@ -5,6 +5,7 @@ from plex_api_client import utils
|
||||
from plex_api_client._hooks import HookContext
|
||||
from plex_api_client.models import errors, operations
|
||||
from plex_api_client.types import BaseModel, OptionalNullable, UNSET
|
||||
from plex_api_client.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, Mapping, Optional, Union, cast
|
||||
|
||||
|
||||
@@ -89,36 +90,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkPlayedBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkPlayedBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkPlayedBadRequest(data=response_data)
|
||||
raise errors.MarkPlayedBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkPlayedUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkPlayedUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkPlayedUnauthorized(data=response_data)
|
||||
raise errors.MarkPlayedUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def mark_played_async(
|
||||
self,
|
||||
@@ -198,36 +188,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkPlayedBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkPlayedBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkPlayedBadRequest(data=response_data)
|
||||
raise errors.MarkPlayedBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkPlayedUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkPlayedUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkPlayedUnauthorized(data=response_data)
|
||||
raise errors.MarkPlayedUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def mark_unplayed(
|
||||
self,
|
||||
@@ -307,36 +286,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkUnplayedBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkUnplayedBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkUnplayedBadRequest(data=response_data)
|
||||
raise errors.MarkUnplayedBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkUnplayedUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkUnplayedUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkUnplayedUnauthorized(data=response_data)
|
||||
raise errors.MarkUnplayedUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def mark_unplayed_async(
|
||||
self,
|
||||
@@ -416,36 +384,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkUnplayedBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkUnplayedBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkUnplayedBadRequest(data=response_data)
|
||||
raise errors.MarkUnplayedBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.MarkUnplayedUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.MarkUnplayedUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.MarkUnplayedUnauthorized(data=response_data)
|
||||
raise errors.MarkUnplayedUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def update_play_progress(
|
||||
self,
|
||||
@@ -532,36 +489,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.UpdatePlayProgressBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.UpdatePlayProgressBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.UpdatePlayProgressBadRequest(data=response_data)
|
||||
raise errors.UpdatePlayProgressBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.UpdatePlayProgressUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.UpdatePlayProgressUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.UpdatePlayProgressUnauthorized(data=response_data)
|
||||
raise errors.UpdatePlayProgressUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
async def update_play_progress_async(
|
||||
self,
|
||||
@@ -648,36 +594,25 @@ class Media(BaseSDK):
|
||||
raw_response=http_res,
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.UpdatePlayProgressBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.UpdatePlayProgressBadRequestData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.UpdatePlayProgressBadRequest(data=response_data)
|
||||
raise errors.UpdatePlayProgressBadRequest(response_data, http_res)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res.text, errors.UpdatePlayProgressUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.UpdatePlayProgressUnauthorizedData, http_res
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.UpdatePlayProgressUnauthorized(data=response_data)
|
||||
raise errors.UpdatePlayProgressUnauthorized(response_data, http_res)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res)
|
||||
|
||||
def get_banner_image(
|
||||
self,
|
||||
@@ -763,37 +698,31 @@ class Media(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetBannerImageBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetBannerImageBadRequestData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetBannerImageBadRequest(data=response_data)
|
||||
raise errors.GetBannerImageBadRequest(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetBannerImageUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetBannerImageUnauthorizedData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetBannerImageUnauthorized(data=response_data)
|
||||
raise errors.GetBannerImageUnauthorized(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res, http_res_text)
|
||||
|
||||
async def get_banner_image_async(
|
||||
self,
|
||||
@@ -879,37 +808,31 @@ class Media(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetBannerImageBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetBannerImageBadRequestData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetBannerImageBadRequest(data=response_data)
|
||||
raise errors.GetBannerImageBadRequest(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetBannerImageUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetBannerImageUnauthorizedData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetBannerImageUnauthorized(data=response_data)
|
||||
raise errors.GetBannerImageUnauthorized(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res, http_res_text)
|
||||
|
||||
def get_thumb_image(
|
||||
self,
|
||||
@@ -995,37 +918,29 @@ class Media(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetThumbImageBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetThumbImageBadRequestData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetThumbImageBadRequest(data=response_data)
|
||||
raise errors.GetThumbImageBadRequest(response_data, http_res, http_res_text)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetThumbImageUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetThumbImageUnauthorizedData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetThumbImageUnauthorized(data=response_data)
|
||||
raise errors.GetThumbImageUnauthorized(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res, http_res_text)
|
||||
|
||||
async def get_thumb_image_async(
|
||||
self,
|
||||
@@ -1111,34 +1026,26 @@ class Media(BaseSDK):
|
||||
)
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetThumbImageBadRequestData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetThumbImageBadRequestData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetThumbImageBadRequest(data=response_data)
|
||||
raise errors.GetThumbImageBadRequest(response_data, http_res, http_res_text)
|
||||
if utils.match_response(http_res, "401", "application/json"):
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
response_data = utils.unmarshal_json(
|
||||
http_res_text, errors.GetThumbImageUnauthorizedData
|
||||
response_data = unmarshal_json_response(
|
||||
errors.GetThumbImageUnauthorizedData, http_res, http_res_text
|
||||
)
|
||||
response_data.raw_response = http_res
|
||||
raise errors.GetThumbImageUnauthorized(data=response_data)
|
||||
raise errors.GetThumbImageUnauthorized(
|
||||
response_data, http_res, http_res_text
|
||||
)
|
||||
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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
if utils.match_response(http_res, "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
|
||||
)
|
||||
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
||||
|
||||
content_type = http_res.headers.get("Content-Type")
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
raise errors.SDKError(
|
||||
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
||||
http_res.status_code,
|
||||
http_res_text,
|
||||
http_res,
|
||||
)
|
||||
raise errors.SDKError("Unexpected response received", http_res, http_res_text)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from importlib import import_module
|
||||
import builtins
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .security import Security, SecurityTypedDict
|
||||
@@ -36,5 +37,5 @@ def __getattr__(attr_name: str) -> object:
|
||||
|
||||
|
||||
def __dir__():
|
||||
lazy_attrs = list(_dynamic_imports.keys())
|
||||
return sorted(lazy_attrs)
|
||||
lazy_attrs = builtins.list(_dynamic_imports.keys())
|
||||
return builtins.sorted(lazy_attrs)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from importlib import import_module
|
||||
import builtins
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .addplaylistcontents import (
|
||||
@@ -664,6 +665,7 @@ if TYPE_CHECKING:
|
||||
MarkUnplayedUnauthorized,
|
||||
MarkUnplayedUnauthorizedData,
|
||||
)
|
||||
from .no_response_error import NoResponseError
|
||||
from .performsearch import (
|
||||
PerformSearchBadRequest,
|
||||
PerformSearchBadRequestData,
|
||||
@@ -684,6 +686,7 @@ if TYPE_CHECKING:
|
||||
PerformVoiceSearchUnauthorized,
|
||||
PerformVoiceSearchUnauthorizedData,
|
||||
)
|
||||
from .plexapierror import PlexAPIError
|
||||
from .post_users_sign_in_data import (
|
||||
PostUsersSignInDataAuthenticationErrors,
|
||||
PostUsersSignInDataAuthenticationErrorsTypedDict,
|
||||
@@ -694,6 +697,7 @@ if TYPE_CHECKING:
|
||||
PostUsersSignInDataUnauthorized,
|
||||
PostUsersSignInDataUnauthorizedData,
|
||||
)
|
||||
from .responsevalidationerror import ResponseValidationError
|
||||
from .sdkerror import SDKError
|
||||
from .startalltasks import (
|
||||
StartAllTasksBadRequest,
|
||||
@@ -1313,6 +1317,7 @@ __all__ = [
|
||||
"MarkUnplayedMediaErrorsTypedDict",
|
||||
"MarkUnplayedUnauthorized",
|
||||
"MarkUnplayedUnauthorizedData",
|
||||
"NoResponseError",
|
||||
"PerformSearchBadRequest",
|
||||
"PerformSearchBadRequestData",
|
||||
"PerformSearchErrors",
|
||||
@@ -1329,6 +1334,7 @@ __all__ = [
|
||||
"PerformVoiceSearchSearchErrorsTypedDict",
|
||||
"PerformVoiceSearchUnauthorized",
|
||||
"PerformVoiceSearchUnauthorizedData",
|
||||
"PlexAPIError",
|
||||
"PostUsersSignInDataAuthenticationErrors",
|
||||
"PostUsersSignInDataAuthenticationErrorsTypedDict",
|
||||
"PostUsersSignInDataBadRequest",
|
||||
@@ -1337,6 +1343,7 @@ __all__ = [
|
||||
"PostUsersSignInDataErrorsTypedDict",
|
||||
"PostUsersSignInDataUnauthorized",
|
||||
"PostUsersSignInDataUnauthorizedData",
|
||||
"ResponseValidationError",
|
||||
"SDKError",
|
||||
"StartAllTasksBadRequest",
|
||||
"StartAllTasksBadRequestData",
|
||||
@@ -1939,6 +1946,7 @@ _dynamic_imports: dict[str, str] = {
|
||||
"MarkUnplayedMediaErrorsTypedDict": ".markunplayed",
|
||||
"MarkUnplayedUnauthorized": ".markunplayed",
|
||||
"MarkUnplayedUnauthorizedData": ".markunplayed",
|
||||
"NoResponseError": ".no_response_error",
|
||||
"PerformSearchBadRequest": ".performsearch",
|
||||
"PerformSearchBadRequestData": ".performsearch",
|
||||
"PerformSearchErrors": ".performsearch",
|
||||
@@ -1955,6 +1963,7 @@ _dynamic_imports: dict[str, str] = {
|
||||
"PerformVoiceSearchSearchErrorsTypedDict": ".performvoicesearch",
|
||||
"PerformVoiceSearchUnauthorized": ".performvoicesearch",
|
||||
"PerformVoiceSearchUnauthorizedData": ".performvoicesearch",
|
||||
"PlexAPIError": ".plexapierror",
|
||||
"PostUsersSignInDataAuthenticationErrors": ".post_users_sign_in_data",
|
||||
"PostUsersSignInDataAuthenticationErrorsTypedDict": ".post_users_sign_in_data",
|
||||
"PostUsersSignInDataBadRequest": ".post_users_sign_in_data",
|
||||
@@ -1963,6 +1972,7 @@ _dynamic_imports: dict[str, str] = {
|
||||
"PostUsersSignInDataErrorsTypedDict": ".post_users_sign_in_data",
|
||||
"PostUsersSignInDataUnauthorized": ".post_users_sign_in_data",
|
||||
"PostUsersSignInDataUnauthorizedData": ".post_users_sign_in_data",
|
||||
"ResponseValidationError": ".responsevalidationerror",
|
||||
"SDKError": ".sdkerror",
|
||||
"StartAllTasksBadRequest": ".startalltasks",
|
||||
"StartAllTasksBadRequestData": ".startalltasks",
|
||||
@@ -2061,5 +2071,5 @@ def __getattr__(attr_name: str) -> object:
|
||||
|
||||
|
||||
def __dir__():
|
||||
lazy_attrs = list(_dynamic_imports.keys())
|
||||
return sorted(lazy_attrs)
|
||||
lazy_attrs = builtins.list(_dynamic_imports.keys())
|
||||
return builtins.sorted(lazy_attrs)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class AddPlaylistContentsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class AddPlaylistContentsUnauthorized(Exception):
|
||||
class AddPlaylistContentsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: AddPlaylistContentsUnauthorizedData
|
||||
|
||||
def __init__(self, data: AddPlaylistContentsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: AddPlaylistContentsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, AddPlaylistContentsUnauthorizedData)
|
||||
|
||||
|
||||
class AddPlaylistContentsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class AddPlaylistContentsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class AddPlaylistContentsBadRequest(Exception):
|
||||
class AddPlaylistContentsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: AddPlaylistContentsBadRequestData
|
||||
|
||||
def __init__(self, data: AddPlaylistContentsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: AddPlaylistContentsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, AddPlaylistContentsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class ApplyUpdatesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class ApplyUpdatesUnauthorized(Exception):
|
||||
class ApplyUpdatesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: ApplyUpdatesUnauthorizedData
|
||||
|
||||
def __init__(self, data: ApplyUpdatesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: ApplyUpdatesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, ApplyUpdatesUnauthorizedData)
|
||||
|
||||
|
||||
class ApplyUpdatesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class ApplyUpdatesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class ApplyUpdatesBadRequest(Exception):
|
||||
class ApplyUpdatesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: ApplyUpdatesBadRequestData
|
||||
|
||||
def __init__(self, data: ApplyUpdatesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: ApplyUpdatesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, ApplyUpdatesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class CancelServerActivitiesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CancelServerActivitiesUnauthorized(Exception):
|
||||
class CancelServerActivitiesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: CancelServerActivitiesUnauthorizedData
|
||||
|
||||
def __init__(self, data: CancelServerActivitiesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CancelServerActivitiesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CancelServerActivitiesUnauthorizedData)
|
||||
|
||||
|
||||
class CancelServerActivitiesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class CancelServerActivitiesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CancelServerActivitiesBadRequest(Exception):
|
||||
class CancelServerActivitiesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: CancelServerActivitiesBadRequestData
|
||||
|
||||
def __init__(self, data: CancelServerActivitiesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CancelServerActivitiesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CancelServerActivitiesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class CheckForUpdatesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CheckForUpdatesUnauthorized(Exception):
|
||||
class CheckForUpdatesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: CheckForUpdatesUnauthorizedData
|
||||
|
||||
def __init__(self, data: CheckForUpdatesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CheckForUpdatesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CheckForUpdatesUnauthorizedData)
|
||||
|
||||
|
||||
class CheckForUpdatesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class CheckForUpdatesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CheckForUpdatesBadRequest(Exception):
|
||||
class CheckForUpdatesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: CheckForUpdatesBadRequestData
|
||||
|
||||
def __init__(self, data: CheckForUpdatesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CheckForUpdatesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CheckForUpdatesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class ClearPlaylistContentsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class ClearPlaylistContentsUnauthorized(Exception):
|
||||
class ClearPlaylistContentsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: ClearPlaylistContentsUnauthorizedData
|
||||
|
||||
def __init__(self, data: ClearPlaylistContentsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: ClearPlaylistContentsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, ClearPlaylistContentsUnauthorizedData)
|
||||
|
||||
|
||||
class ClearPlaylistContentsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class ClearPlaylistContentsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class ClearPlaylistContentsBadRequest(Exception):
|
||||
class ClearPlaylistContentsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: ClearPlaylistContentsBadRequestData
|
||||
|
||||
def __init__(self, data: ClearPlaylistContentsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: ClearPlaylistContentsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, ClearPlaylistContentsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class CreatePlaylistUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CreatePlaylistUnauthorized(Exception):
|
||||
class CreatePlaylistUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: CreatePlaylistUnauthorizedData
|
||||
|
||||
def __init__(self, data: CreatePlaylistUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CreatePlaylistUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CreatePlaylistUnauthorizedData)
|
||||
|
||||
|
||||
class CreatePlaylistErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class CreatePlaylistBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class CreatePlaylistBadRequest(Exception):
|
||||
class CreatePlaylistBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: CreatePlaylistBadRequestData
|
||||
|
||||
def __init__(self, data: CreatePlaylistBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: CreatePlaylistBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, CreatePlaylistBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class DeleteLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class DeleteLibraryUnauthorized(Exception):
|
||||
class DeleteLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: DeleteLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: DeleteLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: DeleteLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, DeleteLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class DeleteLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class DeleteLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class DeleteLibraryBadRequest(Exception):
|
||||
class DeleteLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: DeleteLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: DeleteLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: DeleteLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, DeleteLibraryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class DeletePlaylistUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class DeletePlaylistUnauthorized(Exception):
|
||||
class DeletePlaylistUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: DeletePlaylistUnauthorizedData
|
||||
|
||||
def __init__(self, data: DeletePlaylistUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: DeletePlaylistUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, DeletePlaylistUnauthorizedData)
|
||||
|
||||
|
||||
class DeletePlaylistErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class DeletePlaylistBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class DeletePlaylistBadRequest(Exception):
|
||||
class DeletePlaylistBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: DeletePlaylistBadRequestData
|
||||
|
||||
def __init__(self, data: DeletePlaylistBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: DeletePlaylistBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, DeletePlaylistBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class EnablePaperTrailUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class EnablePaperTrailUnauthorized(Exception):
|
||||
class EnablePaperTrailUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: EnablePaperTrailUnauthorizedData
|
||||
|
||||
def __init__(self, data: EnablePaperTrailUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: EnablePaperTrailUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, EnablePaperTrailUnauthorizedData)
|
||||
|
||||
|
||||
class EnablePaperTrailErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class EnablePaperTrailBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class EnablePaperTrailBadRequest(Exception):
|
||||
class EnablePaperTrailBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: EnablePaperTrailBadRequestData
|
||||
|
||||
def __init__(self, data: EnablePaperTrailBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: EnablePaperTrailBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, EnablePaperTrailBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetActorsLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetActorsLibraryUnauthorized(Exception):
|
||||
class GetActorsLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetActorsLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetActorsLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetActorsLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetActorsLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class GetActorsLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetActorsLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetActorsLibraryBadRequest(Exception):
|
||||
class GetActorsLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetActorsLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: GetActorsLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetActorsLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetActorsLibraryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetAllLibrariesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetAllLibrariesUnauthorized(Exception):
|
||||
class GetAllLibrariesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetAllLibrariesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetAllLibrariesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetAllLibrariesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetAllLibrariesUnauthorizedData)
|
||||
|
||||
|
||||
class GetAllLibrariesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetAllLibrariesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetAllLibrariesBadRequest(Exception):
|
||||
class GetAllLibrariesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetAllLibrariesBadRequestData
|
||||
|
||||
def __init__(self, data: GetAllLibrariesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetAllLibrariesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetAllLibrariesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetBannerImageUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetBannerImageUnauthorized(Exception):
|
||||
class GetBannerImageUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetBannerImageUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetBannerImageUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetBannerImageUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetBannerImageUnauthorizedData)
|
||||
|
||||
|
||||
class GetBannerImageErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetBannerImageBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetBannerImageBadRequest(Exception):
|
||||
class GetBannerImageBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetBannerImageBadRequestData
|
||||
|
||||
def __init__(self, data: GetBannerImageBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetBannerImageBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetBannerImageBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetCountriesLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetCountriesLibraryUnauthorized(Exception):
|
||||
class GetCountriesLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetCountriesLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetCountriesLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetCountriesLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetCountriesLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class GetCountriesLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetCountriesLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetCountriesLibraryBadRequest(Exception):
|
||||
class GetCountriesLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetCountriesLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: GetCountriesLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetCountriesLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetCountriesLibraryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetGenresLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGenresLibraryUnauthorized(Exception):
|
||||
class GetGenresLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetGenresLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetGenresLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGenresLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGenresLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class GetGenresLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetGenresLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGenresLibraryBadRequest(Exception):
|
||||
class GetGenresLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetGenresLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: GetGenresLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGenresLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGenresLibraryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetLibraryDetailsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryDetailsUnauthorized(Exception):
|
||||
class GetLibraryDetailsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetLibraryDetailsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetLibraryDetailsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryDetailsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryDetailsUnauthorizedData)
|
||||
|
||||
|
||||
class GetLibraryDetailsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetLibraryDetailsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryDetailsBadRequest(Exception):
|
||||
class GetLibraryDetailsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetLibraryDetailsBadRequestData
|
||||
|
||||
def __init__(self, data: GetLibraryDetailsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryDetailsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryDetailsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetLibraryItemsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryItemsUnauthorized(Exception):
|
||||
class GetLibraryItemsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetLibraryItemsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetLibraryItemsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryItemsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryItemsUnauthorizedData)
|
||||
|
||||
|
||||
class GetLibraryItemsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetLibraryItemsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryItemsBadRequest(Exception):
|
||||
class GetLibraryItemsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetLibraryItemsBadRequestData
|
||||
|
||||
def __init__(self, data: GetLibraryItemsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryItemsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryItemsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetLibrarySectionsAllUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibrarySectionsAllUnauthorized(Exception):
|
||||
class GetLibrarySectionsAllUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetLibrarySectionsAllUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetLibrarySectionsAllUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibrarySectionsAllUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibrarySectionsAllUnauthorizedData)
|
||||
|
||||
|
||||
class GetLibrarySectionsAllErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetLibrarySectionsAllBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibrarySectionsAllBadRequest(Exception):
|
||||
class GetLibrarySectionsAllBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetLibrarySectionsAllBadRequestData
|
||||
|
||||
def __init__(self, data: GetLibrarySectionsAllBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibrarySectionsAllBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibrarySectionsAllBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetMediaMetaDataUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMediaMetaDataUnauthorized(Exception):
|
||||
class GetMediaMetaDataUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetMediaMetaDataUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetMediaMetaDataUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMediaMetaDataUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMediaMetaDataUnauthorizedData)
|
||||
|
||||
|
||||
class GetMediaMetaDataErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetMediaMetaDataBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMediaMetaDataBadRequest(Exception):
|
||||
class GetMediaMetaDataBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetMediaMetaDataBadRequestData
|
||||
|
||||
def __init__(self, data: GetMediaMetaDataBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMediaMetaDataBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMediaMetaDataBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetMediaProvidersUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMediaProvidersUnauthorized(Exception):
|
||||
class GetMediaProvidersUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetMediaProvidersUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetMediaProvidersUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMediaProvidersUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMediaProvidersUnauthorizedData)
|
||||
|
||||
|
||||
class GetMediaProvidersErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetMediaProvidersBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMediaProvidersBadRequest(Exception):
|
||||
class GetMediaProvidersBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetMediaProvidersBadRequestData
|
||||
|
||||
def __init__(self, data: GetMediaProvidersBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMediaProvidersBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMediaProvidersBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetRecentlyAddedLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetRecentlyAddedLibraryUnauthorized(Exception):
|
||||
class GetRecentlyAddedLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetRecentlyAddedLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetRecentlyAddedLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetRecentlyAddedLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetRecentlyAddedLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class GetRecentlyAddedLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetRecentlyAddedLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetRecentlyAddedLibraryBadRequest(Exception):
|
||||
class GetRecentlyAddedLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetRecentlyAddedLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: GetRecentlyAddedLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetRecentlyAddedLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetRecentlyAddedLibraryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetRefreshLibraryMetadataUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetRefreshLibraryMetadataUnauthorized(Exception):
|
||||
class GetRefreshLibraryMetadataUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetRefreshLibraryMetadataUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetRefreshLibraryMetadataUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetRefreshLibraryMetadataUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetRefreshLibraryMetadataUnauthorizedData)
|
||||
|
||||
|
||||
class GetRefreshLibraryMetadataErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetRefreshLibraryMetadataBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetRefreshLibraryMetadataBadRequest(Exception):
|
||||
class GetRefreshLibraryMetadataBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetRefreshLibraryMetadataBadRequestData
|
||||
|
||||
def __init__(self, data: GetRefreshLibraryMetadataBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetRefreshLibraryMetadataBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetRefreshLibraryMetadataBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetSearchAllLibrariesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchAllLibrariesUnauthorized(Exception):
|
||||
class GetSearchAllLibrariesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSearchAllLibrariesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSearchAllLibrariesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchAllLibrariesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchAllLibrariesUnauthorizedData)
|
||||
|
||||
|
||||
class GetSearchAllLibrariesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetSearchAllLibrariesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchAllLibrariesBadRequest(Exception):
|
||||
class GetSearchAllLibrariesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSearchAllLibrariesBadRequestData
|
||||
|
||||
def __init__(self, data: GetSearchAllLibrariesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchAllLibrariesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchAllLibrariesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetSearchLibraryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchLibraryUnauthorized(Exception):
|
||||
class GetSearchLibraryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSearchLibraryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSearchLibraryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchLibraryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchLibraryUnauthorizedData)
|
||||
|
||||
|
||||
class GetSearchLibraryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetSearchLibraryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchLibraryBadRequest(Exception):
|
||||
class GetSearchLibraryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSearchLibraryBadRequestData
|
||||
|
||||
def __init__(self, data: GetSearchLibraryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchLibraryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchLibraryBadRequestData)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
@@ -19,13 +20,18 @@ class GetServerIdentityRequestTimeoutData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerIdentityRequestTimeout(Exception):
|
||||
class GetServerIdentityRequestTimeout(PlexAPIError):
|
||||
r"""Request Timeout"""
|
||||
|
||||
data: GetServerIdentityRequestTimeoutData
|
||||
|
||||
def __init__(self, data: GetServerIdentityRequestTimeoutData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerIdentityRequestTimeoutData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
fallback = body or raw_response.text
|
||||
message = str(data.message) or fallback
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.data.message if self.data.message is not None else "unknown error"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetServerResourcesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerResourcesUnauthorized(Exception):
|
||||
class GetServerResourcesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetServerResourcesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetServerResourcesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerResourcesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerResourcesUnauthorizedData)
|
||||
|
||||
|
||||
class GetServerResourcesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetServerResourcesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerResourcesBadRequest(Exception):
|
||||
class GetServerResourcesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetServerResourcesBadRequestData
|
||||
|
||||
def __init__(self, data: GetServerResourcesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerResourcesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerResourcesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetThumbImageUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetThumbImageUnauthorized(Exception):
|
||||
class GetThumbImageUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetThumbImageUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetThumbImageUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetThumbImageUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetThumbImageUnauthorizedData)
|
||||
|
||||
|
||||
class GetThumbImageErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetThumbImageBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetThumbImageBadRequest(Exception):
|
||||
class GetThumbImageBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetThumbImageBadRequestData
|
||||
|
||||
def __init__(self, data: GetThumbImageBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetThumbImageBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetThumbImageBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetUsersUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUsersUnauthorized(Exception):
|
||||
class GetUsersUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetUsersUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetUsersUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUsersUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUsersUnauthorizedData)
|
||||
|
||||
|
||||
class GetUsersErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetUsersBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUsersBadRequest(Exception):
|
||||
class GetUsersBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetUsersBadRequestData
|
||||
|
||||
def __init__(self, data: GetUsersBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUsersBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUsersBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetWatchListUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetWatchListUnauthorized(Exception):
|
||||
class GetWatchListUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetWatchListUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetWatchListUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetWatchListUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetWatchListUnauthorizedData)
|
||||
|
||||
|
||||
class GetWatchListErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetWatchListBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetWatchListBadRequest(Exception):
|
||||
class GetWatchListBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetWatchListBadRequestData
|
||||
|
||||
def __init__(self, data: GetWatchListBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetWatchListBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetWatchListBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetAvailableClientsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetAvailableClientsUnauthorized(Exception):
|
||||
class GetAvailableClientsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetAvailableClientsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetAvailableClientsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetAvailableClientsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetAvailableClientsUnauthorizedData)
|
||||
|
||||
|
||||
class GetAvailableClientsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetAvailableClientsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetAvailableClientsBadRequest(Exception):
|
||||
class GetAvailableClientsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetAvailableClientsBadRequestData
|
||||
|
||||
def __init__(self, data: GetAvailableClientsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetAvailableClientsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetAvailableClientsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetBandwidthStatisticsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetBandwidthStatisticsUnauthorized(Exception):
|
||||
class GetBandwidthStatisticsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetBandwidthStatisticsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetBandwidthStatisticsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetBandwidthStatisticsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetBandwidthStatisticsUnauthorizedData)
|
||||
|
||||
|
||||
class GetBandwidthStatisticsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetBandwidthStatisticsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetBandwidthStatisticsBadRequest(Exception):
|
||||
class GetBandwidthStatisticsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetBandwidthStatisticsBadRequestData
|
||||
|
||||
def __init__(self, data: GetBandwidthStatisticsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetBandwidthStatisticsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetBandwidthStatisticsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetButlerTasksUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetButlerTasksUnauthorized(Exception):
|
||||
class GetButlerTasksUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetButlerTasksUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetButlerTasksUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetButlerTasksUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetButlerTasksUnauthorizedData)
|
||||
|
||||
|
||||
class GetButlerTasksErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetButlerTasksBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetButlerTasksBadRequest(Exception):
|
||||
class GetButlerTasksBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetButlerTasksBadRequestData
|
||||
|
||||
def __init__(self, data: GetButlerTasksBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetButlerTasksBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetButlerTasksBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetCompanionsDataUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetCompanionsDataUnauthorized(Exception):
|
||||
class GetCompanionsDataUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetCompanionsDataUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetCompanionsDataUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetCompanionsDataUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetCompanionsDataUnauthorizedData)
|
||||
|
||||
|
||||
class GetCompanionsDataErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetCompanionsDataBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetCompanionsDataBadRequest(Exception):
|
||||
class GetCompanionsDataBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetCompanionsDataBadRequestData
|
||||
|
||||
def __init__(self, data: GetCompanionsDataBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetCompanionsDataBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetCompanionsDataBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetDevicesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetDevicesUnauthorized(Exception):
|
||||
class GetDevicesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetDevicesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetDevicesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetDevicesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetDevicesUnauthorizedData)
|
||||
|
||||
|
||||
class GetDevicesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetDevicesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetDevicesBadRequest(Exception):
|
||||
class GetDevicesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetDevicesBadRequestData
|
||||
|
||||
def __init__(self, data: GetDevicesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetDevicesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetDevicesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetFileHashUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetFileHashUnauthorized(Exception):
|
||||
class GetFileHashUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetFileHashUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetFileHashUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetFileHashUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetFileHashUnauthorizedData)
|
||||
|
||||
|
||||
class GetFileHashErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetFileHashBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetFileHashBadRequest(Exception):
|
||||
class GetFileHashBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetFileHashBadRequestData
|
||||
|
||||
def __init__(self, data: GetFileHashBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetFileHashBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetFileHashBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetGeoDataUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGeoDataUnauthorized(Exception):
|
||||
class GetGeoDataUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetGeoDataUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetGeoDataUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGeoDataUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGeoDataUnauthorizedData)
|
||||
|
||||
|
||||
class GetGeoDataErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetGeoDataBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGeoDataBadRequest(Exception):
|
||||
class GetGeoDataBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetGeoDataBadRequestData
|
||||
|
||||
def __init__(self, data: GetGeoDataBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGeoDataBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGeoDataBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetGlobalHubsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGlobalHubsUnauthorized(Exception):
|
||||
class GetGlobalHubsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetGlobalHubsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetGlobalHubsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGlobalHubsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGlobalHubsUnauthorizedData)
|
||||
|
||||
|
||||
class GetGlobalHubsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetGlobalHubsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetGlobalHubsBadRequest(Exception):
|
||||
class GetGlobalHubsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetGlobalHubsBadRequestData
|
||||
|
||||
def __init__(self, data: GetGlobalHubsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetGlobalHubsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetGlobalHubsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetHomeDataUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetHomeDataUnauthorized(Exception):
|
||||
class GetHomeDataUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetHomeDataUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetHomeDataUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetHomeDataUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetHomeDataUnauthorizedData)
|
||||
|
||||
|
||||
class GetHomeDataErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetHomeDataBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetHomeDataBadRequest(Exception):
|
||||
class GetHomeDataBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetHomeDataBadRequestData
|
||||
|
||||
def __init__(self, data: GetHomeDataBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetHomeDataBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetHomeDataBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetLibraryHubsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryHubsUnauthorized(Exception):
|
||||
class GetLibraryHubsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetLibraryHubsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetLibraryHubsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryHubsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryHubsUnauthorizedData)
|
||||
|
||||
|
||||
class GetLibraryHubsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetLibraryHubsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetLibraryHubsBadRequest(Exception):
|
||||
class GetLibraryHubsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetLibraryHubsBadRequestData
|
||||
|
||||
def __init__(self, data: GetLibraryHubsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetLibraryHubsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetLibraryHubsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetMetadataChildrenUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMetadataChildrenUnauthorized(Exception):
|
||||
class GetMetadataChildrenUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetMetadataChildrenUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetMetadataChildrenUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMetadataChildrenUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMetadataChildrenUnauthorizedData)
|
||||
|
||||
|
||||
class GetMetadataChildrenErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetMetadataChildrenBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMetadataChildrenBadRequest(Exception):
|
||||
class GetMetadataChildrenBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetMetadataChildrenBadRequestData
|
||||
|
||||
def __init__(self, data: GetMetadataChildrenBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMetadataChildrenBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMetadataChildrenBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetMyPlexAccountUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMyPlexAccountUnauthorized(Exception):
|
||||
class GetMyPlexAccountUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetMyPlexAccountUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetMyPlexAccountUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMyPlexAccountUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMyPlexAccountUnauthorizedData)
|
||||
|
||||
|
||||
class GetMyPlexAccountErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetMyPlexAccountBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetMyPlexAccountBadRequest(Exception):
|
||||
class GetMyPlexAccountBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetMyPlexAccountBadRequestData
|
||||
|
||||
def __init__(self, data: GetMyPlexAccountBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetMyPlexAccountBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetMyPlexAccountBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,13 +32,17 @@ class GetPinBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPinBadRequest(Exception):
|
||||
class GetPinBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetPinBadRequestData
|
||||
|
||||
def __init__(self, data: GetPinBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPinBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPinBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetPlaylistUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistUnauthorized(Exception):
|
||||
class GetPlaylistUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetPlaylistUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetPlaylistUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistUnauthorizedData)
|
||||
|
||||
|
||||
class GetPlaylistErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetPlaylistBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistBadRequest(Exception):
|
||||
class GetPlaylistBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetPlaylistBadRequestData
|
||||
|
||||
def __init__(self, data: GetPlaylistBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetPlaylistContentsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistContentsUnauthorized(Exception):
|
||||
class GetPlaylistContentsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetPlaylistContentsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetPlaylistContentsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistContentsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistContentsUnauthorizedData)
|
||||
|
||||
|
||||
class GetPlaylistContentsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetPlaylistContentsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistContentsBadRequest(Exception):
|
||||
class GetPlaylistContentsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetPlaylistContentsBadRequestData
|
||||
|
||||
def __init__(self, data: GetPlaylistContentsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistContentsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistContentsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetPlaylistsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistsUnauthorized(Exception):
|
||||
class GetPlaylistsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetPlaylistsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetPlaylistsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistsUnauthorizedData)
|
||||
|
||||
|
||||
class GetPlaylistsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetPlaylistsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetPlaylistsBadRequest(Exception):
|
||||
class GetPlaylistsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetPlaylistsBadRequestData
|
||||
|
||||
def __init__(self, data: GetPlaylistsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetPlaylistsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetPlaylistsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetResizedPhotoUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetResizedPhotoUnauthorized(Exception):
|
||||
class GetResizedPhotoUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetResizedPhotoUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetResizedPhotoUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetResizedPhotoUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetResizedPhotoUnauthorizedData)
|
||||
|
||||
|
||||
class GetResizedPhotoErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetResizedPhotoBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetResizedPhotoBadRequest(Exception):
|
||||
class GetResizedPhotoBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetResizedPhotoBadRequestData
|
||||
|
||||
def __init__(self, data: GetResizedPhotoBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetResizedPhotoBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetResizedPhotoBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetResourcesStatisticsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetResourcesStatisticsUnauthorized(Exception):
|
||||
class GetResourcesStatisticsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetResourcesStatisticsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetResourcesStatisticsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetResourcesStatisticsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetResourcesStatisticsUnauthorizedData)
|
||||
|
||||
|
||||
class GetResourcesStatisticsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetResourcesStatisticsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetResourcesStatisticsBadRequest(Exception):
|
||||
class GetResourcesStatisticsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetResourcesStatisticsBadRequestData
|
||||
|
||||
def __init__(self, data: GetResourcesStatisticsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetResourcesStatisticsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetResourcesStatisticsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetSearchResultsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchResultsUnauthorized(Exception):
|
||||
class GetSearchResultsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSearchResultsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSearchResultsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchResultsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchResultsUnauthorizedData)
|
||||
|
||||
|
||||
class GetSearchResultsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetSearchResultsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSearchResultsBadRequest(Exception):
|
||||
class GetSearchResultsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSearchResultsBadRequestData
|
||||
|
||||
def __init__(self, data: GetSearchResultsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSearchResultsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSearchResultsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetServerActivitiesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerActivitiesUnauthorized(Exception):
|
||||
class GetServerActivitiesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetServerActivitiesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetServerActivitiesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerActivitiesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerActivitiesUnauthorizedData)
|
||||
|
||||
|
||||
class GetServerActivitiesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetServerActivitiesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerActivitiesBadRequest(Exception):
|
||||
class GetServerActivitiesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetServerActivitiesBadRequestData
|
||||
|
||||
def __init__(self, data: GetServerActivitiesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerActivitiesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerActivitiesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetServerCapabilitiesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerCapabilitiesUnauthorized(Exception):
|
||||
class GetServerCapabilitiesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetServerCapabilitiesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetServerCapabilitiesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerCapabilitiesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerCapabilitiesUnauthorizedData)
|
||||
|
||||
|
||||
class ErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetServerCapabilitiesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerCapabilitiesBadRequest(Exception):
|
||||
class GetServerCapabilitiesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetServerCapabilitiesBadRequestData
|
||||
|
||||
def __init__(self, data: GetServerCapabilitiesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerCapabilitiesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerCapabilitiesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetServerListUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerListUnauthorized(Exception):
|
||||
class GetServerListUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetServerListUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetServerListUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerListUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerListUnauthorizedData)
|
||||
|
||||
|
||||
class GetServerListErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetServerListBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerListBadRequest(Exception):
|
||||
class GetServerListBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetServerListBadRequestData
|
||||
|
||||
def __init__(self, data: GetServerListBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerListBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerListBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetServerPreferencesUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerPreferencesUnauthorized(Exception):
|
||||
class GetServerPreferencesUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetServerPreferencesUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetServerPreferencesUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerPreferencesUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerPreferencesUnauthorizedData)
|
||||
|
||||
|
||||
class GetServerPreferencesErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetServerPreferencesBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetServerPreferencesBadRequest(Exception):
|
||||
class GetServerPreferencesBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetServerPreferencesBadRequestData
|
||||
|
||||
def __init__(self, data: GetServerPreferencesBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetServerPreferencesBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetServerPreferencesBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetSessionHistoryUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSessionHistoryUnauthorized(Exception):
|
||||
class GetSessionHistoryUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSessionHistoryUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSessionHistoryUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSessionHistoryUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSessionHistoryUnauthorizedData)
|
||||
|
||||
|
||||
class GetSessionHistoryErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetSessionHistoryBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSessionHistoryBadRequest(Exception):
|
||||
class GetSessionHistoryBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSessionHistoryBadRequestData
|
||||
|
||||
def __init__(self, data: GetSessionHistoryBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSessionHistoryBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSessionHistoryBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetSessionsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSessionsUnauthorized(Exception):
|
||||
class GetSessionsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSessionsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSessionsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSessionsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSessionsUnauthorizedData)
|
||||
|
||||
|
||||
class GetSessionsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetSessionsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSessionsBadRequest(Exception):
|
||||
class GetSessionsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSessionsBadRequestData
|
||||
|
||||
def __init__(self, data: GetSessionsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSessionsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetSessionsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,19 +32,21 @@ class GetSourceConnectionInformationUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSourceConnectionInformationUnauthorized(Exception):
|
||||
class GetSourceConnectionInformationUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetSourceConnectionInformationUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetSourceConnectionInformationUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSourceConnectionInformationUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(
|
||||
self.data, GetSourceConnectionInformationUnauthorizedData
|
||||
)
|
||||
|
||||
|
||||
class GetSourceConnectionInformationErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -69,15 +71,17 @@ class GetSourceConnectionInformationBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetSourceConnectionInformationBadRequest(Exception):
|
||||
class GetSourceConnectionInformationBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetSourceConnectionInformationBadRequestData
|
||||
|
||||
def __init__(self, data: GetSourceConnectionInformationBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetSourceConnectionInformationBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(
|
||||
self.data, GetSourceConnectionInformationBadRequestData
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetStatisticsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetStatisticsUnauthorized(Exception):
|
||||
class GetStatisticsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetStatisticsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetStatisticsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetStatisticsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetStatisticsUnauthorizedData)
|
||||
|
||||
|
||||
class GetStatisticsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetStatisticsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetStatisticsBadRequest(Exception):
|
||||
class GetStatisticsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetStatisticsBadRequestData
|
||||
|
||||
def __init__(self, data: GetStatisticsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetStatisticsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetStatisticsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetTimelineUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTimelineUnauthorized(Exception):
|
||||
class GetTimelineUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetTimelineUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetTimelineUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTimelineUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTimelineUnauthorizedData)
|
||||
|
||||
|
||||
class GetTimelineErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetTimelineBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTimelineBadRequest(Exception):
|
||||
class GetTimelineBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTimelineBadRequestData
|
||||
|
||||
def __init__(self, data: GetTimelineBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTimelineBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTimelineBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -29,17 +29,21 @@ class GetTokenByPinIDResponseBodyData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTokenByPinIDResponseBody(Exception):
|
||||
class GetTokenByPinIDResponseBody(PlexAPIError):
|
||||
r"""Not Found or Expired"""
|
||||
|
||||
data: GetTokenByPinIDResponseBodyData
|
||||
|
||||
def __init__(self, data: GetTokenByPinIDResponseBodyData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTokenByPinIDResponseBodyData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTokenByPinIDResponseBodyData)
|
||||
|
||||
|
||||
class GetTokenByPinIDErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -64,13 +68,17 @@ class GetTokenByPinIDBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTokenByPinIDBadRequest(Exception):
|
||||
class GetTokenByPinIDBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTokenByPinIDBadRequestData
|
||||
|
||||
def __init__(self, data: GetTokenByPinIDBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTokenByPinIDBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTokenByPinIDBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetTokenDetailsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTokenDetailsUnauthorized(Exception):
|
||||
class GetTokenDetailsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetTokenDetailsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetTokenDetailsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTokenDetailsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTokenDetailsUnauthorizedData)
|
||||
|
||||
|
||||
class GetTokenDetailsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetTokenDetailsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTokenDetailsBadRequest(Exception):
|
||||
class GetTokenDetailsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTokenDetailsBadRequestData
|
||||
|
||||
def __init__(self, data: GetTokenDetailsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTokenDetailsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTokenDetailsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetTopWatchedContentUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTopWatchedContentUnauthorized(Exception):
|
||||
class GetTopWatchedContentUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetTopWatchedContentUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetTopWatchedContentUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTopWatchedContentUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTopWatchedContentUnauthorizedData)
|
||||
|
||||
|
||||
class GetTopWatchedContentErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetTopWatchedContentBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTopWatchedContentBadRequest(Exception):
|
||||
class GetTopWatchedContentBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTopWatchedContentBadRequestData
|
||||
|
||||
def __init__(self, data: GetTopWatchedContentBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTopWatchedContentBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTopWatchedContentBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetTranscodeSessionsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTranscodeSessionsUnauthorized(Exception):
|
||||
class GetTranscodeSessionsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetTranscodeSessionsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetTranscodeSessionsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTranscodeSessionsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTranscodeSessionsUnauthorizedData)
|
||||
|
||||
|
||||
class GetTranscodeSessionsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetTranscodeSessionsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTranscodeSessionsBadRequest(Exception):
|
||||
class GetTranscodeSessionsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTranscodeSessionsBadRequestData
|
||||
|
||||
def __init__(self, data: GetTranscodeSessionsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTranscodeSessionsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTranscodeSessionsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetTransientTokenUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTransientTokenUnauthorized(Exception):
|
||||
class GetTransientTokenUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetTransientTokenUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetTransientTokenUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTransientTokenUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTransientTokenUnauthorizedData)
|
||||
|
||||
|
||||
class GetTransientTokenErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetTransientTokenBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetTransientTokenBadRequest(Exception):
|
||||
class GetTransientTokenBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetTransientTokenBadRequestData
|
||||
|
||||
def __init__(self, data: GetTransientTokenBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetTransientTokenBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetTransientTokenBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetUpdateStatusUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUpdateStatusUnauthorized(Exception):
|
||||
class GetUpdateStatusUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetUpdateStatusUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetUpdateStatusUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUpdateStatusUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUpdateStatusUnauthorizedData)
|
||||
|
||||
|
||||
class GetUpdateStatusErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetUpdateStatusBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUpdateStatusBadRequest(Exception):
|
||||
class GetUpdateStatusBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetUpdateStatusBadRequestData
|
||||
|
||||
def __init__(self, data: GetUpdateStatusBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUpdateStatusBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUpdateStatusBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class GetUserFriendsUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUserFriendsUnauthorized(Exception):
|
||||
class GetUserFriendsUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: GetUserFriendsUnauthorizedData
|
||||
|
||||
def __init__(self, data: GetUserFriendsUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUserFriendsUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUserFriendsUnauthorizedData)
|
||||
|
||||
|
||||
class GetUserFriendsErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class GetUserFriendsBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class GetUserFriendsBadRequest(Exception):
|
||||
class GetUserFriendsBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: GetUserFriendsBadRequestData
|
||||
|
||||
def __init__(self, data: GetUserFriendsBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: GetUserFriendsBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, GetUserFriendsBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class LogLineUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class LogLineUnauthorized(Exception):
|
||||
class LogLineUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: LogLineUnauthorizedData
|
||||
|
||||
def __init__(self, data: LogLineUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: LogLineUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, LogLineUnauthorizedData)
|
||||
|
||||
|
||||
class LogLineErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class LogLineBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class LogLineBadRequest(Exception):
|
||||
class LogLineBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: LogLineBadRequestData
|
||||
|
||||
def __init__(self, data: LogLineBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: LogLineBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, LogLineBadRequestData)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
import httpx
|
||||
from plex_api_client import utils
|
||||
from plex_api_client.models.errors import PlexAPIError
|
||||
from plex_api_client.types import BaseModel
|
||||
import pydantic
|
||||
from typing import List, Optional
|
||||
@@ -32,17 +32,21 @@ class LogMultiLineUnauthorizedData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class LogMultiLineUnauthorized(Exception):
|
||||
class LogMultiLineUnauthorized(PlexAPIError):
|
||||
r"""Unauthorized - Returned if the X-Plex-Token is missing from the header or query."""
|
||||
|
||||
data: LogMultiLineUnauthorizedData
|
||||
|
||||
def __init__(self, data: LogMultiLineUnauthorizedData):
|
||||
def __init__(
|
||||
self,
|
||||
data: LogMultiLineUnauthorizedData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, LogMultiLineUnauthorizedData)
|
||||
|
||||
|
||||
class LogMultiLineErrorsTypedDict(TypedDict):
|
||||
code: NotRequired[int]
|
||||
@@ -67,13 +71,17 @@ class LogMultiLineBadRequestData(BaseModel):
|
||||
r"""Raw HTTP response; suitable for custom response parsing"""
|
||||
|
||||
|
||||
class LogMultiLineBadRequest(Exception):
|
||||
class LogMultiLineBadRequest(PlexAPIError):
|
||||
r"""Bad Request - A parameter was not specified, or was specified incorrectly."""
|
||||
|
||||
data: LogMultiLineBadRequestData
|
||||
|
||||
def __init__(self, data: LogMultiLineBadRequestData):
|
||||
def __init__(
|
||||
self,
|
||||
data: LogMultiLineBadRequestData,
|
||||
raw_response: httpx.Response,
|
||||
body: Optional[str] = None,
|
||||
):
|
||||
message = body or raw_response.text
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
|
||||
def __str__(self) -> str:
|
||||
return utils.marshal_json(self.data, LogMultiLineBadRequestData)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user