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
//! A small, typed client for Umami's public analytics ingestion API.
//!
//! `rust-umami` intentionally focuses on sending analytics. It never logs in,
//! stores an API key, or calls Umami's reporting and administration APIs.
//!
//! # Quick start
//!
//! ```no_run
//! use rust_umami::Client;
//! use serde_json::json;
//!
//! # async fn example() -> rust_umami::Result<()> {
//! let umami = Client::new(
//! "https://analytics.example.com",
//! "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
//! )?;
//!
//! umami
//! .event("signup")
//! .url("/pricing")
//! .data(json!({ "plan": "pro" }))
//! .send()
//! .await?;
//! # Ok(())
//! # }
//! ```
//!
//! A [`Client`] is stateless and safe to reuse across visitors. For a sequence
//! of calls from one visitor, create a [`Session`]; it transparently reuses
//! Umami's cache value while remaining isolated from other sessions.
pub use ;
pub use Context;
pub use ;
pub use ;
pub use ;
/// Re-export of `serde_json` for convenient use with [`serde_json::json!`].
pub use serde_json;