https://github.com/posthog/posthog-rs
https://github.com/posthog/posthog-rs
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/posthog/posthog-rs
- Owner: PostHog
- License: mit
- Created: 2021-04-28T19:04:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T08:48:21.000Z (10 months ago)
- Last Synced: 2025-04-04T19:18:00.962Z (9 months ago)
- Language: Rust
- Size: 47.9 KB
- Stars: 25
- Watchers: 4
- Forks: 19
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PostHog Rust
Please see the main [PostHog docs](https://posthog.com/docs).
**This crate is under development**
# Quickstart
Add `posthog-rs` to your `Cargo.toml`.
```toml
[dependencies]
posthog-rs = "0.3.7"
```
```rust
let client = posthog_rs::client(env!("POSTHOG_API_KEY"));
let mut event = posthog_rs::Event::new("test", "1234");
event.insert_prop("key1", "value1").unwrap();
event.insert_prop("key2", vec!["a", "b"]).unwrap();
client.capture(event).unwrap();
```