Crates.io | engagespot |
lib.rs | engagespot |
version | 0.1.0 |
source | src |
created_at | 2023-02-14 14:34:43.685359 |
updated_at | 2023-02-14 14:34:43.685359 |
description | Rust library for communicating with Engagespot REST API. Send multi-channel notifications from your rust app. |
homepage | |
repository | http://github.com/engagespot/engagespot-rust |
max_upload_size | |
id | 784938 |
size | 45,455 |
This is the official node.js library for communicating with Engagespot REST API. Send multi-channel notifications from your rust app.
You need Engagespot API KEY and API SECRET from your dashboard to get started. If you don't have one, just get one for free.
Add to your Cargo.toml
:
cargo add engagespot
use engagespot::{Engagespot, NotificationBuilder};
// A reactor like tokio or async-std is required to run the async code.
#[tokio::main(flavor = "current_thread")]
async fn main() {
// initialize engagespot client by passing the api_key and api_secret
let client = Engagespot::new("api_key", "api_secret");
let notification = NotificationBuilder::new("title", &vec!["foo@bar.com".to_string()]).build();
let response = client.send(¬ification).await.unwrap_or_else(|err: String| format!("Error: {}", err));
println!("new res is {}", response);
This code is free to use under the terms of the MIT license.