system.kanoa.dashboard.addUserDashboard
Description
Adds a new user dashboard entrySyntax
addUserDashboard(userDashboardInfo, userId)Parameters:
Returns:
Dictionary
| Parameter | Type | Required | Notes | 
|---|---|---|---|
| dashboardId | int | ||
| userId | int | The user this dashboard is being added to | |
| isDefault | bool | ||
| isFavorite | bool | 
Code Examples
# Example usage
userDashboardInfo = {
  "dashboardId": 4,
  "userId": 7,
  "isDefault": True,
  "isFavorite": False
}
userId = 123
dashboardId, msg = system.kanoa.dashboard.addUserDashboard(userDashboardInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'User Dashboard has been saved')