Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bernmic/pi-hole

Pure go bindings to the pi-hole v3 api
https://github.com/bernmic/pi-hole

go pi-hole

Last synced: 14 days ago
JSON representation

Pure go bindings to the pi-hole v3 api

Awesome Lists containing this project

README

        

# 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`

```go
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.