YOYO NEW GO SPEC DOCS v0.0.8!
This commit is contained in:
committed by
Jess Frazelle
parent
5247831f32
commit
6db080ebc8
34
spec.json
34
spec.json
@ -316,14 +316,10 @@
|
||||
},
|
||||
"termsOfService": "https://kittycad.io/terms-and-conditions",
|
||||
"title": "KittyCAD API",
|
||||
"version": "0.0.2-6f1ca7e",
|
||||
"version": "0.0.2-e722556",
|
||||
"x-go": {
|
||||
"client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}",
|
||||
"install": "go get github.com/kittycad/kittycad.go"
|
||||
},
|
||||
"x-python": {
|
||||
"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# KITTYCAD_API_TOKEN.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()",
|
||||
"install": "pip install kittycad"
|
||||
}
|
||||
},
|
||||
"openapi": "3.0.0",
|
||||
@ -365,10 +361,6 @@
|
||||
"x-go": {
|
||||
"example": "// StopAsyncConversions: Stop all async conversions\n//\n// Stop all async conversions that are currently running. This endpoint can only be used by specific KittyCAD employees.\nfileConversion, err := client.Internal.StopAsyncConversions()",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#InternalService.StopAsyncConversions"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import FileConversion\nfrom kittycad.api.internal import stop_async_conversions\nfrom kittycad.types import Response\n\nfc: FileConversion = stop_async_conversions.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = stop_async_conversions.sync_detailed(client=client)\n\n# OR run async\nfc: FileConversion = await stop_async_conversions.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await stop_async_conversions.asyncio_detailed(client=client)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.internal.stop_async_conversions.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -409,10 +401,6 @@
|
||||
"x-go": {
|
||||
"example": "// GPUDevices: Get GPU devices\n//\n// Get information about GPU devices on this server. This is primarily used for debugging. This endpoint can only be used by specific KittyCAD employees.\nGPUDevice, err := client.Internal.GPUDevices()",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#InternalService.GPUDevices"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import [GPUDevice]\nfrom kittycad.api.internal import gpu_devices\nfrom kittycad.types import Response\n\nfc: [GPUDevice] = gpu_devices.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[GPUDevice]] = gpu_devices.sync_detailed(client=client)\n\n# OR run async\nfc: [GPUDevice] = await gpu_devices.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[GPUDevice]] = await gpu_devices.asyncio_detailed(client=client)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.internal.gpu_devices.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -450,10 +438,6 @@
|
||||
"x-go": {
|
||||
"example": "// InstanceMetadata: Get instance metadata\n//\n// Get information about this specific API server instance. This is primarily used for debugging.\ninstance, err := client.Meta.InstanceMetadata()",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.InstanceMetadata"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import Instance\nfrom kittycad.api.meta import instance_metadata\nfrom kittycad.types import Response\n\nfc: Instance = instance_metadata.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Instance] = instance_metadata.sync_detailed(client=client)\n\n# OR run async\nfc: Instance = await instance_metadata.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Instance] = await instance_metadata.asyncio_detailed(client=client)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.instance_metadata.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -491,10 +475,6 @@
|
||||
"x-go": {
|
||||
"example": "// AuthSession: Get auth session\n//\n// Get information about your API request session. This is primarily used for debugging.\nauthSession, err := client.Meta.AuthSession()",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.AuthSession"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import AuthSession\nfrom kittycad.api.meta import auth_session\nfrom kittycad.types import Response\n\nfc: AuthSession = auth_session.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[AuthSession] = auth_session.sync_detailed(client=client)\n\n# OR run async\nfc: AuthSession = await auth_session.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[AuthSession] = await auth_session.asyncio_detailed(client=client)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.auth_session.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -553,10 +533,6 @@
|
||||
"x-go": {
|
||||
"example": "// ConversionStatus: Get a file conversion\n//\n// Get the status and output of an async file conversion.\n//\n// Parameters:\n//\t- `id`: The id of the file conversion.\nfileConversion, err := client.File.ConversionStatus(id)",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ConversionStatus"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import file_conversion_status_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = file_conversion_status_with_base64_helper.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = file_conversion_status_with_base64_helper.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await file_conversion_status_with_base64_helper.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await file_conversion_status_with_base64_helper.asyncio_detailed(client=client, id=)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.file_conversion_status_with_base64_helper.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -644,10 +620,6 @@
|
||||
"x-go": {
|
||||
"example": "// PostConversion: Convert CAD file\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `sourceFormat`: The format of the file to convert.\nfileConversion, err := client.File.PostConversion(sourceFormat, outputFormat, body)",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.PostConversion"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import file_conversion_status_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = file_conversion_status_with_base64_helper.sync(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = file_conversion_status_with_base64_helper.sync_detailed(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR run async\nfc: FileConversion = await file_conversion_status_with_base64_helper.asyncio(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await file_conversion_status_with_base64_helper.asyncio_detailed(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.file_conversion_status_with_base64_helper.html"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -674,10 +646,6 @@
|
||||
"x-go": {
|
||||
"example": "// Ping: Ping\n//\n// Simple ping to the server.\npongMessage, err := client.Meta.Ping()",
|
||||
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping"
|
||||
},
|
||||
"x-python": {
|
||||
"example": "from kittycad.models import PongMessage\nfrom kittycad.api.meta import ping\nfrom kittycad.types import Response\n\nfc: PongMessage = ping.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[PongMessage] = ping.sync_detailed(client=client)\n\n# OR run async\nfc: PongMessage = await ping.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[PongMessage] = await ping.asyncio_detailed(client=client)",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.ping.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user