I have generated the latest API!
This commit is contained in:
@ -3,7 +3,6 @@ from typing import Any, Dict, Optional, Union, cast
|
|||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.empty import Empty
|
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
@ -27,9 +26,9 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Empty, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
|
||||||
if response.status_code == 302:
|
if response.status_code == 302:
|
||||||
response_302 = Empty.from_dict(response.json())
|
response_302 = None
|
||||||
return response_302
|
return response_302
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
@ -40,7 +39,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Empty, E
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Empty, Error]]:
|
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -55,7 +54,7 @@ def sync_detailed(
|
|||||||
token: str,
|
token: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, Empty, Error]]:
|
) -> Response[Union[Any, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
email=email,
|
email=email,
|
||||||
@ -77,7 +76,7 @@ def sync(
|
|||||||
token: str,
|
token: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, Empty, Error]]:
|
) -> Optional[Union[Any, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
@ -93,7 +92,7 @@ async def asyncio_detailed(
|
|||||||
token: str,
|
token: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, Empty, Error]]:
|
) -> Response[Union[Any, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
email=email,
|
email=email,
|
||||||
@ -113,7 +112,7 @@ async def asyncio(
|
|||||||
token: str,
|
token: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, Empty, Error]]:
|
) -> Optional[Union[Any, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
@ -30,7 +30,6 @@ from .device_auth_verify_params import DeviceAuthVerifyParams
|
|||||||
from .docker_system_info import DockerSystemInfo
|
from .docker_system_info import DockerSystemInfo
|
||||||
from .duration import Duration
|
from .duration import Duration
|
||||||
from .email_authentication_form import EmailAuthenticationForm
|
from .email_authentication_form import EmailAuthenticationForm
|
||||||
from .empty import Empty
|
|
||||||
from .engine_metadata import EngineMetadata
|
from .engine_metadata import EngineMetadata
|
||||||
from .environment import Environment
|
from .environment import Environment
|
||||||
from .error import Error
|
from .error import Error
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
class Empty(str):
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return self
|
|
Reference in New Issue
Block a user