21 lines
471 B
Rust
21 lines
471 B
Rust
use std::ops::Sub;
|
|
use chrono::NaiveDate;
|
|
use toggl::TogglApi;
|
|
|
|
mod toggl;
|
|
mod sensitive;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let api = TogglApi::new(
|
|
sensitive::API_TOKEN,
|
|
sensitive::WORKSPACE_ID,
|
|
);
|
|
|
|
dbg!(api.search(toggl::types::TogglReportFilters {
|
|
start_date: Some(NaiveDate::from_ymd_opt(2024, 07, 10).unwrap()),
|
|
end_date: Some(NaiveDate::from_ymd_opt(2024, 07, 16).unwrap()),
|
|
..Default::default()
|
|
}).await);
|
|
}
|