golang wrapper library of Google APIs Client Library for Go
Depends on the google's each libraries.
Install google-api-go-wrapper and required packages using go get
command:
$ go get github.com/evalphobia/google-api-go-wrapper/...
Install google's library:
$ go get google.golang.org/api/analytics/v3
import "github.com/evalphobia/google-api-go-wrapper/analytics"
client := analytics.NewWithParams(secret, email)
viewID := "00000000"
result, err := cli.GetRealtimeActiveUser(viewID)
if err != nil {
fmt.Printf("[ERROR] %s\n", err.Error())
return
}
fmt.Printf("activeUser=%d\n", result)