system.kanoa.dashboard.addWidgetCategory
Description
Creates a new widget categorySyntax
addWidgetCategory(categoryInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
widgetCategoryName | string | The name of the category | |
widgetCategoryDescription | string | Some information about the widget category | |
enabled | bool |
Code Examples
# Example usage
userId = 123
categoryInfo = {
"widgetCategoryName": "Analysis",
"widgetCategoryDescription": "Contains analysis style widgets",
"enabled": True
}
widgetCategoryId, msg = system.kanoa.dashboard.addWidgetCategory(categoryInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'Widget Category has been saved')