widget_modification
Widget_modification return type is used to remove/update/add existing sections in Widgets.
Note:
- The total number of sections in a widget is 5. if you try adding more than 5 sections, an error will be thrown.
- If the type is remove, you don't have to provide a section key under the action Map.
Parameter | Description | Datatype | Max Limit |
type | Type of action that has to be performed - widget_modification | String | - |
success_banner | Text to be displayed on the banner if the action was a success | String | 50 |
failure_banner | Text to be displayed on the banner if the action was a failure | String | 50 |
actions | The actions that have to be performed inside the widget sections | ||
pending | The pending action is valid for 3 minutes. ie, the callback API for a particular pending action should be invoked within 3 minutes. Learn more. | Boolean | - |
Sample Script (Deluge):
{
"type":"widget_modification",
"success_banner":"widget section added",
"failure_banner":"widget section failed to add",
"pending":true,
"actions":[
{
"type":"remove|update|add_after|add_before",
"name":"$sectionName",
"section":"$section"
}
]
}