posthog-rs

Crates.ioposthog-rs
lib.rsposthog-rs
version0.2.2
sourcesrc
created_at2021-04-28 19:22:23.141643
updated_at2021-10-26 19:19:29.274338
descriptionAn unofficial Rust client for Posthog (https://posthog.com/).
homepage
repositoryhttps://github.com/openquery-io/posthog-rs
max_upload_size
id390726
size7,360
Tim Glaser (timgl)

documentation

README

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();

Commit count: 18

cargo fmt