Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.23 KB

README.md

File metadata and controls

35 lines (27 loc) · 1.23 KB

ConnectBox Client

License Github CI Go Report Codecov

HTTP client for ConnectBox routers used by Ziggo internet provider in the Netherlands.

Example

import "github.com/tetafro/connectbox"

client, err := connectbox.NewClient("http://192.168.178.1", "NULL", "password")
if err != nil {
    log.Fatalf("Failed to init ConnectBox client: %v", err)
}

if err := client.Login(ctx); err != nil {
    log.Fatalf("Failed to login: %v", err)
}

var data CMSystemInfo
err := client.Get(ctx, FnCMSystemInfo, &data)
if err != nil {
    log.Fatalf("Failed to get CMSystemInfo: %v", err)
}
log.Printf("System uptime: %s", data.SystemUptime)

if err := client.Logout(ctx); err != nil {
    log.Fatalf("Failed to logout: %v", err)
}