feat(torn-api): add chrono for datetime support

This commit is contained in:
pyrite 2025-05-27 19:27:57 +02:00
parent 266122ea0e
commit 7a4f6462f5
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
7 changed files with 741 additions and 22 deletions

View file

@ -31,6 +31,7 @@ futures = { version = "0.3", default-features = false, features = [
"std",
"async-await",
] }
chrono = { version = "0.4.41", features = ["serde"] }
[dev-dependencies]
tokio = { version = "1", features = ["full"] }

View file

@ -366,6 +366,15 @@ pub(super) mod test {
faction_scope.lookup(|b| b).await.unwrap();
}
#[tokio::test]
async fn faction_reports() {
let client = test_client().await;
let faction_scope = FactionScope(&client);
faction_scope.reports(|b| b).await.unwrap();
}
#[tokio::test]
async fn forum_categories() {
let client = test_client().await;
@ -954,4 +963,11 @@ pub(super) mod test {
client.user().attacks(|b| b).await.unwrap();
}
#[tokio::test]
async fn user_reports() {
let client = test_client().await;
client.user().reports(|b| b).await.unwrap();
}
}