Class WebBuildersKt
-
- All Implemented Interfaces:
public final class WebBuildersKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Bus<T>> TwithWeb(T $self, Function0<WebConnectorMessage> messageProvider)Adds a Web ConnectorMessage if the current connector is Web. final static OldWebMessagewebMessage(I18nTranslator $self, CharSequence title, WebButton buttons)Creates a text with buttons. final static OldWebMessagewebMessage(I18nTranslator $self, CharSequence title, List<WebButton> buttons)Creates a text with buttons. final static WebMessagewebMessage(I18nTranslator $self, CharSequence title, Button buttons)Creates a text with buttons. final static WebMessagewebMessage(I18nTranslator $self, CharSequence title, List<Button> buttons)Creates a text with a list of buttons. final static <T extends Bus<T>> WebButtonwebButton(T $self, CharSequence title, IntentAware targetIntent, String imageUrl, StoryStep<out StoryHandlerDefinition> step, Parameters parameters)Creates a button. final static <T extends Bus<T>> ButtonwebUrlButton(T $self, CharSequence title, String url, String imageUrl, HrefTargetType target, ButtonStyle style)Creates a url button final static <T extends Bus<T>> ButtonwebUrlButton(T $self, CharSequence title, String url, String imageUrl, String target, ButtonStyle style)Creates a url button final static <T extends Bus<T>> ButtonwebUrlButton(T $self, CharSequence title, String url, String imageUrl, HrefTargetType target, String style)Creates a url button final static <T extends Bus<T>> ButtonwebUrlButton(T $self, CharSequence title, String url, String imageUrl, String target, String style)Creates a url button final static <T extends Bus<T>> ButtonwebPostbackButton(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, ButtonStyle style)Creates a postback button final static <T extends Bus<T>> ButtonwebPostbackButton(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, String style)Creates a postback button final static <T extends Bus<T>> ButtonwebQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl)Creates a quickreply button final static <T extends Bus<T>> ButtonwebIntentQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, ButtonStyle style)Creates a quickreply button with target intent final static <T extends Bus<T>> ButtonwebIntentQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, String style)Creates a quickreply button with target intent final static <T extends Bus<T>> ButtonwebNlpQuickReply(T $self, CharSequence title, String nlpText, String imageUrl, ButtonStyle style)Creates a quickreply button with target intent final static <T extends Bus<T>> ButtonwebNlpQuickReply(T $self, CharSequence title, String nlpText, String imageUrl, String style)Creates a quickreply button with target intent final static <T extends Bus<T>> WebButtonwebTextButton(T $self, CharSequence text)Creates a button from a text. final static <T extends Bus<T>> WebMessagewebCard(T $self, WebCard card)Creates a WebMessage from a WebCard. final static <T extends Bus<T>> WebCardwebCard(T $self, CharSequence title, CharSequence subTitle, List<Button> buttons)final static <T extends Bus<T>> OldWebMessagewebCard(T $self, MediaCard card)Creates a OldWebMessage from a MediaCard. final static <T extends Bus<T>> WebCardwebCardWithAttachment(T $self, CharSequence title, CharSequence subTitle, CharSequence attachmentUrl, List<Button> buttons, SendAttachment.AttachmentType type, String attachementName, CharSequence fileDescription)final static <T extends Bus<T>> WebMessagewebImage(T $self, String imageUrl, CharSequence title, CharSequence description)Creates a WebMessage from a WebImage. final static <T extends Bus<T>> WebMessagewebCarousel(T $self, WebCard cards, List<Button> buttons)Creates a WebMessage from a WebCarousel. final static <T extends Bus<T>> WebMessagewebCarousel(T $self, List<WebCard> cards, List<Button> buttons)final static <T extends Bus<T>> OldWebMessagewebCarousel(T $self, MediaCarousel carousel)Creates a OldWebMessage from a MediaCarousel. final static <T extends Bus<T>> WebMessagewebWidget(T $self, WebWidget widget, List<Button> buttons)Creates a custom payload final static <T extends Bus<T>> WebMessagewebDeepLink(T $self, String ref)-
-
Method Detail
-
withWeb
final static <T extends Bus<T>> T withWeb(T $self, Function0<WebConnectorMessage> messageProvider)
Adds a Web ConnectorMessage if the current connector is Web. You need to call BotBus.send or BotBus.end later to send this message.
-
webMessage
@Deprecated(message = "Use other methods to create buttons") final static OldWebMessage webMessage(I18nTranslator $self, CharSequence title, WebButton buttons)
Creates a text with buttons.
-
webMessage
@Deprecated(message = "Use other methods to create buttons") final static OldWebMessage webMessage(I18nTranslator $self, CharSequence title, List<WebButton> buttons)
Creates a text with buttons.
-
webMessage
final static WebMessage webMessage(I18nTranslator $self, CharSequence title, Button buttons)
Creates a text with buttons.
-
webMessage
final static WebMessage webMessage(I18nTranslator $self, CharSequence title, List<Button> buttons)
Creates a text with a list of buttons.
-
webButton
@Deprecated(message = "Use the methods of the WebBuilders to create buttons") final static <T extends Bus<T>> WebButton webButton(T $self, CharSequence title, IntentAware targetIntent, String imageUrl, StoryStep<out StoryHandlerDefinition> step, Parameters parameters)
Creates a button.
-
webUrlButton
final static <T extends Bus<T>> Button webUrlButton(T $self, CharSequence title, String url, String imageUrl, HrefTargetType target, ButtonStyle style)
Creates a url button
-
webUrlButton
final static <T extends Bus<T>> Button webUrlButton(T $self, CharSequence title, String url, String imageUrl, String target, ButtonStyle style)
Creates a url button
-
webUrlButton
final static <T extends Bus<T>> Button webUrlButton(T $self, CharSequence title, String url, String imageUrl, HrefTargetType target, String style)
Creates a url button
-
webUrlButton
final static <T extends Bus<T>> Button webUrlButton(T $self, CharSequence title, String url, String imageUrl, String target, String style)
Creates a url button
-
webPostbackButton
final static <T extends Bus<T>> Button webPostbackButton(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, ButtonStyle style)
Creates a postback button
-
webPostbackButton
final static <T extends Bus<T>> Button webPostbackButton(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, String style)
Creates a postback button
-
webQuickReply
@Deprecated(message = "use other builder") final static <T extends Bus<T>> Button webQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl)
Creates a quickreply button
-
webIntentQuickReply
final static <T extends Bus<T>> Button webIntentQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, ButtonStyle style)
Creates a quickreply button with target intent
-
webIntentQuickReply
final static <T extends Bus<T>> Button webIntentQuickReply(T $self, CharSequence title, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, String imageUrl, String style)
Creates a quickreply button with target intent
-
webNlpQuickReply
final static <T extends Bus<T>> Button webNlpQuickReply(T $self, CharSequence title, String nlpText, String imageUrl, ButtonStyle style)
Creates a quickreply button with target intent
-
webNlpQuickReply
final static <T extends Bus<T>> Button webNlpQuickReply(T $self, CharSequence title, String nlpText, String imageUrl, String style)
Creates a quickreply button with target intent
-
webTextButton
final static <T extends Bus<T>> WebButton webTextButton(T $self, CharSequence text)
Creates a button from a text.
-
webCard
final static <T extends Bus<T>> WebMessage webCard(T $self, WebCard card)
Creates a WebMessage from a WebCard.
-
webCard
final static <T extends Bus<T>> WebCard webCard(T $self, CharSequence title, CharSequence subTitle, List<Button> buttons)
-
webCard
@Deprecated(message = "No more supported", replaceWith = @ReplaceWith(imports = {}, expression = "webCard or webCardWithAttachement")) final static <T extends Bus<T>> OldWebMessage webCard(T $self, MediaCard card)
Creates a OldWebMessage from a MediaCard.
-
webCardWithAttachment
final static <T extends Bus<T>> WebCard webCardWithAttachment(T $self, CharSequence title, CharSequence subTitle, CharSequence attachmentUrl, List<Button> buttons, SendAttachment.AttachmentType type, String attachementName, CharSequence fileDescription)
-
webImage
final static <T extends Bus<T>> WebMessage webImage(T $self, String imageUrl, CharSequence title, CharSequence description)
Creates a WebMessage from a WebImage.
On the frontend, this will usually be rendered as an img tag.
Specific buttons like webUrlButton and webPostbackButton may not be supported by the frontend - in this case, webCardWithAttachment should be considered as an alternative.
- Parameters:
imageUrl- the location of the image file to display (should be one of the image formats supported by the img tag)title- a title for the image, which is also used as a file name and an alternative description whendescriptionis left unspecifieddescription- the alternate description for the image
-
webCarousel
final static <T extends Bus<T>> WebMessage webCarousel(T $self, WebCard cards, List<Button> buttons)
Creates a WebMessage from a WebCarousel.
-
webCarousel
final static <T extends Bus<T>> WebMessage webCarousel(T $self, List<WebCard> cards, List<Button> buttons)
-
webCarousel
@Deprecated(message = "No more supported", replaceWith = @ReplaceWith(imports = {}, expression = "webCarousel(vararg cards: WebCard)")) final static <T extends Bus<T>> OldWebMessage webCarousel(T $self, MediaCarousel carousel)
Creates a OldWebMessage from a MediaCarousel.
-
webWidget
final static <T extends Bus<T>> WebMessage webWidget(T $self, WebWidget widget, List<Button> buttons)
Creates a custom payload
-
webDeepLink
final static <T extends Bus<T>> WebMessage webDeepLink(T $self, String ref)
-
-
-
-