Class: List

List(body, buttonText, sections, titlenullable, footernullable)

Message type List

Constructor

new List(body, buttonText, sections, titlenullable, footernullable)

Parameters:
Name Type Attributes Description
body string
buttonText string
sections Array.<any>
title string <nullable>
footer string <nullable>
Source:

Members

buttonText :string

List button text

Type:
  • string
Source:

description :string

Message body

Type:
  • string
Source:

footer of message

Type:
  • string
Source:

sections :Array.<any>

sections of message

Type:
  • Array.<any>
Source:

title :string

title of message

Type:
  • string
Source:

Methods

_format(sections) → {Array.<any>}

Creates section array from simple array

Parameters:
Name Type Description
sections Array.<any>
Source:
Returns:
Type
Array.<any>
Example
Input: [{title:'sectionTitle',rows:[{id:'customId', title:'ListItem2', description: 'desc'},{title:'ListItem2'}]}}]
Returns: [{'title':'sectionTitle','rows':[{'rowId':'customId','title':'ListItem1','description':'desc'},{'rowId':'oGSRoD','title':'ListItem2','description':''}]}]