Class WebBuildersKt

    • Constructor Detail

    • 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.

      • 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

      • 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

      • 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 when description is left unspecified
        description - the alternate description for the image
      • webWidget

         final static <T extends Bus<T>> WebMessage webWidget(T $self, WebWidget widget, List<Button> buttons)

        Creates a custom payload