Skip to content

daisuke8000/metabase-api-rs

Repository files navigation

metabase-api-rs

⚠️ Beta Release - API may change. Production ready with no known security vulnerabilities.

A simplified Rust client for the Metabase API.

Installation

[dependencies]
metabase-api-rs = "0.1.0-beta.3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
serde_json = "1.0"

Quick Start

use metabase_api_rs::{ClientBuilder, api::Credentials, Result};
use std::time::Duration;

#[tokio::main]
async fn main() -> Result<()> {
    // Create and authenticate client
    let mut client = ClientBuilder::new("https://metabase.example.com")
        .timeout(Duration::from_secs(30))
        .build()?;
    
    client.authenticate(Credentials::email_password(
        "[email protected]",
        "password"
    )).await?;

    // Get a card
    let card = client.get_card(123).await?;
    println!("Card: {}", card.name);

    Ok(())
}

Features

Feature Description
cache Enable in-memory LRU caching
performance Performance optimizations
query-builder MBQL query builder
full Enable all features

Examples

See working examples in the examples/ directory or on docs.rs.

Documentation

Full API documentation is available on docs.rs.

License

Licensed under either of

at your option.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published