A rust crate for sending messages to Slack via webhooks.
Slack is a messaging platform for team collaboration.
Add the crate to your existing project:
```rust extern crate slackhook; use slackhook::{Slack, Payload, PayloadTemplate};
fn main() { let slack = Slack::new("https://hooks.slack.com/services/abc/123/45z"); let p = Payload::new(PayloadTemplate::Complete { text: "test message", channel: Some("#testing"), username: Some("My Bot"), iconurl: None, iconemoji: Some(":chartwithupwardstrend:"), attachments: None, unfurllinks: Some(true), link_names: Some(false) });
let res = slack.send(&p);
match res {
Ok(()) => println!("ok"),
Err(x) => println!("ERR: {}",x)
}
} ```
This library is distributed under similar terms to Rust: dual licensed under the MIT license and the Apache license (version 2.0).
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.