Skip to content

bernmic/pi-hole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go library for pi-hole

This library gives access to the API of pi-hole. All functions of the v3-API are implemented.

Usage: go get github.com/bernmic/pi-hole

package main

import (
	"fmt"
	"github.com/bernmic/pi-hole"
)

func main() {
	p := pihole.New("url-to pi-hole-admin-api", "hashed password")
	
	s, err := p.GetStatus()
	fmt.Printf("%v, %v\n", s, err)
}

Url is the complete Api-Url (eg. http://localhost/admin/admin.php). The hashed password can be found in /etc/pihole/setupVars.conf under WEBPASSWORD.

About

Pure go bindings to the pi-hole v3 api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages