3 releases
0.1.2 | May 13, 2023 |
---|---|
0.1.1 | May 12, 2023 |
0.1.0 | May 12, 2023 |
2MB
32K
SLoC
mattermost-client
This crate is an attempt to provde a sane Rust interface to the Mattermost API.
Example
use mattermost_client::Client;
let client = Client::new("https://<YOUR MATTERMOST INSTANCE URL>")
.with_user_agent("MyLittleSoftware/1.0")
.with_access_token("<YOUR MATTERMOST ACCESS TOKEN>");
client
.posts()
.create_post()
.channel_id("#welcome")
.props(serde_json::json!({
"name": "Example",
}))
.message("Hello world!")
.build()
.send(&client)
.await
.into_diagnostic()?;
Installation
Add this in your Cargo.toml
:
[dependencies]
mattermost-client = "0.1"
Dependencies
~6–18MB
~268K SLoC