This commit is contained in:
2024-07-16 08:30:02 +01:00
parent c1b8636407
commit 45f1497df2
4 changed files with 353 additions and 15 deletions
+6 -5
View File
@@ -1,5 +1,5 @@
use std::ops::Sub;
use chrono::{TimeDelta, Utc};
use chrono::NaiveDate;
use toggl::TogglApi;
mod toggl;
@@ -12,8 +12,9 @@ async fn main() {
sensitive::WORKSPACE_ID,
);
dbg!(api.get_time_user_entries_between(
Utc::now().sub(TimeDelta::days(2)),
Utc::now(),
).await);
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);
}