@ -1 +1 @@
|
||||
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501
|
||||
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501
|
||||
|
||||
@ -11,17 +11,38 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(
|
||||
client.base_url,
|
||||
input_format=input_format,
|
||||
output_format=output_format,
|
||||
) # noqa: E501
|
||||
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(client.base_url, input_format=input_format,output_format=output_format,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -35,22 +56,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -60,16 +82,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -82,33 +125,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Mesh, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -119,19 +204,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Mesh, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,21 +10,36 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ai/text-to-3d/{output_format}".format(
|
||||
client.base_url,
|
||||
output_format=output_format,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/ai/text-to-3d/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
if prompt is not None:
|
||||
if "?" in url:
|
||||
url = url + "&prompt=" + str(prompt)
|
||||
else:
|
||||
url = url + "?prompt=" + str(prompt)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -34,25 +49,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -62,14 +79,29 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
prompt=prompt,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -82,29 +114,59 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Mesh, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
prompt=prompt,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
prompt=prompt,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -115,17 +177,32 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Mesh, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
prompt=prompt,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501
|
||||
""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/api-calls/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -56,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -74,27 +91,45 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.
|
||||
If the user is not authenticated to view the specified API call, then it is not returned.
|
||||
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||
If the user is not authenticated to view the specified API call, then it is not returned.
|
||||
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -105,17 +140,26 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.
|
||||
If the user is not authenticated to view the specified API call, then it is not returned.
|
||||
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||
If the user is not authenticated to view the specified API call, then it is not returned.
|
||||
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-calls/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/user/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -56,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -74,25 +91,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -103,15 +138,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,19 +10,28 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
group_by: ApiCallQueryGroupBy,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/api-call-metrics".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/api-call-metrics".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if group_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&group_by=" + str(group_by)
|
||||
else:
|
||||
url = url + "?group_by=" + str(group_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -32,27 +41,30 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [ApiCallQueryGroup.from_dict(item) for item in response.json()]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[ApiCallQueryGroup], Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ApiCallQueryGroup.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -62,12 +74,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
group_by: ApiCallQueryGroupBy,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
group_by=group_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -80,25 +101,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
group_by: ApiCallQueryGroupBy,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]] :
|
||||
"""This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
group_by=group_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
group_by: ApiCallQueryGroupBy,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
group_by=group_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -109,15 +148,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
group_by: ApiCallQueryGroupBy,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]] :
|
||||
"""This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
group_by=group_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -14,14 +14,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/async/operations/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/async/operations/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -31,102 +39,80 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_conversion = FileConversion.from_dict(data)
|
||||
return option_file_conversion
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_center_of_mass = FileCenterOfMass.from_dict(data)
|
||||
return option_file_center_of_mass
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_mass = FileMass.from_dict(data)
|
||||
return option_file_mass
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_volume = FileVolume.from_dict(data)
|
||||
return option_file_volume
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_density = FileDensity.from_dict(data)
|
||||
return option_file_density
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_surface_area = FileSurfaceArea.from_dict(data)
|
||||
return option_file_surface_area
|
||||
except ValueError:
|
||||
raise
|
||||
except TypeError:
|
||||
raise
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_conversion = FileConversion.from_dict(data)
|
||||
return option_file_conversion
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_center_of_mass = FileCenterOfMass.from_dict(data)
|
||||
return option_file_center_of_mass
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_mass = FileMass.from_dict(data)
|
||||
return option_file_mass
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_volume = FileVolume.from_dict(data)
|
||||
return option_file_volume
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_density = FileDensity.from_dict(data)
|
||||
return option_file_density
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_file_surface_area = FileSurfaceArea.from_dict(data)
|
||||
return option_file_surface_area
|
||||
except ValueError:
|
||||
raise
|
||||
except TypeError:
|
||||
raise
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[
|
||||
Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]
|
||||
]:
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -136,24 +122,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[
|
||||
Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]
|
||||
]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -166,51 +149,46 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[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.
|
||||
Only KittyCAD employees with the proper access can view async operations for other users.
|
||||
""" # noqa: E501
|
||||
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.
|
||||
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[
|
||||
Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]
|
||||
]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -221,29 +199,27 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[
|
||||
Union[
|
||||
FileConversion,
|
||||
FileCenterOfMass,
|
||||
FileMass,
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
Error,
|
||||
]
|
||||
]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[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.
|
||||
Only KittyCAD employees with the proper access can view async operations for other users.
|
||||
""" # noqa: E501
|
||||
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.
|
||||
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/api-calls".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/api-calls".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,33 +142,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,35 +10,64 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/{id}/api-calls".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/users/{id}/api-calls".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -48,27 +77,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -78,18 +107,45 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -102,41 +158,94 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.
|
||||
""" # noqa: E501
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -147,25 +256,51 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.
|
||||
""" # noqa: E501
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -11,40 +11,70 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
|
||||
status: ApiCallStatus,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/async/operations".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/async/operations".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
if status is not None:
|
||||
if "?" in url:
|
||||
url = url + "&status=" + str(status)
|
||||
else:
|
||||
url = url + "?status=" + str(status)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -54,27 +84,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = AsyncApiCallResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[AsyncApiCallResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = AsyncApiCallResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -84,18 +114,45 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
|
||||
status: ApiCallStatus,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
status=status,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -108,38 +165,92 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
|
||||
status: ApiCallStatus,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]] :
|
||||
"""For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.
|
||||
This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501
|
||||
This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
status=status,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
|
||||
status: ApiCallStatus,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
status=status,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -150,22 +261,49 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
|
||||
status: ApiCallStatus,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]] :
|
||||
"""For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.
|
||||
This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501
|
||||
This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
status=status,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-calls".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/user/api-calls".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,35 +142,76 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.
|
||||
""" # noqa: E501
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -137,21 +222,41 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.
|
||||
""" # noqa: E501
|
||||
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501
|
||||
""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-tokens".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = ApiToken.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = ApiToken.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,21 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
|
||||
) -> Optional[Union[ApiToken, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -93,13 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
|
||||
) -> Optional[Union[ApiToken, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,14 +8,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-tokens/{token}".format(
|
||||
client.base_url,
|
||||
token=token,
|
||||
) # noqa: E501
|
||||
url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -25,21 +33,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,27 +88,44 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.
|
||||
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
|
||||
""" # noqa: E501
|
||||
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,17 +136,25 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.
|
||||
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
|
||||
""" # noqa: E501
|
||||
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-tokens/{token}".format(
|
||||
client.base_url,
|
||||
token=token,
|
||||
) # noqa: E501
|
||||
url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiToken.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiToken.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -72,25 +91,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiToken, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -101,15 +138,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiToken, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/api-tokens".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ApiTokenResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiTokenResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiTokenResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiTokenResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,35 +142,76 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiTokenResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiTokenResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first.
|
||||
""" # noqa: E501
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -137,21 +222,41 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ApiTokenResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ApiTokenResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first.
|
||||
""" # noqa: E501
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501
|
||||
""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/apps/github/callback".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/apps/github/callback".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,23 +72,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
|
||||
""" # noqa: E501
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
|
||||
""" # noqa: E501
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/apps/github/consent".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/apps/github/consent".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[AppClientInfo, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = AppClientInfo.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[AppClientInfo, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = AppClientInfo.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,23 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[AppClientInfo, Error]]:
|
||||
|
||||
) -> Optional[Union[AppClientInfo, Error]] :
|
||||
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
|
||||
""" # noqa: E501
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -97,15 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[AppClientInfo, Error]]:
|
||||
|
||||
) -> Optional[Union[AppClientInfo, Error]] :
|
||||
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
|
||||
""" # noqa: E501
|
||||
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,13 +8,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/apps/github/webhook".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/apps/github/webhook".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -28,18 +37,21 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,25 +88,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""These come from the GitHub app.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -96,15 +135,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""These come from the GitHub app.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501
|
||||
""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501
|
||||
""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501
|
||||
""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501
|
||||
|
||||
@ -8,10 +8,14 @@ from ...models.error import Error
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ws/executor/term".format(client.base_url) # noqa: E501
|
||||
url = "{}/ws/executor/term".format(client.base_url) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -21,42 +25,45 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> ClientConnection:
|
||||
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
with ws_connect(
|
||||
kwargs["url"].replace("https://", "wss://"),
|
||||
additional_headers=kwargs["headers"],
|
||||
) as websocket:
|
||||
return websocket # type: ignore
|
||||
with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket:
|
||||
return websocket # type: ignore
|
||||
|
||||
# Return an error if we got here.
|
||||
return Error(message="An error occurred while connecting to the websocket.")
|
||||
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> WebSocketClientProtocol:
|
||||
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with ws_connect_async(
|
||||
kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]
|
||||
) as websocket:
|
||||
async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket:
|
||||
return websocket
|
||||
|
||||
# Return an error if we got here.
|
||||
|
||||
@ -10,22 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
lang: CodeLanguage,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
output: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/execute/{lang}".format(
|
||||
client.base_url,
|
||||
lang=lang,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/file/execute/{lang}".format(client.base_url, lang=lang,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
if output is not None:
|
||||
if "?" in url:
|
||||
url = url + "&output=" + str(output)
|
||||
else:
|
||||
url = url + "?output=" + str(output)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -39,22 +61,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = CodeOutput.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = CodeOutput.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -64,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
lang: CodeLanguage,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
output: Optional[str] = None,
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
lang=lang,
|
||||
|
||||
output=output,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -86,31 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
lang: CodeLanguage,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
output: Optional[str] = None,
|
||||
) -> Optional[Union[CodeOutput, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[CodeOutput, Error]] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
lang=lang,
|
||||
|
||||
output=output,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
lang: CodeLanguage,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
output: Optional[str] = None,
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
lang=lang,
|
||||
|
||||
output=output,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -121,17 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
lang: CodeLanguage,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
output: Optional[str] = None,
|
||||
) -> Optional[Union[CodeOutput, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[CodeOutput, Error]] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
lang=lang,
|
||||
|
||||
output=output,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501
|
||||
""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501
|
||||
|
||||
@ -11,27 +11,50 @@ 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
|
||||
|
||||
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)
|
||||
else:
|
||||
url = url + "?src_format=" + str(src_format)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -45,24 +68,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[FileCenterOfMass, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileCenterOfMass.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileCenterOfMass, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileCenterOfMass.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -72,16 +94,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -94,38 +137,79 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileCenterOfMass, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileCenterOfMass, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
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
|
||||
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
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -136,24 +220,44 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileCenterOfMass, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileCenterOfMass, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
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
|
||||
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
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -11,17 +11,38 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/conversion/{src_format}/{output_format}".format(
|
||||
client.base_url,
|
||||
output_format=output_format,
|
||||
src_format=src_format,
|
||||
) # noqa: E501
|
||||
url = "{}/file/conversion/{src_format}/{output_format}".format(client.base_url, output_format=output_format,src_format=src_format,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -35,24 +56,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileConversion.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileConversion.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -62,16 +82,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -84,37 +125,78 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileConversion, Error]] :
|
||||
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
|
||||
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
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
|
||||
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
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_format=output_format,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,23 +207,43 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileConversion, Error]] :
|
||||
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
|
||||
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
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
|
||||
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
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_format=output_format,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -12,41 +12,78 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
material_mass: float,
|
||||
|
||||
|
||||
|
||||
material_mass_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/density".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/file/density".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if material_mass is not None:
|
||||
if "?" in url:
|
||||
url = url + "&material_mass=" + str(material_mass)
|
||||
else:
|
||||
url = url + "?material_mass=" + str(material_mass)
|
||||
|
||||
|
||||
|
||||
|
||||
if material_mass_unit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&material_mass_unit=" + str(material_mass_unit)
|
||||
else:
|
||||
url = url + "?material_mass_unit=" + str(material_mass_unit)
|
||||
|
||||
|
||||
|
||||
|
||||
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)
|
||||
else:
|
||||
url = url + "?src_format=" + str(src_format)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -60,22 +97,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileDensity.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileDensity.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -85,20 +123,53 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
material_mass: float,
|
||||
|
||||
|
||||
|
||||
material_mass_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
material_mass=material_mass,
|
||||
|
||||
material_mass_unit=material_mass_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -111,46 +182,111 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
material_mass: float,
|
||||
|
||||
|
||||
|
||||
material_mass_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileDensity, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileDensity, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
|
||||
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 density 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
|
||||
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
|
||||
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 density 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
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
material_mass=material_mass,
|
||||
|
||||
material_mass_unit=material_mass_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
material_mass: float,
|
||||
|
||||
|
||||
|
||||
material_mass_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
material_mass=material_mass,
|
||||
|
||||
material_mass_unit=material_mass_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -161,28 +297,60 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
material_mass: float,
|
||||
|
||||
|
||||
|
||||
material_mass_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileDensity, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileDensity, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
|
||||
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 density 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
|
||||
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
|
||||
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 density 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
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
material_mass=material_mass,
|
||||
|
||||
material_mass_unit=material_mass_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -12,41 +12,78 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
material_density: float,
|
||||
|
||||
|
||||
|
||||
material_density_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/mass".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/file/mass".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if material_density is not None:
|
||||
if "?" in url:
|
||||
url = url + "&material_density=" + str(material_density)
|
||||
else:
|
||||
url = url + "?material_density=" + str(material_density)
|
||||
|
||||
|
||||
|
||||
|
||||
if material_density_unit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&material_density_unit=" + str(material_density_unit)
|
||||
else:
|
||||
url = url + "?material_density_unit=" + str(material_density_unit)
|
||||
|
||||
|
||||
|
||||
|
||||
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)
|
||||
else:
|
||||
url = url + "?src_format=" + str(src_format)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -60,22 +97,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileMass.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileMass.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -85,20 +123,53 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
material_density: float,
|
||||
|
||||
|
||||
|
||||
material_density_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
material_density=material_density,
|
||||
|
||||
material_density_unit=material_density_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -111,46 +182,111 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
material_density: float,
|
||||
|
||||
|
||||
|
||||
material_density_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileMass, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileMass, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
|
||||
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 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
|
||||
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
|
||||
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 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
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
material_density=material_density,
|
||||
|
||||
material_density_unit=material_density_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
material_density: float,
|
||||
|
||||
|
||||
|
||||
material_density_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
material_density=material_density,
|
||||
|
||||
material_density_unit=material_density_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -161,28 +297,60 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
material_density: float,
|
||||
|
||||
|
||||
|
||||
material_density_unit: UnitDensity,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileMass, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileMass, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
|
||||
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 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
|
||||
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
|
||||
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 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
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
material_density=material_density,
|
||||
|
||||
material_density_unit=material_density_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -11,27 +11,50 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/surface-area".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/file/surface-area".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)
|
||||
else:
|
||||
url = url + "?src_format=" + str(src_format)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -45,24 +68,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[FileSurfaceArea, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileSurfaceArea.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileSurfaceArea, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileSurfaceArea.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -72,16 +94,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -94,38 +137,79 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileSurfaceArea, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileSurfaceArea, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint returns the square 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 surface area 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
|
||||
This endpoint returns the square 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 surface area 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
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -136,24 +220,44 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileSurfaceArea, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileSurfaceArea, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint returns the square 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 surface area 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
|
||||
This endpoint returns the square 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 surface area 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
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -11,27 +11,50 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/volume".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/file/volume".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)
|
||||
else:
|
||||
url = url + "?src_format=" + str(src_format)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -45,22 +68,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileVolume.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = FileVolume.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -70,16 +94,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -92,38 +137,79 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileVolume, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileVolume, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint returns the cubic 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 volume 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
|
||||
This endpoint returns the cubic 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 volume 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
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -134,24 +220,44 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
src_format: FileImportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileVolume, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileVolume, Error]] :
|
||||
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
|
||||
This endpoint returns the cubic 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 volume 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
|
||||
This endpoint returns the cubic 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 volume 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
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
src_format=src_format,
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501
|
||||
""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501
|
||||
|
||||
@ -10,13 +10,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: EmailAuthenticationForm,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/auth/email".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/auth/email".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -30,24 +39,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[VerificationToken, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = VerificationToken.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[VerificationToken, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = VerificationToken.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -57,12 +65,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: EmailAuthenticationForm,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -75,23 +92,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: EmailAuthenticationForm,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[VerificationToken, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[VerificationToken, Error]] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: EmailAuthenticationForm,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -102,13 +139,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: EmailAuthenticationForm,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[VerificationToken, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[VerificationToken, Error]] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,33 +8,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
email: str,
|
||||
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
callback_url: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/auth/email/callback".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/auth/email/callback".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if callback_url is not None:
|
||||
if "?" in url:
|
||||
url = url + "&callback_url=" + str(callback_url)
|
||||
else:
|
||||
url = url + "?callback_url=" + str(callback_url)
|
||||
|
||||
|
||||
|
||||
|
||||
if email is not None:
|
||||
if "?" in url:
|
||||
url = url + "&email=" + str(email)
|
||||
else:
|
||||
url = url + "?email=" + str(email)
|
||||
|
||||
|
||||
|
||||
|
||||
if token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&token=" + str(token)
|
||||
else:
|
||||
url = url + "?token=" + str(token)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -44,21 +67,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -68,16 +95,37 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
email: str,
|
||||
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
callback_url: Optional[str] = None,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
callback_url=callback_url,
|
||||
|
||||
email=email,
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,31 +138,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
email: str,
|
||||
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
callback_url: Optional[str] = None,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
callback_url=callback_url,
|
||||
|
||||
email=email,
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
email: str,
|
||||
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
callback_url: Optional[str] = None,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
callback_url=callback_url,
|
||||
|
||||
email=email,
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,17 +217,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
email: str,
|
||||
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
callback_url: Optional[str] = None,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
callback_url=callback_url,
|
||||
|
||||
email=email,
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/logout".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/logout".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,21 +72,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This is used in logout scenarios.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,13 +103,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This is used in logout scenarios.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501
|
||||
""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/.well-known/ai-plugin.json".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/.well-known/ai-plugin.json".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = AiPluginManifest.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPluginManifest, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = AiPluginManifest.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,19 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
||||
|
||||
) -> Optional[Union[AiPluginManifest, Error]] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -93,11 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
||||
|
||||
) -> Optional[Union[AiPluginManifest, Error]] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/_meta/info".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/_meta/info".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Metadata.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Metadata.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,22 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Metadata, Error]]:
|
||||
|
||||
) -> Optional[Union[Metadata, Error]] :
|
||||
"""This includes information on any of our other distributed systems it is connected to.
|
||||
You must be a KittyCAD employee to perform this request.""" # noqa: E501
|
||||
You must be a KittyCAD employee to perform this request.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -94,14 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Metadata, Error]]:
|
||||
|
||||
) -> Optional[Union[Metadata, Error]] :
|
||||
"""This includes information on any of our other distributed systems it is connected to.
|
||||
You must be a KittyCAD employee to perform this request.""" # noqa: E501
|
||||
You must be a KittyCAD employee to perform this request.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/openai/openapi.json".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/openai/openapi.json".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = response.json()
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = response.json()
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -51,10 +55,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,21 +74,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[dict, Error]]:
|
||||
|
||||
) -> Optional[Union[dict, Error]] :
|
||||
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -92,13 +105,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[dict, Error]]:
|
||||
|
||||
) -> Optional[Union[dict, Error]] :
|
||||
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = response.json()
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = response.json()
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -51,10 +55,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,19 +74,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[dict, Error]]:
|
||||
|
||||
) -> Optional[Union[dict, Error]] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[dict, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,11 +105,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[dict, Error]]:
|
||||
|
||||
) -> Optional[Union[dict, Error]] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ping".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/ping".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Pong.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Pong.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,19 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Pong, Error]]:
|
||||
|
||||
) -> Optional[Union[Pong, Error]] :
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Pong, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -91,11 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Pong, Error]]:
|
||||
|
||||
) -> Optional[Union[Pong, Error]] :
|
||||
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501
|
||||
""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501
|
||||
|
||||
@ -8,45 +8,84 @@ from ...models.error import Error
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
fps: int,
|
||||
|
||||
|
||||
|
||||
unlocked_framerate: bool,
|
||||
|
||||
|
||||
|
||||
video_res_height: int,
|
||||
|
||||
|
||||
|
||||
video_res_width: int,
|
||||
|
||||
|
||||
|
||||
webrtc: bool,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
|
||||
|
||||
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
|
||||
|
||||
|
||||
if fps is not None:
|
||||
if "?" in url:
|
||||
url = url + "&fps=" + str(fps)
|
||||
else:
|
||||
url = url + "?fps=" + str(fps)
|
||||
|
||||
|
||||
|
||||
|
||||
if unlocked_framerate is not None:
|
||||
if "?" in url:
|
||||
url = url + "&unlocked_framerate=" + str(unlocked_framerate)
|
||||
else:
|
||||
url = url + "?unlocked_framerate=" + str(unlocked_framerate)
|
||||
|
||||
|
||||
|
||||
|
||||
if video_res_height is not None:
|
||||
if "?" in url:
|
||||
url = url + "&video_res_height=" + str(video_res_height)
|
||||
else:
|
||||
url = url + "?video_res_height=" + str(video_res_height)
|
||||
|
||||
|
||||
|
||||
|
||||
if video_res_width is not None:
|
||||
if "?" in url:
|
||||
url = url + "&video_res_width=" + str(video_res_width)
|
||||
else:
|
||||
url = url + "?video_res_width=" + str(video_res_width)
|
||||
|
||||
|
||||
|
||||
|
||||
if webrtc is not None:
|
||||
if "?" in url:
|
||||
url = url + "&webrtc=" + str(webrtc)
|
||||
else:
|
||||
url = url + "?webrtc=" + str(webrtc)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -56,62 +95,125 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
fps: int,
|
||||
|
||||
|
||||
|
||||
unlocked_framerate: bool,
|
||||
|
||||
|
||||
|
||||
video_res_height: int,
|
||||
|
||||
|
||||
|
||||
video_res_width: int,
|
||||
|
||||
|
||||
|
||||
webrtc: bool,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> ClientConnection:
|
||||
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
fps=fps,
|
||||
|
||||
unlocked_framerate=unlocked_framerate,
|
||||
|
||||
video_res_height=video_res_height,
|
||||
|
||||
video_res_width=video_res_width,
|
||||
|
||||
webrtc=webrtc,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
with ws_connect(
|
||||
kwargs["url"].replace("https://", "wss://"),
|
||||
additional_headers=kwargs["headers"],
|
||||
) as websocket:
|
||||
return websocket # type: ignore
|
||||
with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket:
|
||||
return websocket # type: ignore
|
||||
|
||||
# Return an error if we got here.
|
||||
return Error(message="An error occurred while connecting to the websocket.")
|
||||
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
fps: int,
|
||||
|
||||
|
||||
|
||||
unlocked_framerate: bool,
|
||||
|
||||
|
||||
|
||||
video_res_height: int,
|
||||
|
||||
|
||||
|
||||
video_res_width: int,
|
||||
|
||||
|
||||
|
||||
webrtc: bool,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> WebSocketClientProtocol:
|
||||
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
fps=fps,
|
||||
|
||||
unlocked_framerate=unlocked_framerate,
|
||||
|
||||
video_res_height=video_res_height,
|
||||
|
||||
video_res_width=video_res_width,
|
||||
|
||||
webrtc=webrtc,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with ws_connect_async(
|
||||
kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]
|
||||
) as websocket:
|
||||
async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket:
|
||||
return websocket
|
||||
|
||||
# Return an error if we got here.
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501
|
||||
""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501
|
||||
""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501
|
||||
|
||||
@ -10,13 +10,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = Customer.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = Customer.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -55,12 +65,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -73,27 +92,44 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -104,17 +140,25 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/intent".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/intent".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[PaymentIntent, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = PaymentIntent.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[PaymentIntent, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = PaymentIntent.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[PaymentIntent, Error]]:
|
||||
|
||||
) -> Optional[Union[PaymentIntent, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,13 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[PaymentIntent, Error]]:
|
||||
|
||||
) -> Optional[Union[PaymentIntent, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,23 +72,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,14 +8,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/methods/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/methods/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -25,21 +33,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,25 +88,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -96,15 +135,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/balance".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/balance".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = CustomerBalance.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CustomerBalance, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = CustomerBalance.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
|
||||
) -> Optional[Union[CustomerBalance, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,13 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
|
||||
) -> Optional[Union[CustomerBalance, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Customer.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Customer.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,23 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,15 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/invoices".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/invoices".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,30 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[List[Invoice], Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [Invoice.from_dict(item) for item in response.json()]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[Invoice], Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
Invoice.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +59,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +78,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[Invoice], Error]]:
|
||||
|
||||
) -> Optional[Union[List[Invoice], Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,13 +109,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[Invoice], Error]]:
|
||||
|
||||
) -> Optional[Union[List[Invoice], Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/methods".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/methods".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,30 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[List[PaymentMethod], Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [PaymentMethod.from_dict(item) for item in response.json()]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[PaymentMethod], Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
PaymentMethod.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +59,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +78,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[PaymentMethod], Error]]:
|
||||
|
||||
) -> Optional[Union[List[PaymentMethod], Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,13 +109,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[List[PaymentMethod], Error]]:
|
||||
|
||||
) -> Optional[Union[List[PaymentMethod], Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,13 +10,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Customer.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Customer.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -55,12 +65,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -73,27 +92,44 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Customer, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -104,17 +140,25 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: BillingInfo,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Customer, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Customer, Error]] :
|
||||
"""This includes billing address, phone, and name.
|
||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
|
||||
""" # noqa: E501
|
||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/payment/tax".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/payment/tax".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,21 +72,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,13 +103,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501
|
||||
""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitAngleConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitAngleConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAngleConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitAngleConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitAngleConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitAngleConversion, Error]] :
|
||||
"""Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitAngle,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitAngleConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitAngleConversion, Error]] :
|
||||
"""Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitAreaConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitAreaConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAreaConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitAreaConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitAreaConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitAreaConversion, Error]] :
|
||||
"""Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitArea,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitAreaConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitAreaConversion, Error]] :
|
||||
"""Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitCurrentConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitCurrentConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitCurrentConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitCurrentConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitCurrentConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitCurrentConversion, Error]] :
|
||||
"""Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitCurrent,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitCurrentConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitCurrentConversion, Error]] :
|
||||
"""Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitEnergyConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitEnergyConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitEnergyConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitEnergyConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitEnergyConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitEnergyConversion, Error]] :
|
||||
"""Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitEnergy,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitEnergyConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitEnergyConversion, Error]] :
|
||||
"""Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitForceConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitForceConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitForceConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitForceConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitForceConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitForceConversion, Error]] :
|
||||
"""Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitForce,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitForceConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitForceConversion, Error]] :
|
||||
"""Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitFrequencyConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitFrequencyConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitFrequencyConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitFrequencyConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitFrequencyConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitFrequencyConversion, Error]] :
|
||||
"""Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitFrequency,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitFrequencyConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitFrequencyConversion, Error]] :
|
||||
"""Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitLengthConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitLengthConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitLengthConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitLengthConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitLengthConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitLengthConversion, Error]] :
|
||||
"""Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitLength,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitLengthConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitLengthConversion, Error]] :
|
||||
"""Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitMassConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitMassConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitMassConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitMassConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitMassConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitMassConversion, Error]] :
|
||||
"""Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitMass,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitMassConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitMassConversion, Error]] :
|
||||
"""Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitPowerConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitPowerConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPowerConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitPowerConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitPowerConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitPowerConversion, Error]] :
|
||||
"""Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPower,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitPowerConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitPowerConversion, Error]] :
|
||||
"""Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitPressureConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitPressureConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPressureConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitPressureConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitPressureConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitPressureConversion, Error]] :
|
||||
"""Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitPressure,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitPressureConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitPressureConversion, Error]] :
|
||||
"""Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitTemperatureConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitTemperatureConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTemperatureConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitTemperatureConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitTemperatureConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitTemperatureConversion, Error]] :
|
||||
"""Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTemperature,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitTemperatureConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitTemperatureConversion, Error]] :
|
||||
"""Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitTorqueConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitTorqueConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTorqueConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitTorqueConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitTorqueConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitTorqueConversion, Error]] :
|
||||
"""Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitTorque,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitTorqueConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitTorqueConversion, Error]] :
|
||||
"""Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,23 +10,44 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(
|
||||
client.base_url,
|
||||
input_unit=input_unit,
|
||||
output_unit=output_unit,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if value is not None:
|
||||
if "?" in url:
|
||||
url = url + "&value=" + str(value)
|
||||
else:
|
||||
url = url + "?value=" + str(value)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UnitVolumeConversion, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitVolumeConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitVolumeConversion, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UnitVolumeConversion.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -66,16 +87,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -88,33 +130,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
input_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitVolumeConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitVolumeConversion, Error]] :
|
||||
"""Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
output_unit: UnitVolume,
|
||||
|
||||
|
||||
|
||||
value: float,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[UnitVolumeConversion, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UnitVolumeConversion, Error]] :
|
||||
"""Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_unit=input_unit,
|
||||
|
||||
output_unit=output_unit,
|
||||
|
||||
value=value,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -1 +1 @@
|
||||
""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
|
||||
""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,23 +72,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
|
||||
""" # noqa: E501
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
|
||||
""" # noqa: E501
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/session/{token}".format(
|
||||
client.base_url,
|
||||
token=token,
|
||||
) # noqa: E501
|
||||
url = "{}/user/session/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Session.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Session.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -72,25 +91,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Session, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -101,15 +138,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Session, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/users/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -72,27 +91,45 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -103,17 +140,26 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users-extended/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/users-extended/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -56,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -74,27 +91,45 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -105,17 +140,26 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/front-hash".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/front-hash".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = response.text
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = response.text
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -51,10 +55,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,21 +74,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[str, Error]]:
|
||||
|
||||
) -> Optional[Union[str, Error]] :
|
||||
"""This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -92,13 +105,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[str, Error]]:
|
||||
|
||||
) -> Optional[Union[str, Error]] :
|
||||
"""This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/onboarding".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/onboarding".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,21 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
|
||||
) -> Optional[Union[Onboarding, Error]] :
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -93,13 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
|
||||
) -> Optional[Union[Onboarding, Error]] :
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,22 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -94,14 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/extended".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/extended".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,22 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -96,14 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/users".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UserResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,33 +142,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users-extended".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/users-extended".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,33 +142,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,13 +10,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -55,12 +65,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -73,25 +92,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -102,15 +139,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
Reference in New Issue
Block a user