From 013f88a40dd20ce5818e11ed5219842ab5c698cb Mon Sep 17 00:00:00 2001 From: ElectroNafta Date: Thu, 24 Oct 2024 12:13:52 +0200 Subject: [PATCH] feat(IMEX-45): added unauth telemetry call --- data.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data.go b/data.go index 0d758c1..7e4d8af 100644 --- a/data.go +++ b/data.go @@ -2,6 +2,7 @@ package proton import ( "context" + "github.com/go-resty/resty/v2" ) @@ -16,3 +17,10 @@ func (c *Client) SendDataEventMultiple(ctx context.Context, req SendStatsMultiRe return r.SetBody(req).Post("/data/v1/stats/multiple") }) } + +func (m *Manager) SendUnauthDataEvent(ctx context.Context, req SendStatsReq) error { + if _, err := m.r(ctx).SetBody(req).Post("/data/v1/stats"); err != nil { + return err + } + return nil +}