diff --git a/client/info.go b/client/info.go new file mode 100644 index 0000000000000000000000000000000000000000..85b10515018e8d4c4e01fb7b5946c4d529bd0e6a --- /dev/null +++ b/client/info.go @@ -0,0 +1,22 @@ +package client + +import ( + "net/http" + + webapi_info "github.com/iotaledger/goshimmer/plugins/webapi/info" +) + +const ( + routeInfo = "info" +) + +// Info gets the info of the node. +func (api *GoShimmerAPI) Info(knownPeers bool) (*webapi_info.Response, error) { + res := &webapi_info.Response{} + if err := api.do(http.MethodGet, func() string { + return routeInfo + }(), nil, res); err != nil { + return nil, err + } + return res, nil +}