Pi Hole API
Rust library for interacting with the Pi Hole PHP API.
Example
Simple
use PiHoleAPI;
async
Authentication
use PiHoleAPI;
async
Limitations
Only Pi-Hole v5.0+ is supported due to changes in the return types of the API.
Currently removing domains from blacklists/whitelists via the API is broken and therefore isn't implemented.
Testing
Testing occurs against a working Pi-Hole, to test run cargo test
.
If you don't want to risk altering your Pi-Hole set up another one and alter the PI_HOLE_API_TEST_TARGET
environmental variable to point at it.
The API key is required for some tests and is read from the PI_HOLE_API_TEST_API_KEY
environmental variable.