Crates.io | posthog-rs |
lib.rs | posthog-rs |
version | 0.2.2 |
source | src |
created_at | 2021-04-28 19:22:23.141643 |
updated_at | 2021-10-26 19:19:29.274338 |
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 | 7,360 |
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();