Crates.io | interact-rs |
lib.rs | interact-rs |
version | 0.1.1 |
source | src |
created_at | 2023-10-23 19:55:07.398855 |
updated_at | 2023-10-23 20:10:04.871984 |
description | Unofficial Rust crate for Webex Interact |
homepage | https://github.com/andydixon/interact.rs |
repository | https://github.com/andydixon/interact.rs |
max_upload_size | |
id | 1011680 |
size | 45,532 |
Example Usage
use interact_rs::sms;
fn main() {
let mut sms = sms::sms_api("zzz_XXXXXXXXXXXXXXXXXXXXXXXXXX".to_string());
match sms
.add_recipient("+447000000000".to_string()) // Add as many times as you need
.message("Testing using new Interact Rust class".to_string())
.set_originator("RustAPI".to_string())
.send_sms() {
Ok(response) => println!("Success! {},{}", response.status, response.response_body),
Err(e) => {
println!("Error! {}",e);
match e.get_data() {
Some(data) => {
println!("Additional information: {}",data);
},
None => {
println!("No additional data available");
}
}
}
}
}