#cad #3d #api-client

kittycad

A fully generated & opinionated API client for the KittyCAD API

11 releases

0.2.0 Aug 10, 2022
0.1.10 Jul 26, 2022
0.1.2 Jun 17, 2022

#264 in Authentication

47 downloads per month

MIT license

2MB
14K SLoC

kittycad

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

docs.rs

API Details

API server for KittyCAD

Contact

url email
https://kittycad.io api@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.0"

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();

Dependencies

~19–28MB
~517K SLoC