aa-sms

Crates.ioaa-sms
lib.rsaa-sms
version0.1.3
sourcesrc
created_at2024-07-21 20:48:21.695266
updated_at2024-09-02 12:12:27.084455
descriptionSend messages from with Andrews & Arnold’s SMS API
homepage
repositoryhttps://codeberg.org/MikeCoats/aa-sms
max_upload_size
id1310574
size90,019
Mike Coats (MikeCoats)

documentation

README

aa-sms

dependency status

aa-sms is a Rust crate that provides a client for sending messages with Andrew & Arnold's SMS API.

Example

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(())
}

License

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.

Commit count: 0

cargo fmt