Skip to content

HookFreight/hookfreight-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hookfreight-rust

Official Rust SDK for Hookfreight.

Installation

cargo add hookfreight

Quick Start

use 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(&params)).await?;
    println!("{}", deliveries);

    Ok(())
}

Features

  • 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

License

Apache-2.0

About

Official Rust SDK for Hookfreight

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages