The library uses asynchronous HTTP client reqwest, so your Cargo.toml could look like this:
toml
rocketchat = "0.4.0"
tokio = { version = "1", features = ["full"] }
```rust,no_run use rocketchat::{LoginSettings, Settings};
let settings = Settings::Login(LoginSettings { username: "chucknorris".tostring(), password: "supersecret".tostring(), domain: "https://mydomain.com".tostring(), }); ```
```rust,no_run use rocketchat::{AuthSettings, Settings};
let settings = Settings::Auth(AuthSettings { authtoken: "someauthtoken".tostring(), userid: "someuserid".tostring(), domain: "https://mydomain.com".to_string(), }); ```
rust,no_run
let result = PostMessageMethod {
settings: &settings,
room_id: "#channel".to_string(),
text: Some("Some message with star emoji :star:".to_string()),
..Default::default()
}.call().await;
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)