Crates.io | posthog-rs |
lib.rs | posthog-rs |
version | 0.3.5 |
source | src |
created_at | 2021-04-28 19:22:23.141643+00 |
updated_at | 2025-02-19 12:48:23.88307+00 |
description | An unofficial Rust client for Posthog (https://posthog.com/). |
homepage | |
repository | https://github.com/openquery-io/posthog-rs |
max_upload_size | |
id | 390726 |
size | 21,622 |
Please see the main PostHog docs.
This crate is under development
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();