Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bernmic/pi-hole
- Owner: bernmic
- License: mit
- Created: 2018-10-06T10:32:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T09:51:58.000Z (over 5 years ago)
- Last Synced: 2024-10-11T02:23:30.183Z (about 1 month ago)
- Topics: go, pi-hole
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 mainimport (
"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.