Add basic node handling

This commit is contained in:
Ingo Oppermann
2022-08-03 22:05:28 +02:00
parent 11c3fce812
commit fe889aa4e2
35 changed files with 3988 additions and 22 deletions

20
client/log.go Normal file
View File

@@ -0,0 +1,20 @@
package client
import (
"encoding/json"
"github.com/datarhei/core/v16/http/api"
)
func (r *restclient) Log() ([]api.LogEvent, error) {
var log []api.LogEvent
data, err := r.call("GET", "/log", "", nil)
if err != nil {
return log, err
}
err = json.Unmarshal(data, &log)
return log, err
}