Crates.io | aa-sms |
lib.rs | aa-sms |
version | 0.1.3 |
source | src |
created_at | 2024-07-21 20:48:21.695266 |
updated_at | 2024-09-02 12:12:27.084455 |
description | Send messages from with Andrews & Arnold’s SMS API |
homepage | |
repository | https://codeberg.org/MikeCoats/aa-sms |
max_upload_size | |
id | 1310574 |
size | 90,019 |
aa-sms
is a Rust crate that provides a client for sending messages
with Andrew & Arnold's SMS API.
This crate is asynchronous and this example uses Tokio, so something like this needs to be included in your Cargo.toml
.
[dependencies]
tokio = { version = "1.38.0", features = ["full"] }
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let username = "+441314960123";
let password = "hunter2";
let destination = "+441414960456";
let message = String::from("⌨ This is a test! 📱");
let client = aa_sms::Client::builder()
.username(username)
.password(password)
.build();
let sms = aa_sms::Message::builder()
.destination(destination)
.message(message)
.build();
client
.send(sms)
.await?;
Ok(())
}
aa-sms - Send messages from Rust with Andrew & Arnold's SMS API
Copyright (C) 2024 Mike Coats
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.