#client #com #posthog #post-hog

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

#88 in #com

Download history 3/week @ 2024-01-08 10/week @ 2024-01-15 6/week @ 2024-02-05 38/week @ 2024-02-12 2/week @ 2024-02-19 22/week @ 2024-02-26 16/week @ 2024-03-11 27/week @ 2024-03-18 87/week @ 2024-04-01

130 downloads per month

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
~268K SLoC