#access-token #mattermost #message

mattermost-client

An attempt to provde a sane Rust interface to the Mattermost API

3 releases

0.1.2 May 13, 2023
0.1.1 May 12, 2023
0.1.0 May 12, 2023

#543 in HTTP server

Download history 22/week @ 2024-07-27 16/week @ 2024-09-21 4/week @ 2024-09-28

63 downloads per month

MIT license

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

~7–19MB
~267K SLoC