public class TwitterBuildersKt
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_METADATA |
static int |
MAX_OPTION_DESCRIPTION |
static int |
MAX_OPTION_LABEL |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Bus<T>> |
directMessage(T $receiver,
java.lang.CharSequence message)
Creates a direct message with only text
|
static <T extends Bus<T>> |
directMessageWithAttachment(T $receiver,
java.lang.CharSequence message,
MediaCategory mediaCategory,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an attachment
|
static <T extends Bus<T>> |
directMessageWithAttachment(T $receiver,
java.lang.CharSequence message,
MediaCategory mediaCategory,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an attachment
|
static <T extends Bus<T>> |
directMessageWithButtons(T $receiver,
java.lang.CharSequence message,
java.util.List<? extends ai.tock.bot.connector.twitter.model.CTA> ctas)
Creates a direct message with Buttons
|
static <T extends Bus<T>> |
directMessageWithButtons(T $receiver,
java.lang.CharSequence message,
ai.tock.bot.connector.twitter.model.CTA... ctas)
Creates a direct message with Buttons
|
static <T extends Bus<T>> |
directMessageWithGIF(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithGIF(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithGIF(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithGIF(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithImage(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
|
static <T extends Bus<T>> |
directMessageWithImage(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
|
static <T extends Bus<T>> |
directMessageWithImage(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
|
static <T extends Bus<T>> |
directMessageWithImage(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
|
static <T extends Bus<T>> |
directMessageWithOptions(T $receiver,
java.lang.CharSequence message,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with quick replies
|
static <T extends Bus<T>> |
directMessageWithOptions(T $receiver,
java.lang.CharSequence message,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with quick replies
|
static <T extends Bus<T>> |
directMessageWithVideo(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithVideo(T $receiver,
java.lang.CharSequence message,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithVideo(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
|
static <T extends Bus<T>> |
directMessageWithVideo(T $receiver,
java.lang.String contentType,
kotlin.Array[] bytes,
ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
|
static void |
endIfPublicTwitter(ai.tock.bot.engine.BotBus $receiver)
End the conversation only if the visibility is public
|
static ai.tock.bot.connector.ConnectorType |
getTwitterConnectorType()
The Twitter connector type.
|
static OptionWithoutDescription |
nlpOption(ai.tock.bot.engine.I18nTranslator $receiver,
java.lang.CharSequence label)
Creates a NLP Option Quick Reply without description
|
static Option |
nlpOption(ai.tock.bot.engine.I18nTranslator $receiver,
java.lang.CharSequence label,
java.lang.CharSequence description)
Creates a NLP Option Quick Reply without description
|
static <T extends Bus<T>> |
option(T $receiver,
java.lang.CharSequence label,
java.lang.CharSequence description,
ai.tock.bot.definition.IntentAware targetIntent,
ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step,
kotlin.Pair... parameters)
Creates an Option Quick Reply
|
static <T extends Bus<T>> |
option(T $receiver,
java.lang.CharSequence label,
ai.tock.bot.definition.IntentAware targetIntent,
ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step,
kotlin.Pair... parameters)
Creates an Option Quick Reply without description
|
static <T extends Bus<T>> |
option(T $receiver,
java.lang.CharSequence label,
java.lang.CharSequence description,
ai.tock.bot.definition.IntentAware targetIntent,
ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply
|
static <T extends Bus<T>> |
option(T $receiver,
java.lang.CharSequence label,
ai.tock.bot.definition.IntentAware targetIntent,
ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply without description
|
static Tweet |
tweet(ai.tock.bot.engine.BotBus $receiver,
java.lang.CharSequence message)
Create a tweet
|
static Tweet |
tweetWithInviteForDM(ai.tock.bot.engine.BotBus $receiver,
java.lang.CharSequence message,
java.lang.String welcomeMessageID,
java.lang.String defaultMessage)
Create a tweet with a link for DM to the account listened
|
static <T extends Bus<T>> |
webUrl(T $receiver,
java.lang.CharSequence label,
java.lang.CharSequence url)
Creates a url button
|
static ai.tock.bot.engine.BotBus |
withPublicTwitter(ai.tock.bot.engine.BotBus $receiver,
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.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.
|
static ai.tock.bot.engine.BotBus |
withTwitter(ai.tock.bot.engine.BotBus $receiver,
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.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.
|
public static int MAX_OPTION_LABEL
public static int MAX_OPTION_DESCRIPTION
public static int MAX_METADATA
@NotNull public static ai.tock.bot.connector.ConnectorType getTwitterConnectorType()
The Twitter connector type.
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessage(@NotNull T $receiver, @NotNull java.lang.CharSequence message)
Creates a direct message with only text
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithButtons(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.util.List<? extends ai.tock.bot.connector.twitter.model.CTA> ctas)
Creates a direct message with Buttons
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithButtons(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.CTA... ctas)
Creates a direct message with Buttons
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithOptions(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with quick replies
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithOptions(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with quick replies
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull MediaCategory mediaCategory, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an attachment
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithAttachment(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull MediaCategory mediaCategory, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an attachment
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithGIF(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a gif (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithImage(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with an image (Max 5MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $receiver, @NotNull java.lang.CharSequence message, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.Option... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> OutcomingEvent directMessageWithVideo(@NotNull T $receiver, @NotNull java.lang.String contentType, @NotNull kotlin.Array[] bytes, @NotNull ai.tock.bot.connector.twitter.model.OptionWithoutDescription... options)
Creates a direct message with a video (Max 15MB)
@NotNull public static <T extends Bus<T>> WebUrl webUrl(@NotNull T $receiver, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence url)
Creates a url button
@NotNull public static <T extends Bus<T>> Option option(@NotNull T $receiver, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull kotlin.Pair... parameters)
Creates an Option Quick Reply
@NotNull public static <T extends Bus<T>> OptionWithoutDescription option(@NotNull T $receiver, @NotNull java.lang.CharSequence label, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull kotlin.Pair... parameters)
Creates an Option Quick Reply without description
@NotNull public static <T extends Bus<T>> Option option(@NotNull T $receiver, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply
@NotNull public static <T extends Bus<T>> OptionWithoutDescription option(@NotNull T $receiver, @NotNull java.lang.CharSequence label, @NotNull ai.tock.bot.definition.IntentAware targetIntent, @Nullable ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition> step, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Creates an Option Quick Reply without description
@NotNull public static OptionWithoutDescription nlpOption(@NotNull ai.tock.bot.engine.I18nTranslator $receiver, @NotNull java.lang.CharSequence label)
Creates a NLP Option Quick Reply without description
@NotNull public static Option nlpOption(@NotNull ai.tock.bot.engine.I18nTranslator $receiver, @NotNull java.lang.CharSequence label, @NotNull java.lang.CharSequence description)
Creates a NLP Option Quick Reply without description
@NotNull
public static ai.tock.bot.engine.BotBus withTwitter(@NotNull
ai.tock.bot.engine.BotBus $receiver,
@NotNull
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.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.
@NotNull
public static ai.tock.bot.engine.BotBus withPublicTwitter(@NotNull
ai.tock.bot.engine.BotBus $receiver,
@NotNull
kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.twitter.model.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.
public static void endIfPublicTwitter(@NotNull
ai.tock.bot.engine.BotBus $receiver)
End the conversation only if the visibility is public
@NotNull public static Tweet tweet(@NotNull ai.tock.bot.engine.BotBus $receiver, @NotNull java.lang.CharSequence message)
Create a tweet
@NotNull public static Tweet tweetWithInviteForDM(@NotNull ai.tock.bot.engine.BotBus $receiver, @NotNull java.lang.CharSequence message, @Nullable java.lang.String welcomeMessageID, @Nullable java.lang.String defaultMessage)
Create a tweet with a link for DM to the account listened