I have generated the latest API!
This commit is contained in:
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileCent
|
||||
|
||||
def sync_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,13 +5,13 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.error import Error
|
||||
from ...models.file_output_format import FileOutputFormat
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file_export_format import FileExportFormat
|
||||
from ...models.file_import_format import FileImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,8 +53,8 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConv
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,8 +75,8 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -94,8 +94,8 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -114,8 +114,8 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_density import FileDensity
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileDens
|
||||
|
||||
def sync_detailed(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileMass
|
||||
|
||||
def sync_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,11 +5,11 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_surface_area import FileSurfaceArea
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileSurf
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -71,7 +71,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,11 +5,11 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_volume import FileVolume
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileVolu
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -71,7 +71,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -4,6 +4,8 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
||||
from ...models.file3_d_conversion import File3DConversion
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_volume import FileVolume
|
||||
@ -30,7 +32,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -40,6 +42,20 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File2DVectorConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File3DConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
@ -84,7 +100,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -97,7 +113,7 @@ def sync_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -115,7 +131,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.
|
||||
If the user is not authenticated to view the specified file conversion, then it is not returned.
|
||||
@ -131,7 +147,7 @@ async def asyncio_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -147,7 +163,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.
|
||||
If the user is not authenticated to view the specified file conversion, then it is not returned.
|
||||
|
@ -4,6 +4,8 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
||||
from ...models.file3_d_conversion import File3DConversion
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_volume import FileVolume
|
||||
@ -30,7 +32,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -40,6 +42,20 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File2DVectorConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File3DConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
@ -84,7 +100,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -97,7 +113,7 @@ def sync_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -115,7 +131,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """
|
||||
|
||||
@ -129,7 +145,7 @@ async def asyncio_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -145,7 +161,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """
|
||||
|
||||
|
Reference in New Issue
Block a user