pi-hole-api 0.3.3

Library for interacting with the Pi Hole PHP API
Documentation
1
2
3
4
5
6
7
8
9
use pi_hole_api::{PiHoleAPIConfig, UnauthenticatedPiHoleAPI};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api = PiHoleAPIConfig::new("http://192.168.0.19".to_string());

    let status = api.get_summary();
    println!("{:?}", status);
    Ok(())
}