Crates.io | wakapi |
lib.rs | wakapi |
version | 0.1.0 |
source | src |
created_at | 2024-10-02 00:20:28.74617 |
updated_at | 2024-10-16 20:50:51.736826 |
description | Wakatime API client |
homepage | https://dev.solidev.net/solidev/wakapi |
repository | https://dev.solidev.net/solidev/wakapi.git |
max_upload_size | |
id | 1393537 |
size | 71,438 |
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
:
The structures are based on the official documentation at 2024-10-01 with a few modifications to correct some errors / inconsistencies.
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);
This project is licensed under the MIT License.