widget_modification

Widget_modification return type is used to remove/update/add existing sections in Widgets.

Note:

  1. The total number of sections in a widget is 5. if you try adding more than 5 sections, an error will be thrown.
  2. If the type is remove, you don't have to provide a section key under the action Map.
ParameterDescriptionDatatypeMax Limit
typeType of action that has to be performed - widget_modificationString-
success_bannerText to be displayed on the banner if the action was a successString50
failure_bannerText to be displayed on the banner if the action was a failureString50
actionsThe actions that have to be performed inside the widget sections  
pendingThe 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"
        }
    ]
}