interact-rs

Crates.iointeract-rs
lib.rsinteract-rs
version0.1.1
sourcesrc
created_at2023-10-23 19:55:07.398855
updated_at2023-10-23 20:10:04.871984
descriptionUnofficial Rust crate for Webex Interact
homepagehttps://github.com/andydixon/interact.rs
repositoryhttps://github.com/andydixon/interact.rs
max_upload_size
id1011680
size45,532
Andy Dixon (andydixon)

documentation

README

interact.rs

An unofficial Rust crate for the Webex Interact API

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");
                    }
                }
            }
        }
}
Commit count: 10

cargo fmt