Skip to content

Commit

Permalink
Added method to create a new workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
myOmikron committed Dec 9, 2024
1 parent fee4680 commit 9fed5fd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sdk/rust-kraken-sdk/src/sdk/workspaces.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use kraken::api::handler::workspaces::schema::CreateWorkspaceRequest;
use kraken::api::handler::workspaces::schema::FullWorkspace;
use kraken::api::handler::workspaces::schema::ListWorkspaces;
use uuid::Uuid;
Expand All @@ -17,4 +18,16 @@ impl KrakenClient {
.send()
.await
}

/// Create a new workspace in kraken
pub async fn create_workspace(
&self,
name: String,
description: Option<String>,
) -> KrakenResult<Uuid> {
self.post("api/v1/workspaces")
.body(CreateWorkspaceRequest { name, description })
.send()
.await
}
}

0 comments on commit 9fed5fd

Please sign in to comment.