Update api spec (#79)

* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-04-27 13:59:37 -07:00
committed by GitHub
parent b8d1f92872
commit 8877a3c146
30 changed files with 887 additions and 690 deletions

View File

@ -4,7 +4,6 @@ import httpx
from ...client import Client
from ...models.file_conversion import FileConversion
from ...models.file2_d_vector_conversion import File2DVectorConversion
from ...models.file_center_of_mass import FileCenterOfMass
from ...models.file_mass import FileMass
from ...models.file_volume import FileVolume
@ -31,7 +30,7 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
if response.status_code == 200:
data = response.json()
try:
@ -41,13 +40,6 @@ 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()
@ -92,7 +84,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
return None
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -105,7 +97,7 @@ def sync_detailed(
id: str,
*,
client: Client,
) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
@ -123,7 +115,7 @@ def sync(
id: str,
*,
client: Client,
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
""" Get the status and output of an async operation.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.
@ -139,7 +131,7 @@ async def asyncio_detailed(
id: str,
*,
client: Client,
) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
@ -155,7 +147,7 @@ async def asyncio(
id: str,
*,
client: Client,
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
""" Get the status and output of an async operation.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.