waka_api/lib.rs
1//! `WakaTime` HTTP client library.
2//!
3//! This crate provides an async HTTP client for the
4//! [`WakaTime` API](https://wakatime.com/developers).
5//! It is designed to be usable independently of the `waka` CLI.
6//!
7//! # Example
8//!
9//! ```rust,no_run
10//! use waka_api::WakaClient;
11//!
12//! async fn example() -> Result<(), waka_api::ApiError> {
13//! let client = WakaClient::new("waka_xxxxxx");
14//! let me = client.me().await?;
15//! println!("Hello {}", me.username);
16//! Ok(())
17//! }
18//! ```
19
20pub mod client;
21pub mod error;
22pub mod params;
23pub mod types;
24
25pub use client::WakaClient;
26pub use error::ApiError;
27pub use params::{StatsRange, SummaryParams};
28pub use types::{
29 BestDay, Goal, GoalChartEntry, GoalChartRange, GoalsResponse, GrandTotal, LeaderboardEntry,
30 LeaderboardRange, LeaderboardResponse, LeaderboardUser, MachineEntry, Project,
31 ProjectsResponse, RunningTotal, Stats, StatsResponse, SummaryData, SummaryEntry, SummaryRange,
32 SummaryResponse, User, UserResponse,
33};