Crate kittycad

source ·
Expand description

A fully generated & opinionated API client for the KittyCAD API.

docs.rs

API Details

API server for KittyCAD

Contact

urlemail
https://kittycad.ioapi@kittycad.io

Client Details

This client is generated from the OpenAPI specs based on API spec version 0.1.0. This way it will remain up to date as features are added.

The documentation for the crate is generated along with the code to make this library easy to use.

To install the library, add the following to your Cargo.toml file.

[dependencies]
kittycad = "0.2.21"

Basic example

Typical use will require intializing a Client. This requires a user agent string and set of credentials.

use kittycad::Client;

let client = Client::new(String::from("api-key"));

Alternatively, the library can search for most of the variables required for the client in the environment:

  • KITTYCAD_API_TOKEN

And then you can create a client from the environment.

use kittycad::Client;

let client = Client::new_from_env();

Modules

  • AI uses machine learning to generate 3D meshes.
  • API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.
  • 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.
  • Endpoints for third party app grant flows.
  • Endpoints that allow for code execution or creation of code execution environments.
  • 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.
  • Hidden API endpoints that should not show up in the docs.
  • Meta information about the API.
  • Modeling API for updating your 3D files using the KittyCAD engine.
  • Endpoints that implement OAuth 2.0 grant flows.
  • Operations around payments and billing.
  • This module contains the generated types for the library.
  • Unit conversion operations.
  • 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.

Structs