1 个不稳定版本
0.1.1 | 2023年10月23日 |
---|---|
0.1.0 |
|
#19 在 #response-body
16KB
163 行代码(不包括注释)
interact.rs
Webex Interact API 的非官方 Rust 库
示例用法
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");
}
}
}
}
}
依赖项
~5–17MB
~249K SLoC