Skip to content

Commit 6d0212c

Browse files
chore: improve client libs, fix team deletions not being synced to team mappings
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 3778837 commit 6d0212c

20 files changed

Lines changed: 395 additions & 281 deletions

File tree

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bun.lock‎

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/api/CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
## [0.1.0]
6+
7+
- Initial Rust API client with buffered batch event delivery and optional Reqwest, Tokio, and Tower integrations.
8+
- Designed for the batch event endpoint introduced in Liwan 1.8.0. Older servers do not provide this endpoint.

‎crates/api/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "liwan-api"
3-
version.workspace = true
3+
version = "0.1.0"
44
edition.workspace = true
55
rust-version.workspace = true
66
description = "Rust client for the Liwan API"

‎crates/api/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2020
)?
2121
.build_tokio()?;
2222

23-
client.event("docs", liwan_api::Event::pageview("https://example.com/docs"))?;
23+
client.event("my-entity-id", liwan_api::Event::pageview("https://example.com/docs"))?;
2424
client.shutdown().await?;
2525
Ok(())
2626
}

‎crates/api/examples/axum.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::builder("https://analytics.example.com", api_key, reqwest::Client::builder().build()?)?
88
.build_tokio()?;
99

10-
let tracking = LiwanLayer::new(client.clone(), "docs")
10+
let tracking = LiwanLayer::new(client.clone(), "my-entity-id")
1111
.origin("https://service.example.com")
1212
.paths(PathFilter::new().include("/").exclude("/health"));
1313

‎crates/api/examples/background_job.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
.batch_size(100)
88
.build_tokio()?;
99

10-
analytics.event("worker", Event::new("job_completed", "https://worker.example.com/jobs/import"))?;
10+
analytics.event("my-entity-id", Event::new("job_completed", "https://worker.example.com/jobs/import"))?;
1111
analytics.shutdown().await?;
1212
Ok(())
1313
}

0 commit comments

Comments
 (0)