7 releases
0.2.2 | Oct 26, 2021 |
---|---|
0.2.1 | Oct 26, 2021 |
0.1.3 | Apr 29, 2021 |
81 downloads per month
Used in cata
7KB
131 lines
PostHog Rust
Please see the main PostHog docs.
This crate is under development
Quickstart
Add posthog-rs
to your Cargo.toml
.
[dependencies]
posthog_rs = "0.2.0"
let client = crate::client(env!("POSTHOG_API_KEY"));
let mut event = Event::new("test", "1234");
event.insert_prop("key1", "value1").unwrap();
event.insert_prop("key2", vec!["a", "b"]).unwrap();
client.capture(event).unwrap();
Dependencies
~5–18MB
~238K SLoC