public class ListTemplateBuilder extends TemplateBaseBuilder
messageBuilder| Modifier and Type | Method and Description |
|---|---|
ListTemplateBuilder |
addButton(Button button)
Add a
Button to this template. |
ListTemplateBuilder |
addElement(ListTemplateElement element)
Adds a
ListTemplateElement to this template. |
ListTemplateElementBuilder |
addElement(String title)
Adds a
ListTemplateElement to this template. |
ListTemplateBuilder |
addQuickReply(QuickReply reply)
Adds a
QuickReply to the current object. |
ListTemplateBuilder |
addQuickReply(String title,
String payload)
Adds a
QuickReply to the current object. |
FbBotMillResponse |
build(MessageEnvelope envelope)
Builds the
FbBotMillResponse that the bot should return. |
ListTemplateBuilder |
setTopElementStyle(TopElementStyle topElementStyle)
Sets/Adds a
TopElementStyle to the list template payload. |
String |
toString() |
getRecipienteventKind, getAudioMessage, getFileMessage, getImageMessage, getLocationMessage, getVideoMessage, safeGetMessage, safeGetPostbackPayload, safeGetQuickReplyPayload, safeGetRecipient, safeGetRecipientId, safeGetSender, safeGetSenderId, validatepublic ListTemplateBuilder setTopElementStyle(TopElementStyle topElementStyle)
TopElementStyle to the list template payload.topElementStyle - the top element stylepublic ListTemplateElementBuilder addElement(String title)
ListTemplateElement to this template.title - the title of the element to add.public ListTemplateBuilder addElement(ListTemplateElement element)
ListTemplateElement to this template.element - the element to add.public ListTemplateBuilder addButton(Button button)
Button to this template.button - the button to addpublic ListTemplateBuilder addQuickReply(String title, String payload)
QuickReply to the current object.title - the quick reply button label. It can't be empty.payload - the payload sent back when the button is pressed. It can't be
empty.public ListTemplateBuilder addQuickReply(QuickReply reply)
QuickReply to the current object.reply - a quick reply object.public FbBotMillResponse build(MessageEnvelope envelope)
FbBotMillResponse that the bot should return. Creates a response containing a List Template.envelope - a MessageEnvelope object representing the incoming
message.FbBotMillResponse of this bot.public String toString()
toString in class TemplateBaseBuilderCopyright © 2017 BotMill. All rights reserved.