From 4b36033d60ee547cfb20a315e1c7df13a7925302 Mon Sep 17 00:00:00 2001 From: Vladimir Kononov Date: Mon, 25 May 2020 11:15:28 +0300 Subject: [PATCH 1/2] Add message to SetDashboard --- rest-dashboard.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rest-dashboard.go b/rest-dashboard.go index fd0b3158..57f79576 100644 --- a/rest-dashboard.go +++ b/rest-dashboard.go @@ -215,6 +215,7 @@ func (r *Client) Search(ctx context.Context, params ...SearchParam) ([]FoundBoar type SetDashboardParams struct { FolderID int Overwrite bool + Message string } // SetDashboard updates existing dashboard or creates a new one. @@ -229,9 +230,10 @@ func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashbo var ( isBoardFromDB bool newBoard struct { - Dashboard Board `json:"dashboard"` - FolderID int `json:"folderId"` - Overwrite bool `json:"overwrite"` + Dashboard Board `json:"dashboard"` + FolderID int `json:"folderId"` + Overwrite bool `json:"overwrite"` + Message string `json:"message,omitempty"` } raw []byte resp StatusMessage @@ -244,6 +246,7 @@ func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashbo newBoard.Dashboard = board newBoard.FolderID = params.FolderID newBoard.Overwrite = params.Overwrite + newBoard.Message = params.Message if !params.Overwrite { newBoard.Dashboard.ID = 0 } From 150b4db0a2534b57d7693b9b05cd253401a992cd Mon Sep 17 00:00:00 2001 From: Vladimir Kononov Date: Thu, 29 Oct 2020 11:33:48 +0300 Subject: [PATCH 2/2] Add refresh to SetDashboard --- rest-dashboard.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rest-dashboard.go b/rest-dashboard.go index 57f79576..0fcdd3a2 100644 --- a/rest-dashboard.go +++ b/rest-dashboard.go @@ -216,6 +216,7 @@ type SetDashboardParams struct { FolderID int Overwrite bool Message string + Refresh string } // SetDashboard updates existing dashboard or creates a new one. @@ -234,6 +235,7 @@ func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashbo FolderID int `json:"folderId"` Overwrite bool `json:"overwrite"` Message string `json:"message,omitempty"` + Refresh string `json:"refresh,omitempty"` } raw []byte resp StatusMessage @@ -247,6 +249,7 @@ func (r *Client) SetDashboard(ctx context.Context, board Board, params SetDashbo newBoard.FolderID = params.FolderID newBoard.Overwrite = params.Overwrite newBoard.Message = params.Message + newBoard.Refresh = params.Refresh if !params.Overwrite { newBoard.Dashboard.ID = 0 }