blooio
Typed, low-overhead Rust bindings for the Blooio API (iMessage / SMS automation), exposing both an async and a blocking surface from a single sans-IO core. Sync users pull no async runtime.
Features
| Feature | Default | Description |
|---|---|---|
async |
✅ | The async Client executor (reqwest). |
sync |
The blocking BlockingClient executor (ureq), no tokio. |
|
rustls |
✅ | TLS via rustls. |
native-tls |
TLS via the system's native stack. | |
webhooks |
✅ | Typed webhook payloads + HMAC signature verification. |
tracing |
✅ | Secret-redacted request instrumentation. |
At least one of async / sync must be enabled (enforced at compile time).
Install
[]
= "0.1"
Blocking client only, no async runtime:
[]
= { = "0.1", = false, = ["sync", "rustls", "webhooks"] }
Quick start (async)
use Client;
async
Quick start (blocking)
use BlockingClient;
The async and blocking surfaces are mirror images: the same resource handles and
method names, differing only by .await.
Resources
Resource handles hang off the client and group the endpoints:
| Handle | Highlights |
|---|---|
account() |
get |
chats() / chat(id) |
list, send/send_text, messages, reactions, polls, typing, read receipts, backgrounds |
contacts() |
list, create, get, update, delete, capabilities, tags |
groups() |
list, create, get, update, delete, icons, members(id) |
contact_card() |
get, update |
facetime() |
call |
location() |
list, get, refresh |
numbers() |
list |
phone_numbers() |
lookup, lookup_post, batch |
webhooks() |
list, create, get, update, delete, rotate_secret, logs(id) |
Builders
Endpoints with many optional fields use a fluent builder. For example, sending a message:
# async
Pagination
List endpoints expose a *_all paginator that fetches successive pages lazily:
# async
In the blocking client, the paginator also implements Iterator.
Escape hatch
Every endpoint is described once as a public Operation. Anything not covered
by a convenience method can be sent directly:
# async
Configuration
Client::new(key) uses production defaults. For more control, build a
ClientConfig:
use ;
use Duration;
#
The API key is wrapped in a Secret, which zeroizes on drop and redacts itself
in Debug output (api_key: [REDACTED]) — it is never logged or serialized in
cleartext.
Errors
All fallible calls return blooio::Result<T>. The Error enum distinguishes
Api (non-2xx, with a machine-readable code), Transport, Encode,
Decode, and (with webhooks) Webhook. Match on the stable code for
programmatic handling:
#
Webhooks
With the webhooks feature, verify and parse incoming events. The module is
framework-agnostic — it does not run a server:
use ;
#
Tracing
With the tracing feature, each request emits a blooio.request span carrying
the method, path, status, and elapsed time. The API key is never recorded.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.