use wirepusher::Client;
#[tokio::main]
async fn main() -> Result<(), wirepusher::Error> {
let client = Client::from_env()?;
println!("Sending simple notification...");
let response = client
.send(
"Hello from Rust!",
"This is a test notification from the Rust Client Library",
)
.await?;
println!("Response status: {}", response.status);
println!("Response message: {}", response.message);
if response.is_success() {
println!("✓ Notification sent successfully!");
}
if let Some(rate_limit) = client.get_last_rate_limit() {
println!("\nRate limit info:");
println!(" Remaining: {}/{}", rate_limit.remaining, rate_limit.limit);
println!(" Resets at: {}", rate_limit.reset);
}
Ok(())
}