From 1d13caddaa39775de75db3b29f5bd509482dd51a Mon Sep 17 00:00:00 2001 From: Jasper Deflander Date: Wed, 3 Jun 2020 11:58:23 +0200 Subject: [PATCH] Add readme with compatibility table --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ea8d757 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# Elimity Insights Go client + +This Go module provides a client for connector interactions with an Elimity +Insights server. + +## Usage + +```go +package main + +import ( + "github.com/elimity-com/insights-client-go" + "time" +) + +func main() { + client, err := insights.NewClient("https://local.elimity.com:8081/api", "token") + if err != nil { + panic(err) + } + + now := time.Now() + log := insights.ConnectorLog{ + Level: insights.Info, + Message: "Hello world!", + Timestamp: now, + } + logs := []insights.ConnectorLog{log} + if err := client.CreateConnectorLogs(logs); err != nil { + panic(err) + } +} +``` + +## Installation + +```sh +$ go get github.com/elimity-com/insights-client-go +``` + +## Compatibility + +| Client version | Insights version | +| -------------- | ---------------- | +| 1 | ^2.7 |