posthog-rs

An unofficial Rust client for Posthog (https://posthog.com/)

7 releases

0.2.2 Oct 26, 2021
0.2.1 Oct 26, 2021
0.1.3 Apr 29, 2021
Download history 2/week @ 2024-07-31 37/week @ 2024-08-07 47/week @ 2024-08-14 51/week @ 2024-08-21 40/week @ 2024-08-28 40/week @ 2024-09-04 82/week @ 2024-09-11 290/week @ 2024-09-18 37/week @ 2024-09-25 10/week @ 2024-10-02 7/week @ 2024-10-09 15/week @ 2024-10-16 25/week @ 2024-10-23 33/week @ 2024-10-30

81 downloads per month
Used in cata

MIT license

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