Skip to content

Commit

Permalink
Update api spec (#457)
Browse files Browse the repository at this point in the history
* YOYO NEW API SPEC!

* fix

Signed-off-by: Jess Frazelle <[email protected]>

---------

Signed-off-by: Jess Frazelle <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <[email protected]>
  • Loading branch information
3 people authored Jul 4, 2024
1 parent 1919de1 commit af1ec9e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.6
0.3.7
2 changes: 1 addition & 1 deletion kittycad.rs.patch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"path": "/info/x-rust",
"value": {
"client": "// Authenticate via an API token.\nlet client = kittycad::Client::new(\"$TOKEN\");\n\n// - OR -\n\n// Authenticate with your token and host parsed from the environment variables:\n// `KITTYCAD_API_TOKEN`.\nlet client = kittycad::Client::new_from_env();",
"install": "[dependencies]\nkittycad = \"0.3.6\""
"install": "[dependencies]\nkittycad = \"0.3.7\""
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions kittycad/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "kittycad"
description = "A fully generated & opinionated API client for the KittyCAD API."
version = "0.3.6"
version = "0.3.7"
documentation = "https://docs.rs/kittycad"
readme = "README.md"
repository = "https://github.com/KittyCAD/kittycad.rs/tree/main/kittycad"
Expand All @@ -14,7 +14,7 @@ async-trait = { version = "^0.1.53", optional = true }
base64 = "0.22"
bigdecimal = { version = "0.4", features = ["serde"] }
bytes = { version = "1", features = ["serde"] }
clap = { version = "4.5.8", features = ["cargo", "derive", "env", "unicode"], optional = true }
clap = { version = "4.2.4", features = ["cargo", "derive", "env", "unicode"], optional = true }
chrono = { version = "0.4", default-features = false, features = ["serde", "std"] }
data-encoding = "^2.3.2"
dirs = { version = "^5.0.1", optional = true }
Expand All @@ -23,7 +23,7 @@ futures = { version = "0.3.26", optional = true }
http = { version = "^0.2.8", optional = true }
itertools = "0.13.0"
log = { version = "^0.4", features = ["serde"], optional = true }
mime_guess = "2.0.5"
mime_guess = "2.0.4"
parse-display = "0.9.1"
phonenumber = "0.3.5"
rand = { version = "0.8", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion kittycad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To install the library, add the following to your `Cargo.toml` file.

```toml
[dependencies]
kittycad = "0.3.6"
kittycad = "0.3.7"
```

## Basic example
Expand Down
2 changes: 1 addition & 1 deletion kittycad/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//!
//! ```toml
//! [dependencies]
//! kittycad = "0.3.6"
//! kittycad = "0.3.7"
//! ```
//!
//! ## Basic example
Expand Down
8 changes: 7 additions & 1 deletion kittycad/src/modeling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ impl Modeling {
`fps: Option<u32>`: Frames per second of the video feed.\n- `pool: Option<String>`: \
An optional identifier for a pool of engine instances. The 'default' pool is used \
when none is specified.\n- `post_effect: Option<crate::types::PostEffectType>`: \
Engine Post effects (such as SSAO)\n- `unlocked_framerate: Option<bool>`: If true, \
Engine Post effects (such as SSAO)\n- `show_grid: Option<bool>`: If true, will show \
the grid at the start of the session.\n- `unlocked_framerate: Option<bool>`: If true, \
engine will render video frames as fast as it can.\n- `video_res_height: \
Option<u32>`: Height of the video feed. Must be a multiple of 4.\n- `video_res_width: \
Option<u32>`: Width of the video feed. Must be a multiple of 4.\n- `webrtc: \
Expand All @@ -30,6 +31,7 @@ impl Modeling {
fps: Option<u32>,
pool: Option<String>,
post_effect: Option<crate::types::PostEffectType>,
show_grid: Option<bool>,
unlocked_framerate: Option<bool>,
video_res_height: Option<u32>,
video_res_width: Option<u32>,
Expand All @@ -53,6 +55,10 @@ impl Modeling {
query_params.push(("post_effect", format!("{}", p)));
}

if let Some(p) = show_grid {
query_params.push(("show_grid", format!("{}", p)));
}

if let Some(p) = unlocked_framerate {
query_params.push(("unlocked_framerate", format!("{}", p)));
}
Expand Down
2 changes: 1 addition & 1 deletion kittycad/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ async fn test_modeling_websocket() {

let ws = match client
.modeling()
.commands_ws(None, None, None, None, None, None, None)
.commands_ws(None, None, None, None, None, None, None, None)
.await
{
Ok(ws) => ws,
Expand Down
8 changes: 8 additions & 0 deletions spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -12350,6 +12350,14 @@
"$ref": "#/components/schemas/PostEffectType"
}
},
{
"in": "query",
"name": "show_grid",
"description": "If true, will show the grid at the start of the session.",
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "unlocked_framerate",
Expand Down

0 comments on commit af1ec9e

Please sign in to comment.