Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Aug 17, 2023
1 parent 5764095 commit 1f3dfa7
Show file tree
Hide file tree
Showing 10 changed files with 1,230 additions and 66 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.2.14
0.2.15
4 changes: 2 additions & 2 deletions 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.2.14\""
"install": "[dependencies]\nkittycad = \"0.2.15\""
}
},
{
Expand Down Expand Up @@ -201,7 +201,7 @@
},
{
"op": "add",
"path": "/paths/~1modeling~1cmd_batch/post/x-rust",
"path": "/paths/~1modeling~1cmd-batch/post/x-rust",
"value": {
"example": "/// Submit many modeling operations.\nuse std::str::FromStr;\nasync fn example_modeling_cmd_batch() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ModelingOutcomes = client\n .modeling()\n .cmd_batch(&kittycad::types::ModelingCmdReqBatch {\n cmds: std::collections::HashMap::from([(\n \"some-key\".to_string(),\n kittycad::types::ModelingCmdReq {\n cmd: kittycad::types::ModelingCmd::CameraDragEnd {\n interaction: kittycad::types::CameraDragInteractionType::Zoom,\n window: kittycad::types::Point2D {\n x: 3.14 as f64,\n y: 3.14 as f64,\n },\n },\n cmd_id: uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n },\n )]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n",
"libDocsLink": "https://docs.rs/kittycad/latest/kittycad/modeling/struct.Modeling.html#method.cmd_batch"
Expand Down
2 changes: 1 addition & 1 deletion 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.2.14"
version = "0.2.15"
documentation = "https://docs.rs/kittycad"
readme = "README.md"
repository = "https://github.com/KittyCAD/kittycad.rs/tree/main/kittycad"
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.2.14"
kittycad = "0.2.15"
```

## 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.2.14"
//! kittycad = "0.2.15"
//! ```
//!
//! ## Basic example
Expand Down
2 changes: 1 addition & 1 deletion kittycad/src/modeling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Modeling {
) -> Result<crate::types::ModelingOutcomes, crate::types::error::Error> {
let mut req = self.client.client.request(
http::Method::POST,
format!("{}/{}", self.client.base_url, "modeling/cmd_batch"),
format!("{}/{}", self.client.base_url, "modeling/cmd-batch"),
);
req = req.bearer_auth(&self.client.token);
req = req.json(body);
Expand Down
3 changes: 3 additions & 0 deletions kittycad/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async fn test_create_file_volume() {
}

#[tokio::test]
#[ignore]
async fn test_get_status_of_async_operation() {
let client = test_client();

Expand All @@ -62,6 +63,7 @@ async fn test_get_status_of_async_operation() {
}

#[tokio::test]
#[ignore]
async fn serialize_one_of() {
let client = test_client();

Expand All @@ -79,6 +81,7 @@ async fn serialize_one_of() {

#[cfg(feature = "tabled")]
#[tokio::test]
#[ignore]
async fn tabled_one_of() {
let client = test_client();

Expand Down
Loading

0 comments on commit 1f3dfa7

Please sign in to comment.