honk-honk 0.4.1

Official Rust client for Honk! Honk! (honk-honk.app): send events from apps, jobs and CI to your phone, with retries and idempotency built in.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! cargo run --example quickstart   (with HONK_URL and HONK_KEY set; sends one message)
use honk::{Honk, Message, Severity};

#[tokio::main]
async fn main() -> honk::Result<()> {
    let honk = Honk::from_env()?;
    let hello = Message::new("It compiled, it ran, it buzzed.")
        .title("Hello from Rust")
        .severity(Severity::BEEP);
    let accepted = honk.honk(&hello, None).await?;
    println!(
        "stored as {} (duplicate: {})",
        accepted.id, accepted.duplicate
    );
    Ok(())
}