2 stable releases
| 1.0.1 | Mar 1, 2026 |
|---|
#599 in Value formatting
68KB
960 lines
waka-api
WakaTime HTTP client library for Rust.
Provides typed request/response structs and an async HTTP client for the WakaTime API v1. Used internally by the waka CLI.
Usage
Add to your Cargo.toml:
[dependencies]
waka-api = "1"
tokio = { version = "1", features = ["full"] }
Example
use waka_api::WakaClient;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = WakaClient::new("your-wakatime-api-key")?;
let user = client.current_user().await?;
println!("Logged in as: {}", user.data.display_name);
let stats = client.stats("last_7_days", None).await?;
println!("Total last 7 days: {}", stats.data.human_readable_total);
Ok(())
}
Documentation
Full API reference: docs.rs/waka-api
Part of the waka project
This crate is the HTTP layer for the waka CLI — a fast, beautiful WakaTime command-line client for your terminal.
License
MIT — see LICENSE.
Dependencies
~12–21MB
~283K SLoC