#sms #bulk #demo #api-bindings #smslocal

bin+lib sms_local_bulk

A Rust crate that simulates sending bulk SMS messages using SMSLocal-style API parameters. Ideal for demos, testing, documentation, and mock integrations with browser preview support.

1 unstable release

new 0.1.0 Apr 1, 2025

#14 in #bulk

Download history 68/week @ 2025-03-27

68 downloads per month

MIT license

14KB
63 lines

sms_local_bulk

A Rust crate to simulate sending bulk SMS messages using the SMSLocal API.
This project is built as a demo crate using a dummy API key and does not send real messages.

It safely simulates API behavior by using httpbin.org and opens the response in your default web browser for visual preview.

Crates.io License


✨ Features

  • Bulk SMS sending simulation
  • Uses httpbin.org for safe mock requests
  • Dummy API key (dummy_api_key_123456) — no real SMS charges
  • Automatically opens server response in your browser
  • Great for learning, testing, documentation, or backlinks

📦 Installation

Add this to your Cargo.toml:

sms_local_bulk = "0.1.0"
🚀 Usage
rust
Copy
Edit
use sms_local_bulk::send_bulk_sms;

#[tokio::main]
async fn main() {
    let recipients = ["1234567890", "9876543210"];
    let sender = "SMSLocal";
    let message = "Hello from Rust demo crate!";

    if let Err(e) = send_bulk_sms(sender, &recipients, message).await {
        eprintln!("❌ Error occurred (mock): {:?}", e);
    }
}
🔐 Environment Setup
Create a .env file in your root directory:

env
Copy
Edit
SMSLOCAL_API_KEY=dummy_api_key_123456
This is a placeholder value and can be customized or left as-is.

🌐 Browser Preview Feature
Every mock API request response is:

Saved to sms_response.html

Automatically opened in your default web browser (Windows supported)

Example Output:
json
Copy
Edit
{
  "form": {
    "apikey": "dummy_api_key_123456",
    "numbers": "1234567890,9876543210",
    "message": "Hello from Rust demo crate!",
    "sender": "SMSLocal"
  },
  "url": "https://httpbin.org/post"
}
📄 License
MIT License.
Free to use, modify, and share for educational, demo, or open-source publishing purposes.

🔗 Links

SMSLocal Official [Site](https://www.smslocal.com)

Crates.io Listing

httpbin.org Test API

Dependencies

~7–19MB
~262K SLoC