Termii Rust

This is a Rust SDK for Termii's messaging api. The

Example

Sending a quick message

This crate asynchronous client is the default client enabled by the default feature.

toml [dependencies] termii_rust = { version = "0.1", features = ["default"] }

```rust use termiirust::{ asyncimpl::rest::termii, common::switch::messaging::{Channel, MessageRequest, MessageType}, };

let client = termii::Termii::new("Your API key"); let message = MessageRequest::new( "234XXXXXXXXXX".tostring(), "FromYourOrg".tostring(), "Hello from Rust Termii. 😎".tostring(), MessageType::Plain, Channel::Dnd, );

let message = client.switch.messaging.send(_message).await; println!("{:?}", message); ```

The blocking client is also available, and can be enabled by the blocking feature.

toml [dependencies] termii_rust = { version = "0.1", features = ["blocking"] }

```rust use termii_rust::{ blocking::rest::termii, common::switch::messaging::{Channel, MessageRequest, MessageType}, }

let client = termii::Termii::new("Your API key"); let message = MessageRequest::new( "234XXXXXXXXXX".tostring(), "FromYourOrg".tostring(), "Hello from Rust Termii. 😎".tostring(), MessageType::Plain, Channel::Dnd, );

let message = client.switch.messaging.send(_message).unwrap(); println!("{:?}", message); ```