1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # chalk-client
//!
//! The official [Chalk](https://chalk.ai) client library for Rust.
//!
//! Provides both an HTTP/REST client ([`ChalkClient`]) and a gRPC client
//! ([`ChalkGrpcClient`]) for online queries, bulk queries, and feature uploads.
//! Use the gRPC client for latency-sensitive workloads; use the HTTP client for
//! offline queries and general use.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use chalk_client::ChalkClient;
//! use chalk_client::types::QueryOptions;
//! use std::collections::HashMap;
//!
//! # async fn example() -> chalk_client::error::Result<()> {
//! let client = ChalkClient::new()
//! .client_id("your-client-id")
//! .client_secret("your-client-secret")
//! .environment("production")
//! .build()
//! .await?;
//!
//! let inputs = HashMap::from([
//! ("user.id".to_string(), serde_json::json!(42)),
//! ]);
//! let outputs = vec!["user.age".to_string(), "user.name".to_string()];
//!
//! let response = client.query(inputs, outputs, QueryOptions::default()).await?;
//! for feature in &response.data {
//! println!("{}: {:?}", feature.field, feature.value);
//! }
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ChalkGrpcClient;
pub use OfflineQueryParams;