| Crates.io | posthog-unofficial |
| lib.rs | posthog-unofficial |
| version | 0.2.3 |
| created_at | 2022-09-11 18:45:15.791805+00 |
| updated_at | 2022-09-11 18:45:15.791805+00 |
| description | An unofficial Rust client for Posthog (https://posthog.com/). |
| homepage | |
| repository | https://github.com/getsynth/posthog-unofficial-rs |
| max_upload_size | |
| id | 663172 |
| size | 7,582 |
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();