-
public final class TwitterBuildersKt
-
-
Field Summary
Fields Modifier and Type Field Description private final ConnectorTypetwitterConnectorTypeprivate final IntegerMAX_OPTION_LABELprivate final IntegerMAX_OPTION_DESCRIPTIONprivate final IntegerMAX_METADATA
-
Method Summary
Modifier and Type Method Description final ConnectorTypegetTwitterConnectorType()The Twitter connector type. final IntegergetMAX_OPTION_LABEL()final IntegergetMAX_OPTION_DESCRIPTION()final IntegergetMAX_METADATA()final <T extends Bus<T>> OutcomingEventdirectMessage(T $self, CharSequence message)Creates a direct message with only text final <T extends Bus<T>> OutcomingEventdirectMessageWithButtons(T $self, CharSequence message, List<CTA> ctas)Creates a direct message with Buttons final <T extends Bus<T>> OutcomingEventdirectMessageWithButtons(T $self, CharSequence message, CTA ctas)Creates a direct message with Buttons final <T extends Bus<T>> OutcomingEventdirectMessageWithOptions(T $self, CharSequence message, Option options)Creates a direct message with quick replies final <T extends Bus<T>> OutcomingEventdirectMessageWithOptions(T $self, CharSequence message, OptionWithoutDescription options)Creates a direct message with quick replies final <T extends Bus<T>> OutcomingEventdirectMessageWithAttachment(T $self, CharSequence message, MediaCategory mediaCategory, String contentType, ByteArray bytes, Option options)Creates a direct message with an attachment final <T extends Bus<T>> OutcomingEventdirectMessageWithAttachment(T $self, CharSequence message, MediaCategory mediaCategory, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with an attachment final <T extends Bus<T>> OutcomingEventdirectMessageWithGIF(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)Creates a direct message with a gif (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithGIF(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with a gif (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithGIF(T $self, String contentType, ByteArray bytes, Option options)Creates a direct message with a gif (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithGIF(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with a gif (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithImage(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)Creates a direct message with an image (Max 5MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithImage(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with an image (Max 5MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithImage(T $self, String contentType, ByteArray bytes, Option options)Creates a direct message with an image (Max 5MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithImage(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with an image (Max 5MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithVideo(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)Creates a direct message with a video (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithVideo(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with a video (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithVideo(T $self, String contentType, ByteArray bytes, Option options)Creates a direct message with a video (Max 15MB) final <T extends Bus<T>> OutcomingEventdirectMessageWithVideo(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)Creates a direct message with a video (Max 15MB) final <T extends Bus<T>> WebUrlwebUrl(T $self, CharSequence label, CharSequence url)Creates a url button final <T extends Bus<T>> Optionoption(T $self, CharSequence label, CharSequence description, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)Creates an Option Quick Reply final <T extends Bus<T>> OptionWithoutDescriptionoption(T $self, CharSequence label, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)Creates an Option Quick Reply without description final <T extends Bus<T>> Optionoption(T $self, CharSequence label, CharSequence description, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Map<String, String> parameters)Creates an Option Quick Reply final <T extends Bus<T>> OptionWithoutDescriptionoption(T $self, CharSequence label, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Map<String, String> parameters)Creates an Option Quick Reply without description final OptionWithoutDescriptionnlpOption(I18nTranslator $self, CharSequence label)Creates a NLP Option Quick Reply without description final OptionnlpOption(I18nTranslator $self, CharSequence label, CharSequence description)Creates a NLP Option Quick Reply without description final BotBuswithTwitter(BotBus $self, Function0<TwitterConnectorMessage> messageProvider)Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is not public. final BotBuswithTwitter(BotBus $self, String connectorId, Function0<TwitterConnectorMessage> messageProvider)Adds a Twitter ConnectorMessage if the current connector is Twitter and the current connector is connectorId. final BotBuswithPublicTwitter(BotBus $self, Function0<TwitterPublicConnectorMessage> messageProvider)Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is public. final UnitendIfPublicTwitter(BotBus $self)End the conversation only if the visibility is public final Tweettweet(BotBus $self, CharSequence message)Create a tweet final TweettweetWithInviteForDM(BotBus $self, CharSequence message, String welcomeMessageID, String defaultMessage)Create a tweet with a link for DM to the account listened -
-
Method Detail
-
getTwitterConnectorType
final ConnectorType getTwitterConnectorType()
The Twitter connector type.
-
getMAX_OPTION_LABEL
final Integer getMAX_OPTION_LABEL()
-
getMAX_OPTION_DESCRIPTION
final Integer getMAX_OPTION_DESCRIPTION()
-
getMAX_METADATA
final Integer getMAX_METADATA()
-
directMessage
final <T extends Bus<T>> OutcomingEvent directMessage(T $self, CharSequence message)
Creates a direct message with only text
-
directMessageWithButtons
final <T extends Bus<T>> OutcomingEvent directMessageWithButtons(T $self, CharSequence message, List<CTA> ctas)
Creates a direct message with Buttons
-
directMessageWithButtons
final <T extends Bus<T>> OutcomingEvent directMessageWithButtons(T $self, CharSequence message, CTA ctas)
Creates a direct message with Buttons
-
directMessageWithOptions
final <T extends Bus<T>> OutcomingEvent directMessageWithOptions(T $self, CharSequence message, Option options)
Creates a direct message with quick replies
-
directMessageWithOptions
final <T extends Bus<T>> OutcomingEvent directMessageWithOptions(T $self, CharSequence message, OptionWithoutDescription options)
Creates a direct message with quick replies
-
directMessageWithAttachment
final <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(T $self, CharSequence message, MediaCategory mediaCategory, String contentType, ByteArray bytes, Option options)
Creates a direct message with an attachment
-
directMessageWithAttachment
final <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(T $self, CharSequence message, MediaCategory mediaCategory, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with an attachment
-
directMessageWithGIF
final <T extends Bus<T>> OutcomingEvent directMessageWithGIF(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)
Creates a direct message with a gif (Max 15MB)
-
directMessageWithGIF
final <T extends Bus<T>> OutcomingEvent directMessageWithGIF(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with a gif (Max 15MB)
-
directMessageWithGIF
final <T extends Bus<T>> OutcomingEvent directMessageWithGIF(T $self, String contentType, ByteArray bytes, Option options)
Creates a direct message with a gif (Max 15MB)
-
directMessageWithGIF
final <T extends Bus<T>> OutcomingEvent directMessageWithGIF(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with a gif (Max 15MB)
-
directMessageWithImage
final <T extends Bus<T>> OutcomingEvent directMessageWithImage(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)
Creates a direct message with an image (Max 5MB)
-
directMessageWithImage
final <T extends Bus<T>> OutcomingEvent directMessageWithImage(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with an image (Max 5MB)
-
directMessageWithImage
final <T extends Bus<T>> OutcomingEvent directMessageWithImage(T $self, String contentType, ByteArray bytes, Option options)
Creates a direct message with an image (Max 5MB)
-
directMessageWithImage
final <T extends Bus<T>> OutcomingEvent directMessageWithImage(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with an image (Max 5MB)
-
directMessageWithVideo
final <T extends Bus<T>> OutcomingEvent directMessageWithVideo(T $self, CharSequence message, String contentType, ByteArray bytes, Option options)
Creates a direct message with a video (Max 15MB)
-
directMessageWithVideo
final <T extends Bus<T>> OutcomingEvent directMessageWithVideo(T $self, CharSequence message, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with a video (Max 15MB)
-
directMessageWithVideo
final <T extends Bus<T>> OutcomingEvent directMessageWithVideo(T $self, String contentType, ByteArray bytes, Option options)
Creates a direct message with a video (Max 15MB)
-
directMessageWithVideo
final <T extends Bus<T>> OutcomingEvent directMessageWithVideo(T $self, String contentType, ByteArray bytes, OptionWithoutDescription options)
Creates a direct message with a video (Max 15MB)
-
webUrl
final <T extends Bus<T>> WebUrl webUrl(T $self, CharSequence label, CharSequence url)
Creates a url button
-
option
final <T extends Bus<T>> Option option(T $self, CharSequence label, CharSequence description, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)
Creates an Option Quick Reply
-
option
final <T extends Bus<T>> OptionWithoutDescription option(T $self, CharSequence label, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)
Creates an Option Quick Reply without description
-
option
final <T extends Bus<T>> Option option(T $self, CharSequence label, CharSequence description, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Map<String, String> parameters)
Creates an Option Quick Reply
-
option
final <T extends Bus<T>> OptionWithoutDescription option(T $self, CharSequence label, IntentAware targetIntent, StoryStep<out StoryHandlerDefinition> step, Map<String, String> parameters)
Creates an Option Quick Reply without description
-
nlpOption
final OptionWithoutDescription nlpOption(I18nTranslator $self, CharSequence label)
Creates a NLP Option Quick Reply without description
-
nlpOption
final Option nlpOption(I18nTranslator $self, CharSequence label, CharSequence description)
Creates a NLP Option Quick Reply without description
-
withTwitter
final BotBus withTwitter(BotBus $self, Function0<TwitterConnectorMessage> messageProvider)
Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is not public. You need to call BotBus.send or BotBus.end later to send this message.
-
withTwitter
final BotBus withTwitter(BotBus $self, String connectorId, Function0<TwitterConnectorMessage> messageProvider)
Adds a Twitter ConnectorMessage if the current connector is Twitter and the current connector is connectorId. You need to call <T : Bus<T>> T.send or <T : Bus<T>> T.end later to send this message.
-
withPublicTwitter
final BotBus withPublicTwitter(BotBus $self, Function0<TwitterPublicConnectorMessage> messageProvider)
Adds a Twitter ConnectorMessage if the current connector is Twitter and the interface is public. You need to call BotBus.send or BotBus.end later to send this message.
-
endIfPublicTwitter
final Unit endIfPublicTwitter(BotBus $self)
End the conversation only if the visibility is public
-
tweet
final Tweet tweet(BotBus $self, CharSequence message)
Create a tweet
-
tweetWithInviteForDM
final Tweet tweetWithInviteForDM(BotBus $self, CharSequence message, String welcomeMessageID, String defaultMessage)
Create a tweet with a link for DM to the account listened
-
-
-
-