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
50
51
52
53
54
55
//! Rust SDK for the Metabase HTTP API.
//!
//! ## Quick start (async)
//! ```no_run
//! # #[cfg(feature = "async")]
//! # async fn demo() -> Result<(), metabase::Error> {
//! use metabase::{Auth, Client};
//!
//! let client = Client::builder("https://metabase.example.com")?
//! .auth(Auth::session("SESSION_TOKEN"))
//! .build()?;
//!
//! let health = client.health().get().await?;
//! println!("{health:?}");
//! # Ok(())
//! # }
//! ```
//!
//! ## Quick start (blocking)
//! ```no_run
//! # #[cfg(feature = "blocking")]
//! # fn demo() -> Result<(), metabase::Error> {
//! use metabase::{Auth, BlockingClient};
//!
//! let client = BlockingClient::builder("https://metabase.example.com")?
//! .auth(Auth::session("SESSION_TOKEN"))
//! .build()?;
//!
//! let health = client.health().get()?;
//! println!("{health:?}");
//! # Ok(())
//! # }
//! ```
compile_error!;
pub use Auth;
pub use BlockingClient;
pub use Client;
pub use ;
pub use Error;
pub type Result<T> = Result;