public class Slack extends BasicSense
Modifier and Type | Field and Description |
---|---|
static int |
MAX_WAIT |
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Modifier and Type | Method and Description |
---|---|
void |
awake()
Start sensing.
|
void |
checkAutoPost()
Auto post.
|
void |
checkProfile()
Auto post to channel.
|
void |
checkRSS()
Check RSS feed.
|
java.lang.String |
getAppToken() |
boolean |
getAutoPost() |
java.lang.String |
getAutoPostChannel() |
int |
getAutoPostHours() |
java.util.List<Vertex> |
getAutoPosts(Network network) |
java.lang.String |
getAutoPostUsername() |
java.lang.String |
getBotUsername() |
java.lang.String |
getIncomingWebhook() |
int |
getMaxFeed() |
int |
getMessagesProcessed() |
java.util.List<java.lang.String> |
getPostRSS() |
int |
getPosts() |
java.lang.String |
getRssChannel() |
java.util.List<java.lang.String> |
getRssKeywords() |
java.lang.String |
getRssUsername() |
java.lang.String |
getToken() |
void |
initProperties()
Load settings.
|
void |
inputSentence(java.lang.String text,
java.lang.String userName,
java.lang.String targetUsername,
java.lang.String id,
Network network)
Process the text sentence.
|
void |
output(Vertex output)
Output the Slack message.
|
void |
post(java.lang.String text) |
void |
post(java.lang.String text,
java.lang.String username,
java.lang.String channel) |
java.lang.String |
processMessage(java.lang.String from,
java.lang.String id,
java.lang.String message,
java.lang.String token)
Process to the message and reply synchronously.
|
void |
processSlackEvent(java.lang.String json) |
void |
saveProperties(java.util.List<java.lang.String> autoPosts) |
void |
setAppToken(java.lang.String appToken) |
void |
setAutoPost(boolean autoPost) |
void |
setAutoPostChannel(java.lang.String rssChannel) |
void |
setAutoPostHours(int autoPostHours) |
void |
setAutoPostUsername(java.lang.String autoPostUsername) |
void |
setBotUsername(java.lang.String botUsername) |
void |
setIncomingWebhook(java.lang.String incomingWebhook) |
void |
setMaxFeed(int maxFeed) |
void |
setMessagesProcessed(int messagesProcessed) |
void |
setPostRSS(java.util.List<java.lang.String> postRSS) |
void |
setPosts(int posts) |
void |
setRssChannel(java.lang.String rssChannel) |
void |
setRssKeywords(java.util.List<java.lang.String> rssKeywords) |
void |
setRssUsername(java.lang.String rssUsername) |
void |
setToken(java.lang.String token) |
addListener, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, input, isEnabled, log, log, log, migrateProperties, notifyExceptionListeners, notifyResponseListener, pool, printInput, removeListener, saveProperties, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, shutdown, toString
public void awake()
awake
in interface Sense
awake
in class BasicSense
public java.lang.String getToken()
public void setToken(java.lang.String token)
public java.lang.String getBotUsername()
public void setBotUsername(java.lang.String botUsername)
public java.lang.String getRssUsername()
public void setRssUsername(java.lang.String rssUsername)
public java.lang.String getRssChannel()
public void setRssChannel(java.lang.String rssChannel)
public java.lang.String getAutoPostUsername()
public void setAutoPostUsername(java.lang.String autoPostUsername)
public java.lang.String getAutoPostChannel()
public void setAutoPostChannel(java.lang.String rssChannel)
public java.lang.String getIncomingWebhook()
public void setIncomingWebhook(java.lang.String incomingWebhook)
public int getMaxFeed()
public void setMaxFeed(int maxFeed)
public java.util.List<java.lang.String> getRssKeywords()
public void setRssKeywords(java.util.List<java.lang.String> rssKeywords)
public java.util.List<java.lang.String> getPostRSS()
public void setPostRSS(java.util.List<java.lang.String> postRSS)
public boolean getAutoPost()
public void setAutoPost(boolean autoPost)
public int getAutoPostHours()
public void setAutoPostHours(int autoPostHours)
public java.lang.String getAppToken()
public void setAppToken(java.lang.String appToken)
public void initProperties()
public void saveProperties(java.util.List<java.lang.String> autoPosts)
public java.lang.String processMessage(java.lang.String from, java.lang.String id, java.lang.String message, java.lang.String token)
public void inputSentence(java.lang.String text, java.lang.String userName, java.lang.String targetUsername, java.lang.String id, Network network)
public void output(Vertex output)
output
in interface Sense
output
in class BasicSense
public void checkProfile()
public void checkRSS()
public void checkAutoPost()
public void post(java.lang.String text, java.lang.String username, java.lang.String channel)
public void post(java.lang.String text)
public int getPosts()
public void setPosts(int posts)
public int getMessagesProcessed()
public void setMessagesProcessed(int messagesProcessed)
public void processSlackEvent(java.lang.String json)