Skip to main content

Crate alguna

Crate alguna 

Source
Expand description

§Alguna Public API SDK

The official Rust SDK for the Alguna Public API.

§Getting Started

use alguna::prelude::*;

#[tokio::main]
async fn main() {
    let config = ClientConfig {
        api_key: Some("<token>".to_string()),
        ..Default::default()
    };
    let client = Alguna::new(config).expect("Failed to build client");
    client
        .events
        .ingest(
            &IngestEventsRequest {
                events: vec![EventItem {
                    account: "cust_01H1VECT".to_string(),
                    event_name: "api_call".to_string(),
                    unique_id: "evt_abc123".to_string(),
                    ..Default::default()
                }],
            },
            None,
        )
        .await;
}

§Modules

  • api - Core API types and models
  • client - Client implementations
  • config - Configuration options
  • core - Core utilities and infrastructure
  • error - Error types and handling
  • prelude - Common imports for convenience

Re-exports§

pub use error::ApiError;
pub use error::BuildError;
pub use api::*;
pub use client::*;
pub use config::*;
pub use core::*;
pub use environment::*;

Modules§

api
API client and types for the Alguna Public API
client
config
core
Core client infrastructure
environment
error
prelude
Prelude module for convenient imports