* bump

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-05-04 01:23:25 -07:00
committed by GitHub
parent 4bb01c8473
commit 77cd2c0956
5 changed files with 3 additions and 152 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,95 +0,0 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/_meta/metrics".format(client.base_url) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[Any,]]:
return None
return None
def _build_response(
*, response: httpx.Response
) -> Response[Union[Any,]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Union[Any,]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[Any,]]:
"""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[Union[Any,]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[Any,]]:
"""You must be a KittyCAD employee to perform this request.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -37,7 +37,6 @@ from kittycad.api.hidden import auth_email, auth_email_callback, logout
from kittycad.api.meta import ( from kittycad.api.meta import (
get_ai_plugin_manifest, get_ai_plugin_manifest,
get_metadata, get_metadata,
get_metrics,
get_openai_schema, get_openai_schema,
get_schema, get_schema,
ping, ping,
@ -239,38 +238,6 @@ async def test_get_metadata_async():
) )
@pytest.mark.skip
def test_get_metrics():
# Create our client.
client = ClientFromEnv()
get_metrics.sync(
client=client,
)
# OR if you need more info (e.g. status_code)
get_metrics.sync_detailed(
client=client,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_get_metrics_async():
# Create our client.
client = ClientFromEnv()
await get_metrics.asyncio(
client=client,
)
# OR run async with more info
await get_metrics.asyncio_detailed(
client=client,
)
@pytest.mark.skip @pytest.mark.skip
def test_create_image_to_3d(): def test_create_image_to_3d():
# Create our client. # Create our client.

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "kittycad" name = "kittycad"
version = "0.3.8" version = "0.3.9"
description = "A client library for accessing KittyCAD" description = "A client library for accessing KittyCAD"
authors = [] authors = []

View File

@ -12020,27 +12020,6 @@
] ]
} }
}, },
"/_meta/metrics": {
"get": {
"description": "You must be a KittyCAD employee to perform this request.",
"operationId": "get_metrics",
"responses": {
"default": {
"content": {
"*/*": {
"schema": {}
}
},
"description": ""
}
},
"summary": "Get prometheus metrics",
"tags": [
"meta",
"hidden"
]
}
},
"/ai/image-to-3d/{input_format}/{output_format}": { "/ai/image-to-3d/{input_format}/{output_format}": {
"post": { "post": {
"description": "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.", "description": "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.",