technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
mod common;

use technitium::{StatsType, TopStatsType};

#[tokio::test]
#[ignore = "requires running Technitium server"]
async fn get_stats_last_hour() {
    let client = common::authenticated_client().await;
    let _stats = client
        .get_stats(StatsType::LastHour)
        .await
        .expect("get_stats should succeed");
    // Stats may be zero on a fresh server, just verify the call works
    // get_stats succeeded
}

#[tokio::test]
#[ignore = "requires running Technitium server"]
async fn get_top_stats() {
    let client = common::authenticated_client().await;
    let top = client
        .get_top_stats(StatsType::LastHour, TopStatsType::Clients)
        .await
        .expect("get_top_stats should succeed");
    assert!(!top.data.is_null(), "top stats data should not be null");
}