Crate kittycad

source ·
Expand description

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

docs.rs

§API Details

API server for Zoo

§Contact

urlemail
https://zoo.devapi@zoo.dev

§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.3.8"

§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 CAD models.
  • 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 Zoo engine.
  • Endpoints that implement OAuth 2.0 grant flows.
  • An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.
  • Operations around payments and billing.
  • Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won’t stop working when an individual leaves the company.
  • Operations involving our swag store.
  • This module contains the generated types for the library.
  • Unit conversion operations.
  • A user is someone who uses the Zoo 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§