Fixes (#115)
* regenerate Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes and cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * I have generated the latest API! --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -6,16 +6,23 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_center_of_mass import FileCenterOfMass
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.unit_length import UnitLength
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/file/center-of-mass".format(client.base_url)  # noqa: E501
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -61,12 +68,14 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -81,6 +90,7 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -90,9 +100,11 @@ def sync(
 | 
			
		||||
    Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -100,12 +112,14 @@ def sync(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -118,6 +132,7 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -127,10 +142,12 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user