2022-12-13 09:43:56 +11:00
2022-12-12 11:09:58 +11:00
2022-12-12 13:02:11 +11:00
2022-12-12 15:20:04 +11:00
2022-08-01 20:06:14 +10:00
2022-08-01 14:27:11 +10:00
2022-08-01 14:27:11 +10:00
2022-08-01 20:06:14 +10:00
2022-08-01 14:27:11 +10:00
2022-12-12 15:20:04 +11:00
2022-12-12 11:09:58 +11:00
2022-08-01 14:27:11 +10:00
2022-12-12 13:02:11 +11:00
2022-12-12 11:09:58 +11:00
2022-08-01 14:27:11 +10:00
2022-12-13 09:43:56 +11:00
2022-08-15 08:49:14 +10:00
2022-08-01 20:06:14 +10:00
2022-12-12 11:09:58 +11:00
2022-12-12 15:20:04 +11:00

image

KittyCAD JS/TS API library

Socials:: - blogtwitterlinkedininstagramyoutubediscord

Fully typed js library, compatible with js and ts.

Full documentation here

Simple example below.

Install

npm install @kittycad/lib
# or
yarn add @kittycad/lib

## set your token
export KITTYCAD_TOKEN=<your token>

Basic example

import { file } from '@kittycad/lib';
import fsp from 'fs/promises';

async function main() {
    // kittycad.io/docs/api/get-cad-file-mass?lang=typescript
    const response = await file.create_file_mass({
        src_format: 'obj',
        material_density: '0.007',
        body: await fsp.readFile('./example.obj', 'base64'),
    })
    if ('error_code' in response) throw response
    const { status, mass } = response
    console.log(status, mass);
}

main();
Description
The TypeScript API client for Zoo.
Readme MIT 2.3 MiB
Languages
TypeScript 99.3%
Go 0.2%
Nix 0.2%
JavaScript 0.2%
Shell 0.1%