Crates.io | clickatell-api |
lib.rs | clickatell-api |
version | 0.3.0 |
source | src |
created_at | 2022-08-07 20:08:08.054332 |
updated_at | 2022-08-10 19:50:19.401338 |
description | Send messages to mobile phones via Clickatell messaging gateways |
homepage | |
repository | |
max_upload_size | |
id | 640377 |
size | 31,584 |
Clickatell API is a crate for interacting with Clickatell messaging gateways from Rust applications
use clickatell_api::one_api::{message::Channel,send_messages, Client};
let client = Client::new(api_key)?;
let mut request = send_messages::Request::new();
request.add_message(Channel::SMS, number, "This is message one")?;
request.add_message(Channel::SMS, number, "This is message two")?;
let response = client.send_messages(request).await?;
for msg_response in response.messages() {
println!("Messge ID: {} - {:?}", msg_response.to, msg_response.message_api_id);
}
Copyright 2022 Farrel Lifson
Released under the MIT License. See LICENSE-MIT for details.