Skip to main content

Crate openeruka_client

Crate openeruka_client 

Source
Expand description

§openeruka-client

Typed async HTTP client for a hosted Eruka instance.

§Quick start

use openeruka_client::ErukaClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ErukaClient::new(
        "https://eruka.dirmacs.com",
        &std::env::var("ERUKA_API_KEY").unwrap(),
    );

    let field = client
        .get_field("my-workspace-id", "identity/company_name")
        .await?;

    if let Some(f) = field {
        println!("Company: {:?}", f.value);
    }
    Ok(())
}

Re-exports§

pub use client::ErukaClient;
pub use error::ClientError;

Modules§

client
ErukaClient — typed HTTP client for the Eruka context memory API.
error
Client error types.