Skip to content

Commit

Permalink
docs: updated Config usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alemidev committed Oct 16, 2024
1 parent 9269dc6 commit 4df58c8
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
//! use codemp::api::controller::{AsyncReceiver, AsyncSender}; // needed for send/recv trait methods
//!
//! // connect first, api.code.mp is managed by hexed.technology
//! let client = codemp::Client::connect(codemp::api::Config::new(
//! "[email protected]", "dont-use-this-password"
//! )).await?;
//! let client = codemp::Client::connect(codemp::api::Config {
//! username: "[email protected]".into(), password: "dont-use-this-password".into(),
//! ..Default::default()
//! }).await?;
//!
//! // create and join a workspace
//! client.create_workspace("some-workspace").await?;
Expand Down Expand Up @@ -45,7 +46,8 @@
//!
//! // connect first, api.code.mp is managed by hexed.technology
//! let client = await codemp.connect({
//! username: "[email protected]", password: "dont-use-this-password"
//! username: "[email protected]",
//! password: "dont-use-this-password"
//! });
//!
//! // create and join a workspace
Expand Down Expand Up @@ -80,9 +82,10 @@
//! import codemp
//!
//! # connect first, api.code.mp is managed by hexed.technology
//! client = codemp.connect(
//! codemp.Config('[email protected]', 'dont-use-this-password')
//! ).wait()
//! client = codemp.connect(codemp.Config(
//! username='[email protected]',
//! password='dont-use-this-password'
//! )).wait()
//!
//! # create and join a workspace
//! client.create_workspace("some-workspace").wait()
Expand Down Expand Up @@ -128,7 +131,8 @@
//!
//! -- connect first, api.code.mp is managed by hexed.technology
//! local client = CODEMP.connect({
//! username = "[email protected]", password = "dont-use-this-password"
//! username = "[email protected]",
//! password = "dont-use-this-password"
//! }):await()
//!
//! -- create and join a workspace
Expand Down Expand Up @@ -165,9 +169,10 @@
//! import mp.code.*;
//!
//! // connect first, api.code.mp is managed by hexed.technology
//! Client client = Client.connect(
//! new data.Config("[email protected]", "dont-use-this-password")
//! );
//! Client client = Client.connect(new data.Config(
//! "[email protected]",
//! "dont-use-this-password"
//! ));
//!
//! // create and join a workspace
//! client.createWorkspace("some-workspace");
Expand Down

0 comments on commit 4df58c8

Please sign in to comment.