Official Rust SDK for Hookfreight.
cargo add hookfreightuse std::collections::HashMap;
use hookfreight::{Hookfreight, HookfreightConfig};
use serde_json::json;
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Hookfreight::new(HookfreightConfig {
api_key: Some("hf_sk_...".to_string()),
..HookfreightConfig::default()
})?;
let mut params = HashMap::new();
params.insert("limit".to_string(), json!(10));
let deliveries = client.deliveries.list(Some(¶ms)).await?;
println!("{}", deliveries);
Ok(())
}- Apps: list/create/get/update/delete
- Endpoints: list/create/get/update/delete
- Events: list/get/list_by_endpoint/replay
- Deliveries: list/list_by_event/retry/queue_stats
- API and connection error mapping
Apache-2.0