mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-08 12:37:47 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1
This commit is contained in:
@@ -91,15 +91,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerCapabilitiesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -183,15 +185,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerCapabilitiesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -274,15 +278,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerPreferencesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -365,15 +371,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerPreferencesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -456,15 +464,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetAvailableClientsUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -547,15 +557,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetAvailableClientsUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -636,15 +648,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetDevicesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -725,15 +739,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetDevicesUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -809,15 +825,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerIdentityRequestTimeout(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -893,15 +911,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerIdentityRequestTimeout(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -984,15 +1004,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetMyPlexAccountUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1075,15 +1097,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetMyPlexAccountUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1174,15 +1198,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetResizedPhotoUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1273,15 +1299,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetResizedPhotoUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1371,15 +1399,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetMediaProvidersUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1469,15 +1499,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetMediaProvidersUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1560,15 +1592,17 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerListUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
@@ -1651,14 +1685,16 @@ class Server(BaseSDK):
|
||||
data.raw_response = http_res
|
||||
raise errors.GetServerListUnauthorized(data=data)
|
||||
if utils.match_response(http_res, ["4XX", "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
|
||||
"API error occurred", http_res.status_code, http_res_text, http_res
|
||||
)
|
||||
|
||||
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_text,
|
||||
http_res,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user