# Wakapi : wakatime API client This crate is a Work In Progress API client for the Wakatime API. It is **NOT** ready for production. The following endpoints are implemented, only in _read_ mode (GET requests), as blocking or async depending on the feature flag `blocking`: - [Commits](https://wakatime.com/developers#commits) : [Commits], [CommitsParams], [Commits::fetch] - [Projects](https://wakatime.com/developers#projects) : [Projects], [ProjectsParams], [Projects::fetch] - [Commit](https://wakatime.com/developers#commit) : [Commit], [CommitParams], [Commit::fetch] - [Stats](https://wakatime.com/developers#stats) : [Stats], [StatsParams], [Stats::fetch] - [Durations](https://wakatime.com/developers#durations) : [Durations], [DurationsParams], [Durations::fetch] - [Summaries](https://wakatime.com/developers#summaries) : [Summaries], [SummariesParams], [Summaries::fetch] - [Heartbeats](https://wakatime.com/developers#heartbeats) : [Heartbeats], [HeartbeatsParams], [Heartbeats::fetch] - [All Time Since Today](https://wakatime.com/developers#all-time-since-today) : [AllTimeSinceToday], [AllTimeSinceTodayParams], [AllTimeSinceToday::fetch] The structures are based on the [official documentation](https://wakatime.com/developers) at 2024-10-01 with a few modifications to correct some errors / inconsistencies. ## Usage ### Async mode ````rust use wakapi::{WakapiClient, CommitsParams}; let client = wakapi::WakapiClient::new( "https://api.wakatime.com", "YOUR_WAKATIME_API_KEY", ); let res = wakapi::Summaries::fetch(&client, wakapi::SummariesParams::from_interval("2024-01-01", "2024-01-05"), ).await.unwrap(); println!("{:?}", res); ``` ### Blocking mode ```rust use wakapi::{WakapiClient, CommitsParams}; let client = wakapi::WakapiClient::new( "https://api.wakatime.com", "YOUR_WAKATIME_API_KEY", ); let res = wakapi::Summaries::fetch(&client, wakapi::SummariesParams::from_interval("2024-01-01", "2024-01-05"), ).unwrap(); println!("{:?}", res); ```` ## License This project is licensed under the MIT License.