From ba5058e844d5caead788cd5d828563e141dc3390 Mon Sep 17 00:00:00 2001
From: capossele <angelocapossele@gmail.com>
Date: Fri, 17 Apr 2020 11:02:03 +0100
Subject: [PATCH] :sparkles: adds client-lib info

---
 client/info.go | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 client/info.go

diff --git a/client/info.go b/client/info.go
new file mode 100644
index 00000000..85b10515
--- /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
+}
-- 
GitLab