@ -7,446 +7,6 @@
|
|||||||
"install": "pip install kittycad"
|
"install": "pip install kittycad"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1.well-known~1ai-plugin.json/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1logout/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1front-hash/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1invoices/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1_meta~1info/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1mass/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1auth~1email~1callback/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1density/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1methods/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1api-calls/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1balance/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1tax/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users-extended~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1surface-area/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1execute~1{lang}/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1api-call-metrics/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/delete/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/put/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1async~1operations~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1auth~1email/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-calls/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1async~1operations/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens~1{token}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1extended/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1volume/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
@ -457,18 +17,18 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
"path": "/paths/~1file~1execute~1{lang}/post/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1onboarding/get/x-python",
|
"path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -481,10 +41,74 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1center-of-mass/post/x-python",
|
"path": "/paths/~1_meta~1info/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-call-metrics/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1async~1operations/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1methods/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -495,6 +119,366 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1center-of-mass/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1onboarding/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1front-hash/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1.well-known~1ai-plugin.json/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1density/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1auth~1email~1callback/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user/put/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ws~1modeling~1commands/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1auth~1email/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1mass/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1volume/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1invoices/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1extended/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1surface-area/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens~1{token}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1logout/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1tax/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1balance/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1async~1operations~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users-extended/get/x-python",
|
"path": "/paths/~1users-extended/get/x-python",
|
||||||
@ -505,10 +489,18 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1payment/put/x-python",
|
"path": "/paths/~1users-extended~1{id}/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -537,18 +529,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1ws~1modeling~1commands/get/x-python",
|
"path": "/paths/~1user~1payment/put/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users/get/x-python",
|
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_format: ImageType,
|
input_format: ImageType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(
|
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(client.base_url, input_format=input_format,output_format=output_format,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_format=input_format,
|
|
||||||
output_format=output_format,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -35,22 +56,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Mesh.from_dict(response.json())
|
response_200 = Mesh.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -60,16 +82,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_format: ImageType,
|
input_format: ImageType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_format=input_format,
|
input_format=input_format,
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,33 +125,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_format: ImageType,
|
input_format: ImageType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_format=input_format,
|
input_format=input_format,
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_format: ImageType,
|
input_format: ImageType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_format=input_format,
|
input_format=input_format,
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -119,19 +204,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_format: ImageType,
|
input_format: ImageType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_format=input_format,
|
input_format=input_format,
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,21 +10,36 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prompt: str,
|
prompt: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/ai/text-to-3d/{output_format}".format(
|
url = "{}/ai/text-to-3d/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
output_format=output_format,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if prompt is not None:
|
if prompt is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&prompt=" + str(prompt)
|
url = url + "&prompt=" + str(prompt)
|
||||||
else:
|
else:
|
||||||
url = url + "?prompt=" + str(prompt)
|
url = url + "?prompt=" + str(prompt)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -34,25 +49,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Mesh.from_dict(response.json())
|
response_200 = Mesh.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -62,14 +79,29 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prompt: str,
|
prompt: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
prompt=prompt,
|
prompt=prompt,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,29 +114,59 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prompt: str,
|
prompt: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
prompt=prompt,
|
prompt=prompt,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prompt: str,
|
prompt: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
prompt=prompt,
|
prompt=prompt,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -115,17 +177,32 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prompt: str,
|
prompt: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
prompt=prompt,
|
prompt=prompt,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/api-calls/{id}".format(
|
url = "{}/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -56,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,27 +91,45 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -105,17 +140,26 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
Only KittyCAD employees can view API calls for other users.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,14 +9,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-calls/{id}".format(
|
url = "{}/user/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiCallWithPrice, Error]]:
|
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -56,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,25 +91,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,15 +138,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,19 +10,28 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
group_by: ApiCallQueryGroupBy,
|
group_by: ApiCallQueryGroupBy,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/api-call-metrics".format(
|
url = "{}/api-call-metrics".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if group_by is not None:
|
if group_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&group_by=" + str(group_by)
|
url = url + "&group_by=" + str(group_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?group_by=" + str(group_by)
|
url = url + "?group_by=" + str(group_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -32,27 +41,30 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[ApiCallQueryGroup], Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[List[ApiCallQueryGroup], Error]]:
|
response_200 = [
|
||||||
if response.status_code == 200:
|
ApiCallQueryGroup.from_dict(item)
|
||||||
response_200 = [ApiCallQueryGroup.from_dict(item) for item in response.json()]
|
for item in response.json()
|
||||||
return response_200
|
]
|
||||||
if response.status_code == 400:
|
return response_200
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_4XX
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_4XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_5XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
return Error.from_dict(response.json())
|
return response_5XX
|
||||||
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -62,12 +74,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
group_by: ApiCallQueryGroupBy,
|
group_by: ApiCallQueryGroupBy,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
group_by=group_by,
|
group_by=group_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -80,25 +101,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
group_by: ApiCallQueryGroupBy,
|
group_by: ApiCallQueryGroupBy,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
group_by=group_by,
|
group_by=group_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
group_by: ApiCallQueryGroupBy,
|
group_by: ApiCallQueryGroupBy,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
group_by=group_by,
|
group_by=group_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -109,15 +148,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
group_by: ApiCallQueryGroupBy,
|
group_by: ApiCallQueryGroupBy,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
group_by=group_by,
|
group_by=group_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -14,14 +14,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/async/operations/{id}".format(
|
url = "{}/async/operations/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -31,102 +39,80 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[
|
data = response.json()
|
||||||
Union[
|
try:
|
||||||
FileConversion,
|
if not isinstance(data, dict):
|
||||||
FileCenterOfMass,
|
raise TypeError()
|
||||||
FileMass,
|
option_file_conversion = FileConversion.from_dict(data)
|
||||||
FileVolume,
|
return option_file_conversion
|
||||||
FileDensity,
|
except ValueError:
|
||||||
FileSurfaceArea,
|
pass
|
||||||
Error,
|
except TypeError:
|
||||||
]
|
pass
|
||||||
]:
|
try:
|
||||||
if response.status_code == 200:
|
if not isinstance(data, dict):
|
||||||
data = response.json()
|
raise TypeError()
|
||||||
try:
|
option_file_center_of_mass = FileCenterOfMass.from_dict(data)
|
||||||
if not isinstance(data, dict):
|
return option_file_center_of_mass
|
||||||
raise TypeError()
|
except ValueError:
|
||||||
option_file_conversion = FileConversion.from_dict(data)
|
pass
|
||||||
return option_file_conversion
|
except TypeError:
|
||||||
except ValueError:
|
pass
|
||||||
pass
|
try:
|
||||||
except TypeError:
|
if not isinstance(data, dict):
|
||||||
pass
|
raise TypeError()
|
||||||
try:
|
option_file_mass = FileMass.from_dict(data)
|
||||||
if not isinstance(data, dict):
|
return option_file_mass
|
||||||
raise TypeError()
|
except ValueError:
|
||||||
option_file_center_of_mass = FileCenterOfMass.from_dict(data)
|
pass
|
||||||
return option_file_center_of_mass
|
except TypeError:
|
||||||
except ValueError:
|
pass
|
||||||
pass
|
try:
|
||||||
except TypeError:
|
if not isinstance(data, dict):
|
||||||
pass
|
raise TypeError()
|
||||||
try:
|
option_file_volume = FileVolume.from_dict(data)
|
||||||
if not isinstance(data, dict):
|
return option_file_volume
|
||||||
raise TypeError()
|
except ValueError:
|
||||||
option_file_mass = FileMass.from_dict(data)
|
pass
|
||||||
return option_file_mass
|
except TypeError:
|
||||||
except ValueError:
|
pass
|
||||||
pass
|
try:
|
||||||
except TypeError:
|
if not isinstance(data, dict):
|
||||||
pass
|
raise TypeError()
|
||||||
try:
|
option_file_density = FileDensity.from_dict(data)
|
||||||
if not isinstance(data, dict):
|
return option_file_density
|
||||||
raise TypeError()
|
except ValueError:
|
||||||
option_file_volume = FileVolume.from_dict(data)
|
pass
|
||||||
return option_file_volume
|
except TypeError:
|
||||||
except ValueError:
|
pass
|
||||||
pass
|
try:
|
||||||
except TypeError:
|
if not isinstance(data, dict):
|
||||||
pass
|
raise TypeError()
|
||||||
try:
|
option_file_surface_area = FileSurfaceArea.from_dict(data)
|
||||||
if not isinstance(data, dict):
|
return option_file_surface_area
|
||||||
raise TypeError()
|
except ValueError:
|
||||||
option_file_density = FileDensity.from_dict(data)
|
raise
|
||||||
return option_file_density
|
except TypeError:
|
||||||
except ValueError:
|
raise
|
||||||
pass
|
if response.status_code == 400:
|
||||||
except TypeError:
|
response_4XX = Error.from_dict(response.json())
|
||||||
pass
|
return response_4XX
|
||||||
try:
|
if response.status_code == 500:
|
||||||
if not isinstance(data, dict):
|
response_5XX = Error.from_dict(response.json())
|
||||||
raise TypeError()
|
return response_5XX
|
||||||
option_file_surface_area = FileSurfaceArea.from_dict(data)
|
return Error.from_dict(response.json())
|
||||||
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(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[
|
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||||
Optional[
|
|
||||||
Union[
|
|
||||||
FileConversion,
|
|
||||||
FileCenterOfMass,
|
|
||||||
FileMass,
|
|
||||||
FileVolume,
|
|
||||||
FileDensity,
|
|
||||||
FileSurfaceArea,
|
|
||||||
Error,
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]:
|
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -136,24 +122,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[
|
|
||||||
Optional[
|
|
||||||
Union[
|
|
||||||
FileConversion,
|
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||||
FileCenterOfMass,
|
|
||||||
FileMass,
|
|
||||||
FileVolume,
|
|
||||||
FileDensity,
|
|
||||||
FileSurfaceArea,
|
|
||||||
Error,
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]:
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -166,51 +149,46 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[
|
|
||||||
Union[
|
|
||||||
FileConversion,
|
|
||||||
FileCenterOfMass,
|
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||||
FileMass,
|
|
||||||
FileVolume,
|
|
||||||
FileDensity,
|
|
||||||
FileSurfaceArea,
|
|
||||||
Error,
|
|
||||||
]
|
|
||||||
]:
|
|
||||||
"""Get the status and output of an async operation.
|
"""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.
|
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.
|
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.
|
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[
|
|
||||||
Optional[
|
|
||||||
Union[
|
|
||||||
FileConversion,
|
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||||
FileCenterOfMass,
|
|
||||||
FileMass,
|
|
||||||
FileVolume,
|
|
||||||
FileDensity,
|
|
||||||
FileSurfaceArea,
|
|
||||||
Error,
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]:
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -221,29 +199,27 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[
|
|
||||||
Union[
|
|
||||||
FileConversion,
|
|
||||||
FileCenterOfMass,
|
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||||
FileMass,
|
|
||||||
FileVolume,
|
|
||||||
FileDensity,
|
|
||||||
FileSurfaceArea,
|
|
||||||
Error,
|
|
||||||
]
|
|
||||||
]:
|
|
||||||
"""Get the status and output of an async operation.
|
"""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.
|
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.
|
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.
|
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,33 +10,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/api-calls".format(
|
url = "{}/api-calls".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -76,16 +99,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,33 +142,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,35 +10,64 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/users/{id}/api-calls".format(
|
url = "{}/users/{id}/api-calls".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -48,27 +77,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -78,18 +107,45 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -102,41 +158,94 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
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.
|
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.
|
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -147,25 +256,51 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
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.
|
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.
|
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -11,40 +11,70 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status: ApiCallStatus,
|
status: ApiCallStatus,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/async/operations".format(
|
url = "{}/async/operations".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if status is not None:
|
if status is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&status=" + str(status)
|
url = url + "&status=" + str(status)
|
||||||
else:
|
else:
|
||||||
url = url + "?status=" + str(status)
|
url = url + "?status=" + str(status)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -54,27 +84,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[AsyncApiCallResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[AsyncApiCallResultsPage, Error]]:
|
response_200 = AsyncApiCallResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = AsyncApiCallResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -84,18 +114,45 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status: ApiCallStatus,
|
status: ApiCallStatus,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
status=status,
|
status=status,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -108,38 +165,92 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status: ApiCallStatus,
|
status: ApiCallStatus,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
status=status,
|
status=status,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status: ApiCallStatus,
|
status: ApiCallStatus,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
status=status,
|
status=status,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -150,22 +261,49 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status: ApiCallStatus,
|
status: ApiCallStatus,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
status=status,
|
status=status,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,33 +10,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-calls".format(
|
url = "{}/user/api-calls".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
|
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -76,16 +99,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,35 +142,76 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -137,21 +222,41 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-tokens".format(
|
url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] :
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
response_201 = ApiToken.from_dict(response.json())
|
response_201 = ApiToken.from_dict(response.json())
|
||||||
return response_201
|
return response_201
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,21 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -93,13 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,14 +8,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-tokens/{token}".format(
|
url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
token=token,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -25,21 +33,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,27 +88,44 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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 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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,17 +136,25 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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 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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,14 +9,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-tokens/{token}".format(
|
url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
token=token,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = ApiToken.from_dict(response.json())
|
response_200 = ApiToken.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,25 +91,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ApiToken, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -101,15 +138,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,33 +10,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/api-tokens".format(
|
url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiTokenResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ApiTokenResultsPage, Error]]:
|
response_200 = ApiTokenResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ApiTokenResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -76,16 +99,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,35 +142,76 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -137,21 +222,41 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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.
|
"""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.
|
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/apps/github/callback".format(
|
url = "{}/apps/github/callback".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,23 +72,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/apps/github/consent".format(
|
url = "{}/apps/github/consent".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[AppClientInfo, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[AppClientInfo, Error]]:
|
response_200 = AppClientInfo.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = AppClientInfo.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,23 +75,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[AppClientInfo, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -97,15 +107,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,13 +8,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/apps/github/webhook".format(
|
url = "{}/apps/github/webhook".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -28,18 +37,21 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,25 +88,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""These come from the GitHub app.""" # noqa: E501
|
"""These come from the GitHub app.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,15 +135,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""These come from the GitHub app.""" # noqa: E501
|
"""These come from the GitHub app.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> 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()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -21,42 +25,45 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> ClientConnection:
|
) -> ClientConnection:
|
||||||
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
with ws_connect(
|
with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket:
|
||||||
kwargs["url"].replace("https://", "wss://"),
|
return websocket # type: ignore
|
||||||
additional_headers=kwargs["headers"],
|
|
||||||
) as websocket:
|
|
||||||
return websocket # type: ignore
|
|
||||||
|
|
||||||
# Return an error if we got here.
|
# Return an error if we got here.
|
||||||
return Error(message="An error occurred while connecting to the websocket.")
|
return Error(message="An error occurred while connecting to the websocket.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> WebSocketClientProtocol:
|
) -> WebSocketClientProtocol:
|
||||||
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
"""Attach to a docker container to create an interactive terminal.""" # noqa: E501
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
async with ws_connect_async(
|
async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket:
|
||||||
kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]
|
|
||||||
) as websocket:
|
|
||||||
return websocket
|
return websocket
|
||||||
|
|
||||||
# Return an error if we got here.
|
# Return an error if we got here.
|
||||||
|
|||||||
@ -10,22 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
lang: CodeLanguage,
|
lang: CodeLanguage,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/execute/{lang}".format(
|
url = "{}/file/execute/{lang}".format(client.base_url, lang=lang,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
lang=lang,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if output is not None:
|
if output is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output=" + str(output)
|
url = url + "&output=" + str(output)
|
||||||
else:
|
else:
|
||||||
url = url + "?output=" + str(output)
|
url = url + "?output=" + str(output)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -39,22 +61,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = CodeOutput.from_dict(response.json())
|
response_200 = CodeOutput.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -64,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
lang: CodeLanguage,
|
lang: CodeLanguage,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
|
||||||
output=output,
|
output=output,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -86,31 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
lang: CodeLanguage,
|
lang: CodeLanguage,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Optional[Union[CodeOutput, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[CodeOutput, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
|
||||||
output=output,
|
output=output,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
lang: CodeLanguage,
|
lang: CodeLanguage,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[CodeOutput, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
|
||||||
output=output,
|
output=output,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -121,17 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
lang: CodeLanguage,
|
lang: CodeLanguage,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Optional[Union[CodeOutput, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[CodeOutput, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
|
||||||
output=output,
|
output=output,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/center-of-mass".format(
|
url = "{}/file/center-of-mass".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
url = url + "?src_format=" + str(src_format)
|
url = url + "?src_format=" + str(src_format)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -45,24 +68,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileCenterOfMass, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 201:
|
||||||
) -> Optional[Union[FileCenterOfMass, Error]]:
|
response_201 = FileCenterOfMass.from_dict(response.json())
|
||||||
if response.status_code == 201:
|
return response_201
|
||||||
response_201 = FileCenterOfMass.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_201
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -72,16 +94,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -94,38 +137,79 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -136,24 +220,44 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -11,17 +11,38 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/conversion/{src_format}/{output_format}".format(
|
url = "{}/file/conversion/{src_format}/{output_format}".format(client.base_url, output_format=output_format,src_format=src_format,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -35,24 +56,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 201:
|
||||||
) -> Optional[Union[FileConversion, Error]]:
|
response_201 = FileConversion.from_dict(response.json())
|
||||||
if response.status_code == 201:
|
return response_201
|
||||||
response_201 = FileConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_201
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -62,16 +82,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -84,37 +125,78 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[FileConversion, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[FileConversion, Error]] :
|
||||||
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
|
"""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.
|
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 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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,23 +207,43 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
output_format: FileExportFormat,
|
output_format: FileExportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[FileConversion, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[FileConversion, Error]] :
|
||||||
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
|
"""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.
|
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 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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -12,41 +12,78 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_mass_unit: UnitMass,
|
material_mass_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitDensity,
|
output_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/density".format(
|
url = "{}/file/density".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if material_mass is not None:
|
if material_mass is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_mass=" + str(material_mass)
|
url = url + "&material_mass=" + str(material_mass)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_mass=" + str(material_mass)
|
url = url + "?material_mass=" + str(material_mass)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if material_mass_unit is not None:
|
if material_mass_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_mass_unit=" + str(material_mass_unit)
|
url = url + "&material_mass_unit=" + str(material_mass_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_mass_unit=" + str(material_mass_unit)
|
url = url + "?material_mass_unit=" + str(material_mass_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
url = url + "?src_format=" + str(src_format)
|
url = url + "?src_format=" + str(src_format)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -60,22 +97,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]] :
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
response_201 = FileDensity.from_dict(response.json())
|
response_201 = FileDensity.from_dict(response.json())
|
||||||
return response_201
|
return response_201
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -85,20 +123,53 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_mass_unit: UnitMass,
|
material_mass_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitDensity,
|
output_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
material_mass=material_mass,
|
material_mass=material_mass,
|
||||||
|
|
||||||
material_mass_unit=material_mass_unit,
|
material_mass_unit=material_mass_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -111,46 +182,111 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_mass_unit: UnitMass,
|
material_mass_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitDensity,
|
output_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
material_mass=material_mass,
|
material_mass=material_mass,
|
||||||
|
|
||||||
material_mass_unit=material_mass_unit,
|
material_mass_unit=material_mass_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_mass_unit: UnitMass,
|
material_mass_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitDensity,
|
output_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileDensity, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileDensity, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
material_mass=material_mass,
|
material_mass=material_mass,
|
||||||
|
|
||||||
material_mass_unit=material_mass_unit,
|
material_mass_unit=material_mass_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -161,28 +297,60 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_mass_unit: UnitMass,
|
material_mass_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitDensity,
|
output_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
material_mass=material_mass,
|
material_mass=material_mass,
|
||||||
|
|
||||||
material_mass_unit=material_mass_unit,
|
material_mass_unit=material_mass_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -12,41 +12,78 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
material_density: float,
|
material_density: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_density_unit: UnitDensity,
|
material_density_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/mass".format(
|
url = "{}/file/mass".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if material_density is not None:
|
if material_density is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_density=" + str(material_density)
|
url = url + "&material_density=" + str(material_density)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_density=" + str(material_density)
|
url = url + "?material_density=" + str(material_density)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if material_density_unit is not None:
|
if material_density_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_density_unit=" + str(material_density_unit)
|
url = url + "&material_density_unit=" + str(material_density_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_density_unit=" + str(material_density_unit)
|
url = url + "?material_density_unit=" + str(material_density_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
url = url + "?src_format=" + str(src_format)
|
url = url + "?src_format=" + str(src_format)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -60,22 +97,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]] :
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
response_201 = FileMass.from_dict(response.json())
|
response_201 = FileMass.from_dict(response.json())
|
||||||
return response_201
|
return response_201
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -85,20 +123,53 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
material_density: float,
|
material_density: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_density_unit: UnitDensity,
|
material_density_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
material_density=material_density,
|
material_density=material_density,
|
||||||
|
|
||||||
material_density_unit=material_density_unit,
|
material_density_unit=material_density_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -111,46 +182,111 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
material_density: float,
|
material_density: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_density_unit: UnitDensity,
|
material_density_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
material_density=material_density,
|
material_density=material_density,
|
||||||
|
|
||||||
material_density_unit=material_density_unit,
|
material_density_unit=material_density_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
material_density: float,
|
material_density: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_density_unit: UnitDensity,
|
material_density_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileMass, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileMass, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
material_density=material_density,
|
material_density=material_density,
|
||||||
|
|
||||||
material_density_unit=material_density_unit,
|
material_density_unit=material_density_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -161,28 +297,60 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
material_density: float,
|
material_density: float,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
material_density_unit: UnitDensity,
|
material_density_unit: UnitDensity,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
material_density=material_density,
|
material_density=material_density,
|
||||||
|
|
||||||
material_density_unit=material_density_unit,
|
material_density_unit=material_density_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -11,27 +11,50 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/surface-area".format(
|
url = "{}/file/surface-area".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
url = url + "?src_format=" + str(src_format)
|
url = url + "?src_format=" + str(src_format)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -45,24 +68,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileSurfaceArea, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 201:
|
||||||
) -> Optional[Union[FileSurfaceArea, Error]]:
|
response_201 = FileSurfaceArea.from_dict(response.json())
|
||||||
if response.status_code == 201:
|
return response_201
|
||||||
response_201 = FileSurfaceArea.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_201
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -72,16 +94,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -94,38 +137,79 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -136,24 +220,44 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -11,27 +11,50 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/file/volume".format(
|
url = "{}/file/volume".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
url = url + "?src_format=" + str(src_format)
|
url = url + "?src_format=" + str(src_format)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -45,22 +68,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]] :
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
response_201 = FileVolume.from_dict(response.json())
|
response_201 = FileVolume.from_dict(response.json())
|
||||||
return response_201
|
return response_201
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -70,16 +94,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -92,38 +137,79 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[FileVolume, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[FileVolume, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -134,24 +220,44 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
src_format: FileImportFormat,
|
src_format: FileImportFormat,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body: bytes,
|
body: bytes,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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.
|
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.
|
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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
body: EmailAuthenticationForm,
|
body: EmailAuthenticationForm,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/auth/email".format(
|
url = "{}/auth/email".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -30,24 +39,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[VerificationToken, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 201:
|
||||||
) -> Optional[Union[VerificationToken, Error]]:
|
response_201 = VerificationToken.from_dict(response.json())
|
||||||
if response.status_code == 201:
|
return response_201
|
||||||
response_201 = VerificationToken.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_201
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -57,12 +65,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: EmailAuthenticationForm,
|
body: EmailAuthenticationForm,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -75,23 +92,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
body: EmailAuthenticationForm,
|
body: EmailAuthenticationForm,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[VerificationToken, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[VerificationToken, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: EmailAuthenticationForm,
|
body: EmailAuthenticationForm,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[VerificationToken, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -102,13 +139,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
body: EmailAuthenticationForm,
|
body: EmailAuthenticationForm,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[VerificationToken, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[VerificationToken, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,33 +8,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
email: str,
|
email: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/auth/email/callback".format(
|
url = "{}/auth/email/callback".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if callback_url is not None:
|
if callback_url is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&callback_url=" + str(callback_url)
|
url = url + "&callback_url=" + str(callback_url)
|
||||||
else:
|
else:
|
||||||
url = url + "?callback_url=" + str(callback_url)
|
url = url + "?callback_url=" + str(callback_url)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if email is not None:
|
if email is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&email=" + str(email)
|
url = url + "&email=" + str(email)
|
||||||
else:
|
else:
|
||||||
url = url + "?email=" + str(email)
|
url = url + "?email=" + str(email)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if token is not None:
|
if token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&token=" + str(token)
|
url = url + "&token=" + str(token)
|
||||||
else:
|
else:
|
||||||
url = url + "?token=" + str(token)
|
url = url + "?token=" + str(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -44,21 +67,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -68,16 +95,37 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
email: str,
|
email: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
|
|
||||||
email=email,
|
email=email,
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -90,31 +138,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
email: str,
|
email: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Error] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
|
|
||||||
email=email,
|
email=email,
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
email: str,
|
email: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
|
|
||||||
email=email,
|
email=email,
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,17 +217,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
email: str,
|
email: str,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Error] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
|
|
||||||
email=email,
|
email=email,
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/logout".format(
|
url = "{}/logout".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,21 +72,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This is used in logout scenarios.""" # noqa: E501
|
"""This is used in logout scenarios.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,13 +103,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This is used in logout scenarios.""" # noqa: E501
|
"""This is used in logout scenarios.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/.well-known/ai-plugin.json".format(
|
url = "{}/.well-known/ai-plugin.json".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPluginManifest, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
response_200 = AiPluginManifest.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = AiPluginManifest.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,19 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
|
||||||
|
) -> Optional[Union[AiPluginManifest, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -93,11 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
|
||||||
|
) -> Optional[Union[AiPluginManifest, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/_meta/info".format(
|
url = "{}/_meta/info".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Metadata.from_dict(response.json())
|
response_200 = Metadata.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,22 +75,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Metadata, Error]]:
|
|
||||||
|
) -> Optional[Union[Metadata, Error]] :
|
||||||
"""This includes information on any of our other distributed systems it is connected to.
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -94,14 +107,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Metadata, Error]]:
|
|
||||||
|
) -> Optional[Union[Metadata, Error]] :
|
||||||
"""This includes information on any of our other distributed systems it is connected to.
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/openai/openapi.json".format(
|
url = "{}/openai/openapi.json".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = response.json()
|
response_200 = response.json()
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -51,10 +55,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,21 +74,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -92,13 +105,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/".format(
|
url = "{}/".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = response.json()
|
response_200 = response.json()
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -51,10 +55,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,19 +74,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[dict, Error]]:
|
|
||||||
|
) -> Optional[Union[dict, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[dict, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -90,11 +105,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[dict, Error]]:
|
|
||||||
|
) -> Optional[Union[dict, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/ping".format(
|
url = "{}/ping".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Pong.from_dict(response.json())
|
response_200 = Pong.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Pong, Error]]]:
|
) -> Response[Optional[Union[Pong, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Pong, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Pong, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,19 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Pong, Error]]:
|
|
||||||
|
) -> Optional[Union[Pong, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Pong, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Pong, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -91,11 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Pong, Error]]:
|
|
||||||
|
) -> Optional[Union[Pong, Error]] :
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
fps: int,
|
fps: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
webrtc: bool,
|
webrtc: bool,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> 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 fps is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&fps=" + str(fps)
|
url = url + "&fps=" + str(fps)
|
||||||
else:
|
else:
|
||||||
url = url + "?fps=" + str(fps)
|
url = url + "?fps=" + str(fps)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if unlocked_framerate is not None:
|
if unlocked_framerate is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&unlocked_framerate=" + str(unlocked_framerate)
|
url = url + "&unlocked_framerate=" + str(unlocked_framerate)
|
||||||
else:
|
else:
|
||||||
url = url + "?unlocked_framerate=" + str(unlocked_framerate)
|
url = url + "?unlocked_framerate=" + str(unlocked_framerate)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if video_res_height is not None:
|
if video_res_height is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&video_res_height=" + str(video_res_height)
|
url = url + "&video_res_height=" + str(video_res_height)
|
||||||
else:
|
else:
|
||||||
url = url + "?video_res_height=" + str(video_res_height)
|
url = url + "?video_res_height=" + str(video_res_height)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if video_res_width is not None:
|
if video_res_width is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&video_res_width=" + str(video_res_width)
|
url = url + "&video_res_width=" + str(video_res_width)
|
||||||
else:
|
else:
|
||||||
url = url + "?video_res_width=" + str(video_res_width)
|
url = url + "?video_res_width=" + str(video_res_width)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if webrtc is not None:
|
if webrtc is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&webrtc=" + str(webrtc)
|
url = url + "&webrtc=" + str(webrtc)
|
||||||
else:
|
else:
|
||||||
url = url + "?webrtc=" + str(webrtc)
|
url = url + "?webrtc=" + str(webrtc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -56,62 +95,125 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
fps: int,
|
fps: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
webrtc: bool,
|
webrtc: bool,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> ClientConnection:
|
) -> 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
|
"""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(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
fps=fps,
|
fps=fps,
|
||||||
|
|
||||||
unlocked_framerate=unlocked_framerate,
|
unlocked_framerate=unlocked_framerate,
|
||||||
|
|
||||||
video_res_height=video_res_height,
|
video_res_height=video_res_height,
|
||||||
|
|
||||||
video_res_width=video_res_width,
|
video_res_width=video_res_width,
|
||||||
|
|
||||||
webrtc=webrtc,
|
webrtc=webrtc,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
with ws_connect(
|
with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket:
|
||||||
kwargs["url"].replace("https://", "wss://"),
|
return websocket # type: ignore
|
||||||
additional_headers=kwargs["headers"],
|
|
||||||
) as websocket:
|
|
||||||
return websocket # type: ignore
|
|
||||||
|
|
||||||
# Return an error if we got here.
|
# Return an error if we got here.
|
||||||
return Error(message="An error occurred while connecting to the websocket.")
|
return Error(message="An error occurred while connecting to the websocket.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
fps: int,
|
fps: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
webrtc: bool,
|
webrtc: bool,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> WebSocketClientProtocol:
|
) -> 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
|
"""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(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
fps=fps,
|
fps=fps,
|
||||||
|
|
||||||
unlocked_framerate=unlocked_framerate,
|
unlocked_framerate=unlocked_framerate,
|
||||||
|
|
||||||
video_res_height=video_res_height,
|
video_res_height=video_res_height,
|
||||||
|
|
||||||
video_res_width=video_res_width,
|
video_res_width=video_res_width,
|
||||||
|
|
||||||
webrtc=webrtc,
|
webrtc=webrtc,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
async with ws_connect_async(
|
async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket:
|
||||||
kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]
|
|
||||||
) as websocket:
|
|
||||||
return websocket
|
return websocket
|
||||||
|
|
||||||
# Return an error if we got here.
|
# 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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment".format(
|
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||||
if response.status_code == 201:
|
if response.status_code == 201:
|
||||||
response_201 = Customer.from_dict(response.json())
|
response_201 = Customer.from_dict(response.json())
|
||||||
return response_201
|
return response_201
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -55,12 +65,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -73,27 +92,44 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -104,17 +140,25 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/intent".format(
|
url = "{}/user/payment/intent".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[PaymentIntent, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 201:
|
||||||
) -> Optional[Union[PaymentIntent, Error]]:
|
response_201 = PaymentIntent.from_dict(response.json())
|
||||||
if response.status_code == 201:
|
return response_201
|
||||||
response_201 = PaymentIntent.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_201
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,21 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[PaymentIntent, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,13 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment".format(
|
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,23 +72,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,14 +8,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/methods/{id}".format(
|
url = "{}/user/payment/methods/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -25,21 +33,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,25 +88,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,15 +135,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/balance".format(
|
url = "{}/user/payment/balance".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[CustomerBalance, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[CustomerBalance, Error]]:
|
response_200 = CustomerBalance.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = CustomerBalance.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,21 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,13 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment".format(
|
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Customer.from_dict(response.json())
|
response_200 = Customer.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,23 +75,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,15 +107,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/invoices".format(
|
url = "{}/user/payment/invoices".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,30 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[Invoice], Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[List[Invoice], Error]]:
|
response_200 = [
|
||||||
if response.status_code == 200:
|
Invoice.from_dict(item)
|
||||||
response_200 = [Invoice.from_dict(item) for item in response.json()]
|
for item in response.json()
|
||||||
return response_200
|
]
|
||||||
if response.status_code == 400:
|
return response_200
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_4XX
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_4XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_5XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
return Error.from_dict(response.json())
|
return response_5XX
|
||||||
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +59,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,21 +78,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[List[Invoice], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,13 +109,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/methods".format(
|
url = "{}/user/payment/methods".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,30 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[PaymentMethod], Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[List[PaymentMethod], Error]]:
|
response_200 = [
|
||||||
if response.status_code == 200:
|
PaymentMethod.from_dict(item)
|
||||||
response_200 = [PaymentMethod.from_dict(item) for item in response.json()]
|
for item in response.json()
|
||||||
return response_200
|
]
|
||||||
if response.status_code == 400:
|
return response_200
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_4XX
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_4XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_5XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
return Error.from_dict(response.json())
|
return response_5XX
|
||||||
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +59,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,21 +78,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,13 +109,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,13 +10,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment".format(
|
url = "{}/user/payment".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Customer.from_dict(response.json())
|
response_200 = Customer.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -55,12 +65,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -73,27 +92,44 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Customer, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Customer, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -104,17 +140,25 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
body: BillingInfo,
|
body: BillingInfo,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Customer, Error]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Optional[Union[Customer, Error]] :
|
||||||
"""This includes billing address, phone, and name.
|
"""This includes billing address, phone, and name.
|
||||||
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
|
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/payment/tax".format(
|
url = "{}/user/payment/tax".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,21 +72,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,13 +103,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitAngle,
|
input_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitAngle,
|
output_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAngleConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitAngleConversion, Error]]:
|
response_200 = UnitAngleConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitAngleConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitAngle,
|
input_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitAngle,
|
output_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitAngle,
|
input_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitAngle,
|
output_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitAngle,
|
input_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitAngle,
|
output_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitAngleConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitAngle,
|
input_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitAngle,
|
output_unit: UnitAngle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitArea,
|
input_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAreaConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitAreaConversion, Error]]:
|
response_200 = UnitAreaConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitAreaConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitArea,
|
input_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitArea,
|
input_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitArea,
|
input_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitAreaConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitArea,
|
input_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitArea,
|
output_unit: UnitArea,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitCurrent,
|
input_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitCurrent,
|
output_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitCurrentConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitCurrentConversion, Error]]:
|
response_200 = UnitCurrentConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitCurrentConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitCurrent,
|
input_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitCurrent,
|
output_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitCurrent,
|
input_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitCurrent,
|
output_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitCurrent,
|
input_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitCurrent,
|
output_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitCurrentConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitCurrent,
|
input_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitCurrent,
|
output_unit: UnitCurrent,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitEnergy,
|
input_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitEnergy,
|
output_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitEnergyConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitEnergyConversion, Error]]:
|
response_200 = UnitEnergyConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitEnergyConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitEnergy,
|
input_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitEnergy,
|
output_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitEnergy,
|
input_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitEnergy,
|
output_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitEnergy,
|
input_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitEnergy,
|
output_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitEnergy,
|
input_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitEnergy,
|
output_unit: UnitEnergy,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitForce,
|
input_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitForce,
|
output_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitForceConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitForceConversion, Error]]:
|
response_200 = UnitForceConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitForceConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitForce,
|
input_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitForce,
|
output_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitForce,
|
input_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitForce,
|
output_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitForce,
|
input_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitForce,
|
output_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitForceConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitForce,
|
input_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitForce,
|
output_unit: UnitForce,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitFrequency,
|
input_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitFrequency,
|
output_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitFrequencyConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitFrequencyConversion, Error]]:
|
response_200 = UnitFrequencyConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitFrequencyConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitFrequency,
|
input_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitFrequency,
|
output_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitFrequency,
|
input_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitFrequency,
|
output_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitFrequency,
|
input_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitFrequency,
|
output_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitFrequency,
|
input_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitFrequency,
|
output_unit: UnitFrequency,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitLength,
|
input_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitLengthConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitLengthConversion, Error]]:
|
response_200 = UnitLengthConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitLengthConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitLength,
|
input_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitLength,
|
input_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitLength,
|
input_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitLengthConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitLength,
|
input_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitLength,
|
output_unit: UnitLength,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitMass,
|
input_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitMassConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitMassConversion, Error]]:
|
response_200 = UnitMassConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitMassConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitMass,
|
input_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitMass,
|
input_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitMass,
|
input_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitMassConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitMass,
|
input_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitMass,
|
output_unit: UnitMass,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPower,
|
input_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPower,
|
output_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPowerConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitPowerConversion, Error]]:
|
response_200 = UnitPowerConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitPowerConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPower,
|
input_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPower,
|
output_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPower,
|
input_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPower,
|
output_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPower,
|
input_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPower,
|
output_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitPowerConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPower,
|
input_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPower,
|
output_unit: UnitPower,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPressure,
|
input_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPressure,
|
output_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPressureConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitPressureConversion, Error]]:
|
response_200 = UnitPressureConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitPressureConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPressure,
|
input_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPressure,
|
output_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPressure,
|
input_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPressure,
|
output_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPressure,
|
input_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPressure,
|
output_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitPressureConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitPressure,
|
input_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitPressure,
|
output_unit: UnitPressure,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTemperature,
|
input_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTemperature,
|
output_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTemperatureConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitTemperatureConversion, Error]]:
|
response_200 = UnitTemperatureConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitTemperatureConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTemperature,
|
input_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTemperature,
|
output_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTemperature,
|
input_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTemperature,
|
output_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTemperature,
|
input_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTemperature,
|
output_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTemperature,
|
input_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTemperature,
|
output_unit: UnitTemperature,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTorque,
|
input_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTorque,
|
output_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTorqueConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitTorqueConversion, Error]]:
|
response_200 = UnitTorqueConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitTorqueConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTorque,
|
input_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTorque,
|
output_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTorque,
|
input_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTorque,
|
output_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTorque,
|
input_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTorque,
|
output_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitTorqueConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitTorque,
|
input_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitTorque,
|
output_unit: UnitTorque,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,23 +10,44 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitVolume,
|
input_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(
|
url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
input_unit=input_unit,
|
|
||||||
output_unit=output_unit,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
url = url + "?value=" + str(value)
|
url = url + "?value=" + str(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -36,27 +57,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitVolumeConversion, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UnitVolumeConversion, Error]]:
|
response_200 = UnitVolumeConversion.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UnitVolumeConversion.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -66,16 +87,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitVolume,
|
input_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,33 +130,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitVolume,
|
input_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitVolume,
|
input_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UnitVolumeConversion, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,19 +209,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
input_unit: UnitVolume,
|
input_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_unit: UnitVolume,
|
output_unit: UnitVolume,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
value: float,
|
value: float,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
input_unit=input_unit,
|
input_unit=input_unit,
|
||||||
|
|
||||||
output_unit=output_unit,
|
output_unit=output_unit,
|
||||||
|
|
||||||
value=value,
|
value=value,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).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(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user".format(
|
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||||
return None
|
return None
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
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(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,23 +72,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
"""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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Error]]:
|
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
|
||||||
|
) -> Optional[Error] :
|
||||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
"""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.
|
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
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,14 +9,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/session/{token}".format(
|
url = "{}/user/session/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
token=token,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Session.from_dict(response.json())
|
response_200 = Session.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Session, Error]]]:
|
) -> Response[Optional[Union[Session, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Session, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Session, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,25 +91,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Session, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[Session, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -101,15 +138,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
token: str,
|
token: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
token=token,
|
token=token,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,14 +9,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/users/{id}".format(
|
url = "{}/users/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = User.from_dict(response.json())
|
response_200 = User.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,27 +91,45 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,17 +140,26 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,14 +9,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/users-extended/{id}".format(
|
url = "{}/users-extended/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
id=id,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ExtendedUser, Error]]:
|
response_200 = ExtendedUser.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ExtendedUser.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -56,12 +64,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,27 +91,45 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -105,17 +140,26 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
id: str,
|
id: str,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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.
|
"""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.
|
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
|
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
id=id,
|
id=id,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -8,12 +8,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/front-hash".format(
|
url = "{}/user/front-hash".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = response.text
|
response_200 = response.text
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[str, Error]]]:
|
) -> Response[Optional[Union[str, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -51,10 +55,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[str, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[str, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,21 +74,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[str, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[str, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -92,13 +105,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/onboarding".format(
|
url = "{}/user/onboarding".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = Onboarding.from_dict(response.json())
|
response_200 = Onboarding.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,21 +75,27 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Onboarding, Error]]:
|
|
||||||
|
) -> Optional[Union[Onboarding, Error]] :
|
||||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -93,13 +106,16 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Onboarding, Error]]:
|
|
||||||
|
) -> Optional[Union[Onboarding, Error]] :
|
||||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user".format(
|
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = User.from_dict(response.json())
|
response_200 = User.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -52,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,22 +75,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[User, Error]]:
|
|
||||||
|
) -> Optional[Union[User, Error]] :
|
||||||
"""Get the user information for the authenticated user.
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -94,14 +107,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[User, Error]]:
|
|
||||||
|
) -> Optional[Union[User, Error]] :
|
||||||
"""Get the user information for the authenticated user.
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -9,12 +9,14 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/extended".format(
|
url = "{}/user/extended".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ExtendedUser, Error]]:
|
response_200 = ExtendedUser.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ExtendedUser.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -54,10 +56,13 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,22 +75,28 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[ExtendedUser, Error]]:
|
|
||||||
|
) -> Optional[Union[ExtendedUser, Error]] :
|
||||||
"""Get the user information for the authenticated user.
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,14 +107,17 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[ExtendedUser, Error]]:
|
|
||||||
|
) -> Optional[Union[ExtendedUser, Error]] :
|
||||||
"""Get the user information for the authenticated user.
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,33 +10,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/users".format(
|
url = "{}/users".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[UserResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[UserResultsPage, Error]]:
|
response_200 = UserResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = UserResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -76,16 +99,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,33 +142,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,33 +10,56 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/users-extended".format(
|
url = "{}/users-extended".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
|||||||
"headers": headers,
|
"headers": headers,
|
||||||
"cookies": cookies,
|
"cookies": cookies,
|
||||||
"timeout": client.get_timeout(),
|
"timeout": client.get_timeout(),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||||
*, response: httpx.Response
|
if response.status_code == 200:
|
||||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||||
if response.status_code == 200:
|
return response_200
|
||||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
if response.status_code == 400:
|
||||||
return response_200
|
response_4XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 400:
|
return response_4XX
|
||||||
response_4XX = Error.from_dict(response.json())
|
if response.status_code == 500:
|
||||||
return response_4XX
|
response_5XX = Error.from_dict(response.json())
|
||||||
if response.status_code == 500:
|
return response_5XX
|
||||||
response_5XX = Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
return response_5XX
|
|
||||||
return Error.from_dict(response.json())
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -76,16 +99,37 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,33 +142,75 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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(
|
return sync_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sort_by: CreatedAtSortMode,
|
sort_by: CreatedAtSortMode,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
page_token: Optional[str] = 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
|
"""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 (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
|
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
|
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -10,13 +10,22 @@ from ...types import Response
|
|||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
|
||||||
|
|
||||||
body: UpdateUser,
|
body: UpdateUser,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user".format(
|
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = User.from_dict(response.json())
|
response_200 = User.from_dict(response.json())
|
||||||
return response_200
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
if response.status_code == 500:
|
if response.status_code == 500:
|
||||||
response_5XX = Error.from_dict(response.json())
|
response_5XX = Error.from_dict(response.json())
|
||||||
return response_5XX
|
return response_5XX
|
||||||
return Error.from_dict(response.json())
|
return Error.from_dict(response.json())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, response: httpx.Response
|
*, response: httpx.Response
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -55,12 +65,21 @@ def _build_response(
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: UpdateUser,
|
body: UpdateUser,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -73,25 +92,43 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
|
||||||
|
|
||||||
body: UpdateUser,
|
body: UpdateUser,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
body: UpdateUser,
|
body: UpdateUser,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Optional[Union[User, Error]]]:
|
|
||||||
|
|
||||||
|
|
||||||
|
) -> Response[Optional[Union[User, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -102,15 +139,24 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
|
||||||
|
|
||||||
body: UpdateUser,
|
body: UpdateUser,
|
||||||
|
|
||||||
|
|
||||||
*,
|
*,
|
||||||
client: Client,
|
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
|
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
|
||||||
body=body,
|
body=body,
|
||||||
|
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|||||||
@ -2,12 +2,11 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AccountProvider(str, Enum):
|
class AccountProvider(str, Enum):
|
||||||
"""An account provider.""" # noqa: E501
|
""" An account provider. """ # noqa: E501
|
||||||
|
"""# The Google account provider. """ # noqa: E501
|
||||||
|
GOOGLE = 'google'
|
||||||
|
"""# The GitHub account provider. """ # noqa: E501
|
||||||
|
GITHUB = 'github'
|
||||||
|
|
||||||
"""# The Google account provider. """ # noqa: E501
|
def __str__(self) -> str:
|
||||||
GOOGLE = "google"
|
return str(self.value)
|
||||||
"""# The GitHub account provider. """ # noqa: E501
|
|
||||||
GITHUB = "github"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -7,70 +7,69 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
SB = TypeVar("SB", bound="AiPluginApi")
|
SB = TypeVar("SB", bound="AiPluginApi")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AiPluginApi:
|
class AiPluginApi:
|
||||||
"""AI plugin api information.""" # noqa: E501
|
""" AI plugin api information. """ # noqa: E501
|
||||||
|
is_user_authenticated: Union[Unset, bool] = False
|
||||||
|
type: Union[Unset, AiPluginApiType] = UNSET
|
||||||
|
url: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
is_user_authenticated: Union[Unset, bool] = False
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
type: Union[Unset, AiPluginApiType] = UNSET
|
|
||||||
url: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
is_user_authenticated = self.is_user_authenticated
|
||||||
|
if not isinstance(self.type, Unset):
|
||||||
|
type = self.type
|
||||||
|
url = self.url
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
is_user_authenticated = self.is_user_authenticated
|
field_dict.update(self.additional_properties)
|
||||||
if not isinstance(self.type, Unset):
|
field_dict.update({})
|
||||||
type = self.type
|
if is_user_authenticated is not UNSET:
|
||||||
url = self.url
|
field_dict['is_user_authenticated'] = is_user_authenticated
|
||||||
|
if type is not UNSET:
|
||||||
|
field_dict['type'] = type
|
||||||
|
if url is not UNSET:
|
||||||
|
field_dict['url'] = url
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if is_user_authenticated is not UNSET:
|
|
||||||
field_dict["is_user_authenticated"] = is_user_authenticated
|
|
||||||
if type is not UNSET:
|
|
||||||
field_dict["type"] = type
|
|
||||||
if url is not UNSET:
|
|
||||||
field_dict["url"] = url
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB:
|
||||||
|
d = src_dict.copy()
|
||||||
|
is_user_authenticated = d.pop("is_user_authenticated", UNSET)
|
||||||
|
|
||||||
@classmethod
|
_type = d.pop("type", UNSET)
|
||||||
def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB:
|
type: Union[Unset, AiPluginApiType]
|
||||||
d = src_dict.copy()
|
if isinstance(_type, Unset):
|
||||||
is_user_authenticated = d.pop("is_user_authenticated", UNSET)
|
type = UNSET
|
||||||
|
else:
|
||||||
|
type = _type # type: ignore[arg-type]
|
||||||
|
|
||||||
_type = d.pop("type", UNSET)
|
url = d.pop("url", UNSET)
|
||||||
type: Union[Unset, AiPluginApiType]
|
|
||||||
if isinstance(_type, Unset):
|
|
||||||
type = UNSET
|
|
||||||
else:
|
|
||||||
type = _type # type: ignore[arg-type]
|
|
||||||
|
|
||||||
url = d.pop("url", UNSET)
|
|
||||||
|
|
||||||
ai_plugin_api = cls(
|
ai_plugin_api = cls(
|
||||||
is_user_authenticated=is_user_authenticated,
|
is_user_authenticated= is_user_authenticated,
|
||||||
type=type,
|
type= type,
|
||||||
url=url,
|
url= url,
|
||||||
)
|
)
|
||||||
|
|
||||||
ai_plugin_api.additional_properties = d
|
ai_plugin_api.additional_properties = d
|
||||||
return ai_plugin_api
|
return ai_plugin_api
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -2,10 +2,9 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AiPluginApiType(str, Enum):
|
class AiPluginApiType(str, Enum):
|
||||||
"""AI plugin api type.""" # noqa: E501
|
""" AI plugin api type. """ # noqa: E501
|
||||||
|
"""# An OpenAPI specification. """ # noqa: E501
|
||||||
|
OPENAPI = 'openapi'
|
||||||
|
|
||||||
"""# An OpenAPI specification. """ # noqa: E501
|
def __str__(self) -> str:
|
||||||
OPENAPI = "openapi"
|
return str(self.value)
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -8,69 +8,68 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
NP = TypeVar("NP", bound="AiPluginAuth")
|
NP = TypeVar("NP", bound="AiPluginAuth")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AiPluginAuth:
|
class AiPluginAuth:
|
||||||
"""AI plugin auth information.""" # noqa: E501
|
""" AI plugin auth information. """ # noqa: E501
|
||||||
|
authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET
|
||||||
|
type: Union[Unset, AiPluginAuthType] = UNSET
|
||||||
|
|
||||||
authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
type: Union[Unset, AiPluginAuthType] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
if not isinstance(self.authorization_type, Unset):
|
||||||
|
authorization_type = self.authorization_type
|
||||||
|
if not isinstance(self.type, Unset):
|
||||||
|
type = self.type
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
if not isinstance(self.authorization_type, Unset):
|
field_dict.update(self.additional_properties)
|
||||||
authorization_type = self.authorization_type
|
field_dict.update({})
|
||||||
if not isinstance(self.type, Unset):
|
if authorization_type is not UNSET:
|
||||||
type = self.type
|
field_dict['authorization_type'] = authorization_type
|
||||||
|
if type is not UNSET:
|
||||||
|
field_dict['type'] = type
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if authorization_type is not UNSET:
|
|
||||||
field_dict["authorization_type"] = authorization_type
|
|
||||||
if type is not UNSET:
|
|
||||||
field_dict["type"] = type
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_authorization_type = d.pop("authorization_type", UNSET)
|
||||||
|
authorization_type: Union[Unset, AiPluginHttpAuthType]
|
||||||
|
if isinstance(_authorization_type, Unset):
|
||||||
|
authorization_type = UNSET
|
||||||
|
else:
|
||||||
|
authorization_type = _authorization_type # type: ignore[arg-type]
|
||||||
|
|
||||||
@classmethod
|
_type = d.pop("type", UNSET)
|
||||||
def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP:
|
type: Union[Unset, AiPluginAuthType]
|
||||||
d = src_dict.copy()
|
if isinstance(_type, Unset):
|
||||||
_authorization_type = d.pop("authorization_type", UNSET)
|
type = UNSET
|
||||||
authorization_type: Union[Unset, AiPluginHttpAuthType]
|
else:
|
||||||
if isinstance(_authorization_type, Unset):
|
type = _type # type: ignore[arg-type]
|
||||||
authorization_type = UNSET
|
|
||||||
else:
|
|
||||||
authorization_type = _authorization_type # type: ignore[arg-type]
|
|
||||||
|
|
||||||
_type = d.pop("type", UNSET)
|
|
||||||
type: Union[Unset, AiPluginAuthType]
|
|
||||||
if isinstance(_type, Unset):
|
|
||||||
type = UNSET
|
|
||||||
else:
|
|
||||||
type = _type # type: ignore[arg-type]
|
|
||||||
|
|
||||||
ai_plugin_auth = cls(
|
ai_plugin_auth = cls(
|
||||||
authorization_type=authorization_type,
|
authorization_type= authorization_type,
|
||||||
type=type,
|
type= type,
|
||||||
)
|
)
|
||||||
|
|
||||||
ai_plugin_auth.additional_properties = d
|
ai_plugin_auth.additional_properties = d
|
||||||
return ai_plugin_auth
|
return ai_plugin_auth
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -2,16 +2,15 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AiPluginAuthType(str, Enum):
|
class AiPluginAuthType(str, Enum):
|
||||||
"""AI plugin auth type.""" # noqa: E501
|
""" AI plugin auth type. """ # noqa: E501
|
||||||
|
"""# None. """ # noqa: E501
|
||||||
|
NONE = 'none'
|
||||||
|
"""# User http. """ # noqa: E501
|
||||||
|
USER_HTTP = 'user_http'
|
||||||
|
"""# Service http. """ # noqa: E501
|
||||||
|
SERVICE_HTTP = 'service_http'
|
||||||
|
"""# OAuth. """ # noqa: E501
|
||||||
|
OAUTH = 'oauth'
|
||||||
|
|
||||||
"""# None. """ # noqa: E501
|
def __str__(self) -> str:
|
||||||
NONE = "none"
|
return str(self.value)
|
||||||
"""# User http. """ # noqa: E501
|
|
||||||
USER_HTTP = "user_http"
|
|
||||||
"""# Service http. """ # noqa: E501
|
|
||||||
SERVICE_HTTP = "service_http"
|
|
||||||
"""# OAuth. """ # noqa: E501
|
|
||||||
OAUTH = "oauth"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -2,12 +2,11 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AiPluginHttpAuthType(str, Enum):
|
class AiPluginHttpAuthType(str, Enum):
|
||||||
"""AI plugin http auth type.""" # noqa: E501
|
""" AI plugin http auth type. """ # noqa: E501
|
||||||
|
"""# Basic. """ # noqa: E501
|
||||||
|
BASIC = 'basic'
|
||||||
|
"""# Bearer. """ # noqa: E501
|
||||||
|
BEARER = 'bearer'
|
||||||
|
|
||||||
"""# Basic. """ # noqa: E501
|
def __str__(self) -> str:
|
||||||
BASIC = "basic"
|
return str(self.value)
|
||||||
"""# Bearer. """ # noqa: E501
|
|
||||||
BEARER = "bearer"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -8,128 +8,126 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
SA = TypeVar("SA", bound="AiPluginManifest")
|
SA = TypeVar("SA", bound="AiPluginManifest")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AiPluginManifest:
|
class AiPluginManifest:
|
||||||
"""AI plugin manifest.
|
""" AI plugin manifest.
|
||||||
|
|
||||||
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).
|
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). """ # noqa: E501
|
||||||
""" # noqa: E501
|
api: Union[Unset, AiPluginApi] = UNSET
|
||||||
|
auth: Union[Unset, AiPluginAuth] = UNSET
|
||||||
|
contact_email: Union[Unset, str] = UNSET
|
||||||
|
description_for_human: Union[Unset, str] = UNSET
|
||||||
|
description_for_model: Union[Unset, str] = UNSET
|
||||||
|
legal_info_url: Union[Unset, str] = UNSET
|
||||||
|
logo_url: Union[Unset, str] = UNSET
|
||||||
|
name_for_human: Union[Unset, str] = UNSET
|
||||||
|
name_for_model: Union[Unset, str] = UNSET
|
||||||
|
schema_version: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
api: Union[Unset, AiPluginApi] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
auth: Union[Unset, AiPluginAuth] = UNSET
|
|
||||||
contact_email: Union[Unset, str] = UNSET
|
|
||||||
description_for_human: Union[Unset, str] = UNSET
|
|
||||||
description_for_model: Union[Unset, str] = UNSET
|
|
||||||
legal_info_url: Union[Unset, str] = UNSET
|
|
||||||
logo_url: Union[Unset, str] = UNSET
|
|
||||||
name_for_human: Union[Unset, str] = UNSET
|
|
||||||
name_for_model: Union[Unset, str] = UNSET
|
|
||||||
schema_version: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
if not isinstance(self.api, Unset):
|
||||||
|
api = self.api
|
||||||
|
if not isinstance(self.auth, Unset):
|
||||||
|
auth = self.auth
|
||||||
|
contact_email = self.contact_email
|
||||||
|
description_for_human = self.description_for_human
|
||||||
|
description_for_model = self.description_for_model
|
||||||
|
legal_info_url = self.legal_info_url
|
||||||
|
logo_url = self.logo_url
|
||||||
|
name_for_human = self.name_for_human
|
||||||
|
name_for_model = self.name_for_model
|
||||||
|
schema_version = self.schema_version
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
if not isinstance(self.api, Unset):
|
field_dict.update(self.additional_properties)
|
||||||
api = self.api
|
field_dict.update({})
|
||||||
if not isinstance(self.auth, Unset):
|
if api is not UNSET:
|
||||||
auth = self.auth
|
field_dict['api'] = api
|
||||||
contact_email = self.contact_email
|
if auth is not UNSET:
|
||||||
description_for_human = self.description_for_human
|
field_dict['auth'] = auth
|
||||||
description_for_model = self.description_for_model
|
if contact_email is not UNSET:
|
||||||
legal_info_url = self.legal_info_url
|
field_dict['contact_email'] = contact_email
|
||||||
logo_url = self.logo_url
|
if description_for_human is not UNSET:
|
||||||
name_for_human = self.name_for_human
|
field_dict['description_for_human'] = description_for_human
|
||||||
name_for_model = self.name_for_model
|
if description_for_model is not UNSET:
|
||||||
schema_version = self.schema_version
|
field_dict['description_for_model'] = description_for_model
|
||||||
|
if legal_info_url is not UNSET:
|
||||||
|
field_dict['legal_info_url'] = legal_info_url
|
||||||
|
if logo_url is not UNSET:
|
||||||
|
field_dict['logo_url'] = logo_url
|
||||||
|
if name_for_human is not UNSET:
|
||||||
|
field_dict['name_for_human'] = name_for_human
|
||||||
|
if name_for_model is not UNSET:
|
||||||
|
field_dict['name_for_model'] = name_for_model
|
||||||
|
if schema_version is not UNSET:
|
||||||
|
field_dict['schema_version'] = schema_version
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if api is not UNSET:
|
|
||||||
field_dict["api"] = api
|
|
||||||
if auth is not UNSET:
|
|
||||||
field_dict["auth"] = auth
|
|
||||||
if contact_email is not UNSET:
|
|
||||||
field_dict["contact_email"] = contact_email
|
|
||||||
if description_for_human is not UNSET:
|
|
||||||
field_dict["description_for_human"] = description_for_human
|
|
||||||
if description_for_model is not UNSET:
|
|
||||||
field_dict["description_for_model"] = description_for_model
|
|
||||||
if legal_info_url is not UNSET:
|
|
||||||
field_dict["legal_info_url"] = legal_info_url
|
|
||||||
if logo_url is not UNSET:
|
|
||||||
field_dict["logo_url"] = logo_url
|
|
||||||
if name_for_human is not UNSET:
|
|
||||||
field_dict["name_for_human"] = name_for_human
|
|
||||||
if name_for_model is not UNSET:
|
|
||||||
field_dict["name_for_model"] = name_for_model
|
|
||||||
if schema_version is not UNSET:
|
|
||||||
field_dict["schema_version"] = schema_version
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_api = d.pop("api", UNSET)
|
||||||
|
api: Union[Unset, AiPluginApi]
|
||||||
|
if isinstance(_api, Unset):
|
||||||
|
api = UNSET
|
||||||
|
else:
|
||||||
|
api = _api # type: ignore[arg-type]
|
||||||
|
|
||||||
@classmethod
|
_auth = d.pop("auth", UNSET)
|
||||||
def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA:
|
auth: Union[Unset, AiPluginAuth]
|
||||||
d = src_dict.copy()
|
if isinstance(_auth, Unset):
|
||||||
_api = d.pop("api", UNSET)
|
auth = UNSET
|
||||||
api: Union[Unset, AiPluginApi]
|
else:
|
||||||
if isinstance(_api, Unset):
|
auth = _auth # type: ignore[arg-type]
|
||||||
api = UNSET
|
|
||||||
else:
|
|
||||||
api = _api # type: ignore[arg-type]
|
|
||||||
|
|
||||||
_auth = d.pop("auth", UNSET)
|
contact_email = d.pop("contact_email", UNSET)
|
||||||
auth: Union[Unset, AiPluginAuth]
|
|
||||||
if isinstance(_auth, Unset):
|
|
||||||
auth = UNSET
|
|
||||||
else:
|
|
||||||
auth = _auth # type: ignore[arg-type]
|
|
||||||
|
|
||||||
contact_email = d.pop("contact_email", UNSET)
|
description_for_human = d.pop("description_for_human", UNSET)
|
||||||
|
|
||||||
description_for_human = d.pop("description_for_human", UNSET)
|
description_for_model = d.pop("description_for_model", UNSET)
|
||||||
|
|
||||||
description_for_model = d.pop("description_for_model", UNSET)
|
legal_info_url = d.pop("legal_info_url", UNSET)
|
||||||
|
|
||||||
legal_info_url = d.pop("legal_info_url", UNSET)
|
logo_url = d.pop("logo_url", UNSET)
|
||||||
|
|
||||||
logo_url = d.pop("logo_url", UNSET)
|
name_for_human = d.pop("name_for_human", UNSET)
|
||||||
|
|
||||||
name_for_human = d.pop("name_for_human", UNSET)
|
name_for_model = d.pop("name_for_model", UNSET)
|
||||||
|
|
||||||
name_for_model = d.pop("name_for_model", UNSET)
|
schema_version = d.pop("schema_version", UNSET)
|
||||||
|
|
||||||
schema_version = d.pop("schema_version", UNSET)
|
|
||||||
|
|
||||||
ai_plugin_manifest = cls(
|
ai_plugin_manifest = cls(
|
||||||
api=api,
|
api= api,
|
||||||
auth=auth,
|
auth= auth,
|
||||||
contact_email=contact_email,
|
contact_email= contact_email,
|
||||||
description_for_human=description_for_human,
|
description_for_human= description_for_human,
|
||||||
description_for_model=description_for_model,
|
description_for_model= description_for_model,
|
||||||
legal_info_url=legal_info_url,
|
legal_info_url= legal_info_url,
|
||||||
logo_url=logo_url,
|
logo_url= logo_url,
|
||||||
name_for_human=name_for_human,
|
name_for_human= name_for_human,
|
||||||
name_for_model=name_for_model,
|
name_for_model= name_for_model,
|
||||||
schema_version=schema_version,
|
schema_version= schema_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
ai_plugin_manifest.additional_properties = d
|
ai_plugin_manifest.additional_properties = d
|
||||||
return ai_plugin_manifest
|
return ai_plugin_manifest
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -7,63 +7,62 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
GO = TypeVar("GO", bound="Angle")
|
GO = TypeVar("GO", bound="Angle")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class Angle:
|
class Angle:
|
||||||
"""An angle, with a specific unit.""" # noqa: E501
|
""" An angle, with a specific unit. """ # noqa: E501
|
||||||
|
unit: Union[Unset, UnitAngle] = UNSET
|
||||||
|
value: Union[Unset, float] = UNSET
|
||||||
|
|
||||||
unit: Union[Unset, UnitAngle] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
value: Union[Unset, float] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
if not isinstance(self.unit, Unset):
|
||||||
|
unit = self.unit
|
||||||
|
value = self.value
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
if not isinstance(self.unit, Unset):
|
field_dict.update(self.additional_properties)
|
||||||
unit = self.unit
|
field_dict.update({})
|
||||||
value = self.value
|
if unit is not UNSET:
|
||||||
|
field_dict['unit'] = unit
|
||||||
|
if value is not UNSET:
|
||||||
|
field_dict['value'] = value
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if unit is not UNSET:
|
|
||||||
field_dict["unit"] = unit
|
|
||||||
if value is not UNSET:
|
|
||||||
field_dict["value"] = value
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_unit = d.pop("unit", UNSET)
|
||||||
|
unit: Union[Unset, UnitAngle]
|
||||||
|
if isinstance(_unit, Unset):
|
||||||
|
unit = UNSET
|
||||||
|
else:
|
||||||
|
unit = _unit # type: ignore[arg-type]
|
||||||
|
|
||||||
@classmethod
|
value = d.pop("value", UNSET)
|
||||||
def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO:
|
|
||||||
d = src_dict.copy()
|
|
||||||
_unit = d.pop("unit", UNSET)
|
|
||||||
unit: Union[Unset, UnitAngle]
|
|
||||||
if isinstance(_unit, Unset):
|
|
||||||
unit = UNSET
|
|
||||||
else:
|
|
||||||
unit = _unit # type: ignore[arg-type]
|
|
||||||
|
|
||||||
value = d.pop("value", UNSET)
|
|
||||||
|
|
||||||
angle = cls(
|
angle = cls(
|
||||||
unit=unit,
|
unit= unit,
|
||||||
value=value,
|
value= value,
|
||||||
)
|
)
|
||||||
|
|
||||||
angle.additional_properties = d
|
angle.additional_properties = d
|
||||||
return angle
|
return angle
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -2,10 +2,9 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AnnotationLineEnd(str, Enum):
|
class AnnotationLineEnd(str, Enum):
|
||||||
"""Annotation line end type""" # noqa: E501
|
""" Annotation line end type """ # noqa: E501
|
||||||
|
NONE = 'none'
|
||||||
|
ARROW = 'arrow'
|
||||||
|
|
||||||
NONE = "none"
|
def __str__(self) -> str:
|
||||||
ARROW = "arrow"
|
return str(self.value)
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -7,69 +7,68 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
PI = TypeVar("PI", bound="AnnotationLineEndOptions")
|
PI = TypeVar("PI", bound="AnnotationLineEndOptions")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AnnotationLineEndOptions:
|
class AnnotationLineEndOptions:
|
||||||
"""Options for annotation text""" # noqa: E501
|
""" Options for annotation text """ # noqa: E501
|
||||||
|
end: Union[Unset, AnnotationLineEnd] = UNSET
|
||||||
|
start: Union[Unset, AnnotationLineEnd] = UNSET
|
||||||
|
|
||||||
end: Union[Unset, AnnotationLineEnd] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
start: Union[Unset, AnnotationLineEnd] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
if not isinstance(self.end, Unset):
|
||||||
|
end = self.end
|
||||||
|
if not isinstance(self.start, Unset):
|
||||||
|
start = self.start
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
if not isinstance(self.end, Unset):
|
field_dict.update(self.additional_properties)
|
||||||
end = self.end
|
field_dict.update({})
|
||||||
if not isinstance(self.start, Unset):
|
if end is not UNSET:
|
||||||
start = self.start
|
field_dict['end'] = end
|
||||||
|
if start is not UNSET:
|
||||||
|
field_dict['start'] = start
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if end is not UNSET:
|
|
||||||
field_dict["end"] = end
|
|
||||||
if start is not UNSET:
|
|
||||||
field_dict["start"] = start
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_end = d.pop("end", UNSET)
|
||||||
|
end: Union[Unset, AnnotationLineEnd]
|
||||||
|
if isinstance(_end, Unset):
|
||||||
|
end = UNSET
|
||||||
|
else:
|
||||||
|
end = _end # type: ignore[arg-type]
|
||||||
|
|
||||||
@classmethod
|
_start = d.pop("start", UNSET)
|
||||||
def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI:
|
start: Union[Unset, AnnotationLineEnd]
|
||||||
d = src_dict.copy()
|
if isinstance(_start, Unset):
|
||||||
_end = d.pop("end", UNSET)
|
start = UNSET
|
||||||
end: Union[Unset, AnnotationLineEnd]
|
else:
|
||||||
if isinstance(_end, Unset):
|
start = _start # type: ignore[arg-type]
|
||||||
end = UNSET
|
|
||||||
else:
|
|
||||||
end = _end # type: ignore[arg-type]
|
|
||||||
|
|
||||||
_start = d.pop("start", UNSET)
|
|
||||||
start: Union[Unset, AnnotationLineEnd]
|
|
||||||
if isinstance(_start, Unset):
|
|
||||||
start = UNSET
|
|
||||||
else:
|
|
||||||
start = _start # type: ignore[arg-type]
|
|
||||||
|
|
||||||
annotation_line_end_options = cls(
|
annotation_line_end_options = cls(
|
||||||
end=end,
|
end= end,
|
||||||
start=start,
|
start= start,
|
||||||
)
|
)
|
||||||
|
|
||||||
annotation_line_end_options.additional_properties = d
|
annotation_line_end_options.additional_properties = d
|
||||||
return annotation_line_end_options
|
return annotation_line_end_options
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -10,102 +10,101 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
UZ = TypeVar("UZ", bound="AnnotationOptions")
|
UZ = TypeVar("UZ", bound="AnnotationOptions")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AnnotationOptions:
|
class AnnotationOptions:
|
||||||
"""Options for annotations""" # noqa: E501
|
""" Options for annotations """ # noqa: E501
|
||||||
|
color: Union[Unset, Color] = UNSET
|
||||||
|
line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET
|
||||||
|
line_width: Union[Unset, float] = UNSET
|
||||||
|
position: Union[Unset, Point3d] = UNSET
|
||||||
|
text: Union[Unset, AnnotationTextOptions] = UNSET
|
||||||
|
|
||||||
color: Union[Unset, Color] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET
|
|
||||||
line_width: Union[Unset, float] = UNSET
|
|
||||||
position: Union[Unset, Point3d] = UNSET
|
|
||||||
text: Union[Unset, AnnotationTextOptions] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
if not isinstance(self.color, Unset):
|
||||||
|
color = self.color
|
||||||
|
if not isinstance(self.line_ends, Unset):
|
||||||
|
line_ends = self.line_ends
|
||||||
|
line_width = self.line_width
|
||||||
|
if not isinstance(self.position, Unset):
|
||||||
|
position = self.position
|
||||||
|
if not isinstance(self.text, Unset):
|
||||||
|
text = self.text
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
if not isinstance(self.color, Unset):
|
field_dict.update(self.additional_properties)
|
||||||
color = self.color
|
field_dict.update({})
|
||||||
if not isinstance(self.line_ends, Unset):
|
if color is not UNSET:
|
||||||
line_ends = self.line_ends
|
field_dict['color'] = color
|
||||||
line_width = self.line_width
|
if line_ends is not UNSET:
|
||||||
if not isinstance(self.position, Unset):
|
field_dict['line_ends'] = line_ends
|
||||||
position = self.position
|
if line_width is not UNSET:
|
||||||
if not isinstance(self.text, Unset):
|
field_dict['line_width'] = line_width
|
||||||
text = self.text
|
if position is not UNSET:
|
||||||
|
field_dict['position'] = position
|
||||||
|
if text is not UNSET:
|
||||||
|
field_dict['text'] = text
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if color is not UNSET:
|
|
||||||
field_dict["color"] = color
|
|
||||||
if line_ends is not UNSET:
|
|
||||||
field_dict["line_ends"] = line_ends
|
|
||||||
if line_width is not UNSET:
|
|
||||||
field_dict["line_width"] = line_width
|
|
||||||
if position is not UNSET:
|
|
||||||
field_dict["position"] = position
|
|
||||||
if text is not UNSET:
|
|
||||||
field_dict["text"] = text
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_color = d.pop("color", UNSET)
|
||||||
|
color: Union[Unset, Color]
|
||||||
|
if isinstance(_color, Unset):
|
||||||
|
color = UNSET
|
||||||
|
else:
|
||||||
|
color = _color # type: ignore[arg-type]
|
||||||
|
|
||||||
@classmethod
|
_line_ends = d.pop("line_ends", UNSET)
|
||||||
def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ:
|
line_ends: Union[Unset, AnnotationLineEndOptions]
|
||||||
d = src_dict.copy()
|
if isinstance(_line_ends, Unset):
|
||||||
_color = d.pop("color", UNSET)
|
line_ends = UNSET
|
||||||
color: Union[Unset, Color]
|
else:
|
||||||
if isinstance(_color, Unset):
|
line_ends = _line_ends # type: ignore[arg-type]
|
||||||
color = UNSET
|
|
||||||
else:
|
|
||||||
color = _color # type: ignore[arg-type]
|
|
||||||
|
|
||||||
_line_ends = d.pop("line_ends", UNSET)
|
line_width = d.pop("line_width", UNSET)
|
||||||
line_ends: Union[Unset, AnnotationLineEndOptions]
|
|
||||||
if isinstance(_line_ends, Unset):
|
|
||||||
line_ends = UNSET
|
|
||||||
else:
|
|
||||||
line_ends = _line_ends # type: ignore[arg-type]
|
|
||||||
|
|
||||||
line_width = d.pop("line_width", UNSET)
|
_position = d.pop("position", UNSET)
|
||||||
|
position: Union[Unset, Point3d]
|
||||||
|
if isinstance(_position, Unset):
|
||||||
|
position = UNSET
|
||||||
|
else:
|
||||||
|
position = _position # type: ignore[arg-type]
|
||||||
|
|
||||||
_position = d.pop("position", UNSET)
|
_text = d.pop("text", UNSET)
|
||||||
position: Union[Unset, Point3d]
|
text: Union[Unset, AnnotationTextOptions]
|
||||||
if isinstance(_position, Unset):
|
if isinstance(_text, Unset):
|
||||||
position = UNSET
|
text = UNSET
|
||||||
else:
|
else:
|
||||||
position = _position # type: ignore[arg-type]
|
text = _text # type: ignore[arg-type]
|
||||||
|
|
||||||
_text = d.pop("text", UNSET)
|
|
||||||
text: Union[Unset, AnnotationTextOptions]
|
|
||||||
if isinstance(_text, Unset):
|
|
||||||
text = UNSET
|
|
||||||
else:
|
|
||||||
text = _text # type: ignore[arg-type]
|
|
||||||
|
|
||||||
annotation_options = cls(
|
annotation_options = cls(
|
||||||
color=color,
|
color= color,
|
||||||
line_ends=line_ends,
|
line_ends= line_ends,
|
||||||
line_width=line_width,
|
line_width= line_width,
|
||||||
position=position,
|
position= position,
|
||||||
text=text,
|
text= text,
|
||||||
)
|
)
|
||||||
|
|
||||||
annotation_options.additional_properties = d
|
annotation_options.additional_properties = d
|
||||||
return annotation_options
|
return annotation_options
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -2,11 +2,10 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AnnotationTextAlignmentX(str, Enum):
|
class AnnotationTextAlignmentX(str, Enum):
|
||||||
"""Horizontal Text aligment""" # noqa: E501
|
""" Horizontal Text aligment """ # noqa: E501
|
||||||
|
LEFT = 'left'
|
||||||
|
CENTER = 'center'
|
||||||
|
RIGHT = 'right'
|
||||||
|
|
||||||
LEFT = "left"
|
def __str__(self) -> str:
|
||||||
CENTER = "center"
|
return str(self.value)
|
||||||
RIGHT = "right"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -2,11 +2,10 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AnnotationTextAlignmentY(str, Enum):
|
class AnnotationTextAlignmentY(str, Enum):
|
||||||
"""Vertical Text aligment""" # noqa: E501
|
""" Vertical Text aligment """ # noqa: E501
|
||||||
|
BOTTOM = 'bottom'
|
||||||
|
CENTER = 'center'
|
||||||
|
TOP = 'top'
|
||||||
|
|
||||||
BOTTOM = "bottom"
|
def __str__(self) -> str:
|
||||||
CENTER = "center"
|
return str(self.value)
|
||||||
TOP = "top"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -8,83 +8,82 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
FB = TypeVar("FB", bound="AnnotationTextOptions")
|
FB = TypeVar("FB", bound="AnnotationTextOptions")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AnnotationTextOptions:
|
class AnnotationTextOptions:
|
||||||
"""Options for annotation text""" # noqa: E501
|
""" Options for annotation text """ # noqa: E501
|
||||||
|
point_size: Union[Unset, int] = UNSET
|
||||||
|
text: Union[Unset, str] = UNSET
|
||||||
|
x: Union[Unset, AnnotationTextAlignmentX] = UNSET
|
||||||
|
y: Union[Unset, AnnotationTextAlignmentY] = UNSET
|
||||||
|
|
||||||
point_size: Union[Unset, int] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
text: Union[Unset, str] = UNSET
|
|
||||||
x: Union[Unset, AnnotationTextAlignmentX] = UNSET
|
|
||||||
y: Union[Unset, AnnotationTextAlignmentY] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
point_size = self.point_size
|
||||||
|
text = self.text
|
||||||
|
if not isinstance(self.x, Unset):
|
||||||
|
x = self.x
|
||||||
|
if not isinstance(self.y, Unset):
|
||||||
|
y = self.y
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
point_size = self.point_size
|
field_dict.update(self.additional_properties)
|
||||||
text = self.text
|
field_dict.update({})
|
||||||
if not isinstance(self.x, Unset):
|
if point_size is not UNSET:
|
||||||
x = self.x
|
field_dict['point_size'] = point_size
|
||||||
if not isinstance(self.y, Unset):
|
if text is not UNSET:
|
||||||
y = self.y
|
field_dict['text'] = text
|
||||||
|
if x is not UNSET:
|
||||||
|
field_dict['x'] = x
|
||||||
|
if y is not UNSET:
|
||||||
|
field_dict['y'] = y
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if point_size is not UNSET:
|
|
||||||
field_dict["point_size"] = point_size
|
|
||||||
if text is not UNSET:
|
|
||||||
field_dict["text"] = text
|
|
||||||
if x is not UNSET:
|
|
||||||
field_dict["x"] = x
|
|
||||||
if y is not UNSET:
|
|
||||||
field_dict["y"] = y
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB:
|
||||||
|
d = src_dict.copy()
|
||||||
|
point_size = d.pop("point_size", UNSET)
|
||||||
|
|
||||||
@classmethod
|
text = d.pop("text", UNSET)
|
||||||
def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB:
|
|
||||||
d = src_dict.copy()
|
|
||||||
point_size = d.pop("point_size", UNSET)
|
|
||||||
|
|
||||||
text = d.pop("text", UNSET)
|
_x = d.pop("x", UNSET)
|
||||||
|
x: Union[Unset, AnnotationTextAlignmentX]
|
||||||
|
if isinstance(_x, Unset):
|
||||||
|
x = UNSET
|
||||||
|
else:
|
||||||
|
x = _x # type: ignore[arg-type]
|
||||||
|
|
||||||
_x = d.pop("x", UNSET)
|
_y = d.pop("y", UNSET)
|
||||||
x: Union[Unset, AnnotationTextAlignmentX]
|
y: Union[Unset, AnnotationTextAlignmentY]
|
||||||
if isinstance(_x, Unset):
|
if isinstance(_y, Unset):
|
||||||
x = UNSET
|
y = UNSET
|
||||||
else:
|
else:
|
||||||
x = _x # type: ignore[arg-type]
|
y = _y # type: ignore[arg-type]
|
||||||
|
|
||||||
_y = d.pop("y", UNSET)
|
|
||||||
y: Union[Unset, AnnotationTextAlignmentY]
|
|
||||||
if isinstance(_y, Unset):
|
|
||||||
y = UNSET
|
|
||||||
else:
|
|
||||||
y = _y # type: ignore[arg-type]
|
|
||||||
|
|
||||||
annotation_text_options = cls(
|
annotation_text_options = cls(
|
||||||
point_size=point_size,
|
point_size= point_size,
|
||||||
text=text,
|
text= text,
|
||||||
x=x,
|
x= x,
|
||||||
y=y,
|
y= y,
|
||||||
)
|
)
|
||||||
|
|
||||||
annotation_text_options.additional_properties = d
|
annotation_text_options.additional_properties = d
|
||||||
return annotation_text_options
|
return annotation_text_options
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
@ -2,12 +2,11 @@ from enum import Enum
|
|||||||
|
|
||||||
|
|
||||||
class AnnotationType(str, Enum):
|
class AnnotationType(str, Enum):
|
||||||
"""The type of annotation""" # noqa: E501
|
""" The type of annotation """ # noqa: E501
|
||||||
|
"""# 2D annotation type (screen or planar space) """ # noqa: E501
|
||||||
|
T2D = 't2d'
|
||||||
|
"""# 3D annotation type """ # noqa: E501
|
||||||
|
T3D = 't3d'
|
||||||
|
|
||||||
"""# 2D annotation type (screen or planar space) """ # noqa: E501
|
def __str__(self) -> str:
|
||||||
T2D = "t2d"
|
return str(self.value)
|
||||||
"""# 3D annotation type """ # noqa: E501
|
|
||||||
T3D = "t3d"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
||||||
|
|||||||
@ -6,57 +6,56 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
QP = TypeVar("QP", bound="ApiCallQueryGroup")
|
QP = TypeVar("QP", bound="ApiCallQueryGroup")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ApiCallQueryGroup:
|
class ApiCallQueryGroup:
|
||||||
"""A response for a query on the API call table that is grouped by something.""" # noqa: E501
|
""" A response for a query on the API call table that is grouped by something. """ # noqa: E501
|
||||||
|
count: Union[Unset, int] = UNSET
|
||||||
|
query: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
count: Union[Unset, int] = UNSET
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
query: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
count = self.count
|
||||||
|
query = self.query
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
field_dict: Dict[str, Any] = {}
|
||||||
count = self.count
|
field_dict.update(self.additional_properties)
|
||||||
query = self.query
|
field_dict.update({})
|
||||||
|
if count is not UNSET:
|
||||||
|
field_dict['count'] = count
|
||||||
|
if query is not UNSET:
|
||||||
|
field_dict['query'] = query
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
return field_dict
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if count is not UNSET:
|
|
||||||
field_dict["count"] = count
|
|
||||||
if query is not UNSET:
|
|
||||||
field_dict["query"] = query
|
|
||||||
|
|
||||||
return field_dict
|
@classmethod
|
||||||
|
def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP:
|
||||||
|
d = src_dict.copy()
|
||||||
|
count = d.pop("count", UNSET)
|
||||||
|
|
||||||
@classmethod
|
query = d.pop("query", UNSET)
|
||||||
def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP:
|
|
||||||
d = src_dict.copy()
|
|
||||||
count = d.pop("count", UNSET)
|
|
||||||
|
|
||||||
query = d.pop("query", UNSET)
|
|
||||||
|
|
||||||
api_call_query_group = cls(
|
api_call_query_group = cls(
|
||||||
count=count,
|
count= count,
|
||||||
query=query,
|
query= query,
|
||||||
)
|
)
|
||||||
|
|
||||||
api_call_query_group.additional_properties = d
|
api_call_query_group.additional_properties = d
|
||||||
return api_call_query_group
|
return api_call_query_group
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
||||||
return list(self.additional_properties.keys())
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.additional_properties[key]
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
self.additional_properties[key] = value
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __delitem__(self, key: str) -> None:
|
||||||
del self.additional_properties[key]
|
del self.additional_properties[key]
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __contains__(self, key: str) -> bool:
|
||||||
return key in self.additional_properties
|
return key in self.additional_properties
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user