Pi-hole customDNS class
from pihole import pihole_api
pihole = pihole_api("http://pihole-ip:80", "password")
pihole.add_custom_dns("domain", "ip")
Outputs a json object like the following:
{ data:
[
["host1.mgmt", "10.0.0.2"],
["host2.mgmt", "10.0.0.3"]
]
}
Delete a domain entry. Output on success:
{success: true, message: ""}
Add a domain entry. Output on success:
{success: true, message: ""}