| Crates.io | mattermost-client |
| lib.rs | mattermost-client |
| version | 0.1.2 |
| created_at | 2023-05-12 09:06:01.927751+00 |
| updated_at | 2023-05-13 21:00:26.290122+00 |
| description | An attempt to provde a sane Rust interface to the Mattermost API |
| homepage | |
| repository | https://gitlab.com/vigigloo/libs/mattermost-client |
| max_upload_size | |
| id | 862816 |
| size | 2,627,218 |
mattermost-clientThis crate is an attempt to provde a sane Rust interface to the Mattermost API.
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()?;
Add this in your Cargo.toml:
[dependencies]
mattermost-client = "0.1"