mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 12:47:44 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.598.0
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user