public class Twitter extends BasicSense
Modifier and Type | Field and Description |
---|---|
static int |
MAX_LOOKUP |
static java.lang.String |
oauthKey |
static java.lang.String |
oauthSecret |
static int |
TREND_CHECK |
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Modifier and Type | Method and Description |
---|---|
void |
addFriend(java.lang.String friend)
Add the follower.
|
twitter4j.auth.RequestToken |
authorizeAccount()
Authorise a new account to be accessible by Bot.
|
void |
authorizeComplete()
Authorise a new account to be accessible by Bot.
|
void |
authorizeComplete(java.lang.String pin)
Authorise a new account to be accessible by Bot.
|
void |
awake()
Start sensing.
|
void |
checkAutoFollowSearch(int friendCount)
Check search keywords.
|
void |
checkAutoTweet()
Auto tweet.
|
void |
checkFollowers()
Check followers.
|
boolean |
checkFriendship(long friendId,
boolean welcomeOnly) |
void |
checkLearning()
Learn from the profiles posts.
|
void |
checkMentions()
Check messages to this user.
|
void |
checkProfile()
Check profile for messages.
|
void |
checkRSS()
Check RSS feed.
|
void |
checkSearch()
Check search keywords.
|
void |
checkStatus()
Check status.
|
void |
checkTrends()
Check trends.
|
void |
connect() |
java.lang.String |
format(java.lang.String text) |
boolean |
getAutoFollow() |
boolean |
getAutoFollowFriendsFollowers() |
boolean |
getAutoFollowFriendsFriends() |
java.util.List<java.lang.String> |
getAutoFollowKeywords() |
java.util.List<java.lang.String> |
getAutoFollowSearch() |
boolean |
getAutoTweet() |
int |
getAutoTweetHours() |
java.util.List<Vertex> |
getAutoTweets(Network network) |
boolean |
getCheckTrends() |
twitter4j.Twitter |
getConnection() |
java.util.List<java.lang.String> |
getFollowers()
Return the list of followers names.
|
int |
getFollowersCount()
Return the total number of followers.
|
boolean |
getFollowMessages() |
java.util.List<java.lang.String> |
getFriends()
Return the list of friends names.
|
int |
getFriendsCount()
Return the total number of friends.
|
boolean |
getIgnoreReplies() |
boolean |
getLearn() |
boolean |
getLearnFromSelf() |
boolean |
getListenStatus() |
int |
getMaxFeed() |
int |
getMaxFriends() |
int |
getMaxSearch() |
int |
getMaxStatus() |
java.lang.String |
getOauthKey() |
java.lang.String |
getOauthSecret() |
boolean |
getProcessStatus() |
boolean |
getReplyToMentions() |
boolean |
getReplyToMessages() |
java.util.List<java.lang.String> |
getRetweet() |
int |
getRetweets() |
java.util.List<java.lang.String> |
getRssKeywords() |
java.util.List<java.lang.String> |
getStatusKeywords() |
java.util.List<java.lang.String> |
getTimeline()
Return the time-line.
|
java.lang.String |
getToken() |
java.lang.String |
getTokenSecret() |
boolean |
getTweetChats() |
java.util.List<java.lang.String> |
getTweetRSS() |
int |
getTweets() |
java.util.List<java.lang.String> |
getTweetSearch() |
int |
getTweetsProcessed() |
java.lang.String |
getUserName() |
java.lang.String |
getWelcomeMessage() |
void |
initProperties()
Load settings.
|
void |
input(java.lang.Object input,
Network network)
Process the email message.
|
void |
inputSentence(java.lang.String text,
java.lang.String userName,
java.lang.String targetUserName,
twitter4j.Status status,
Network network)
Process the text sentence.
|
void |
learnSearch(java.lang.String tweetSearch,
int maxSearch,
boolean processTweets,
boolean processReplies)
Learn responses from the tweet search.
|
void |
learnTweet(twitter4j.Status tweet,
boolean processTweets,
boolean processReplies,
Network memory) |
void |
log(twitter4j.TwitterException exception) |
void |
message(Vertex source,
Vertex replyUser,
Vertex text)
Self API
Send a message to the user.
|
void |
migrateProperties()
Migrate to new properties system.
|
void |
output(Vertex output)
Output the status or direct message reply.
|
void |
outputTweet(java.lang.String tweet)
Output the tweet if twitter is connected.
|
void |
removeFriend(java.lang.String friend)
Add the follower.
|
void |
retweet(twitter4j.Status tweet)
Retweet the tweet.
|
void |
saveProperties(java.util.List<java.lang.String> autoTweets) |
void |
sendMessage(java.lang.String text,
java.lang.String replyUser)
Send a message to the user.
|
void |
sendMessage(Vertex source,
Vertex text,
Vertex replyUser)
Self API
Send a message to the user.
|
void |
setAutoFollow(boolean autoFollow) |
void |
setAutoFollowFriendsFollowers(boolean autoFollowFriendsFollowers) |
void |
setAutoFollowFriendsFriends(boolean autoFollowFriendsFriends) |
void |
setAutoFollowKeywords(java.util.List<java.lang.String> autoFollowKeywords) |
void |
setAutoFollowSearch(java.util.List<java.lang.String> autoFollowSearch) |
void |
setAutoTweet(boolean autoTweet) |
void |
setAutoTweetHours(int autoTweetHours) |
void |
setCheckTrends(boolean checkTrends) |
void |
setConnection(twitter4j.Twitter connection) |
void |
setFollowMessages(boolean followMessages) |
void |
setIgnoreReplies(boolean ignoreReplies) |
void |
setLearn(boolean learn) |
void |
setLearnFromSelf(boolean learnFromSelf) |
void |
setListenStatus(boolean listenStatus) |
void |
setMaxFeed(int maxFeed) |
void |
setMaxFriends(int maxFriends) |
void |
setMaxSearch(int maxSearch) |
void |
setMaxStatus(int maxStatus) |
void |
setOauthKey(java.lang.String oauthKey) |
void |
setOauthSecret(java.lang.String oauthSecret) |
void |
setProcessStatus(boolean processStatus) |
void |
setReplyToMentions(boolean replyToMentions) |
void |
setReplyToMessages(boolean replyToMessages) |
void |
setRetweet(java.util.List<java.lang.String> retweet) |
void |
setRetweets(int retweets) |
void |
setRssKeywords(java.util.List<java.lang.String> rssKeywords) |
void |
setStatusKeywords(java.util.List<java.lang.String> statusKeywords) |
void |
setToken(java.lang.String token) |
void |
setTokenSecret(java.lang.String tokenSecret) |
void |
setTweetChats(boolean tweetChats) |
void |
setTweetRSS(java.util.List<java.lang.String> tweetRSS) |
void |
setTweets(int tweets) |
void |
setTweetSearch(java.util.List<java.lang.String> tweetSearch) |
void |
setTweetsProcessed(int tweetsProcessed) |
void |
setUserName(java.lang.String userName) |
void |
setWelcomeMessage(java.lang.String welcomeMessage) |
Vertex |
trend(Network network) |
void |
tweet(java.lang.String html,
java.lang.Long reply)
Tweet.
|
void |
tweet(Vertex source,
Vertex sentence) |
addListener, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, isEnabled, log, log, log, notifyExceptionListeners, notifyResponseListener, pool, printInput, removeListener, saveProperties, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, shutdown, toString
public static int TREND_CHECK
public static int MAX_LOOKUP
public static java.lang.String oauthKey
public static java.lang.String oauthSecret
public boolean getListenStatus()
public void setListenStatus(boolean listenStatus)
public int getTweets()
public void setTweets(int tweets)
public int getTweetsProcessed()
public void setTweetsProcessed(int tweetsProcessed)
public int getRetweets()
public void setRetweets(int retweets)
public java.lang.String getWelcomeMessage()
public void setWelcomeMessage(java.lang.String welcomeMessage)
public java.util.List<java.lang.String> getRssKeywords()
public void setRssKeywords(java.util.List<java.lang.String> rssKeywords)
public int getMaxSearch()
public void setMaxSearch(int maxSearch)
public java.util.List<java.lang.String> getAutoFollowSearch()
public void setAutoFollowSearch(java.util.List<java.lang.String> autoFollowSearch)
public boolean getAutoFollowFriendsFriends()
public void setAutoFollowFriendsFriends(boolean autoFollowFriendsFriends)
public boolean getAutoFollowFriendsFollowers()
public void setAutoFollowFriendsFollowers(boolean autoFollowFriendsFollowers)
public int getMaxFeed()
public void setMaxFeed(int maxFeed)
public boolean getAutoTweet()
public void setAutoTweet(boolean autoTweet)
public int getAutoTweetHours()
public void setAutoTweetHours(int autoTweetHours)
public boolean getIgnoreReplies()
public void setIgnoreReplies(boolean ignoreReplies)
public java.util.List<java.lang.String> getStatusKeywords()
public void setStatusKeywords(java.util.List<java.lang.String> statusKeywords)
public java.util.List<java.lang.String> getAutoFollowKeywords()
public void setAutoFollowKeywords(java.util.List<java.lang.String> autoFollowKeywords)
public twitter4j.auth.RequestToken authorizeAccount() throws twitter4j.TwitterException
twitter4j.TwitterException
public void authorizeComplete() throws twitter4j.TwitterException
twitter4j.TwitterException
public void authorizeComplete(java.lang.String pin) throws twitter4j.TwitterException
twitter4j.TwitterException
public void awake()
awake
in interface Sense
awake
in class BasicSense
public void migrateProperties()
migrateProperties
in interface Sense
migrateProperties
in class BasicSense
public void initProperties()
public void saveProperties(java.util.List<java.lang.String> autoTweets)
public void connect() throws twitter4j.TwitterException
twitter4j.TwitterException
public void checkProfile()
public void addFriend(java.lang.String friend)
public void removeFriend(java.lang.String friend)
public void checkStatus()
public void learnSearch(java.lang.String tweetSearch, int maxSearch, boolean processTweets, boolean processReplies)
public void checkLearning()
public void learnTweet(twitter4j.Status tweet, boolean processTweets, boolean processReplies, Network memory) throws java.lang.Exception
java.lang.Exception
public void checkMentions()
public void checkSearch()
public void checkAutoFollowSearch(int friendCount)
public void checkRSS()
public void checkAutoTweet()
public java.util.List<java.lang.String> getFollowers()
public java.util.List<java.lang.String> getTimeline()
public int getFriendsCount()
public int getFollowersCount()
public java.util.List<java.lang.String> getFriends()
public void checkFollowers()
public boolean checkFriendship(long friendId, boolean welcomeOnly) throws twitter4j.TwitterException
twitter4j.TwitterException
public void log(twitter4j.TwitterException exception)
public void checkTrends()
public void tweet(java.lang.String html, java.lang.Long reply)
public java.lang.String format(java.lang.String text)
public void sendMessage(java.lang.String text, java.lang.String replyUser)
public void retweet(twitter4j.Status tweet)
public void outputTweet(java.lang.String tweet)
public void input(java.lang.Object input, Network network)
input
in interface Sense
input
in class BasicSense
public void output(Vertex output)
output
in interface Sense
output
in class BasicSense
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
public void inputSentence(java.lang.String text, java.lang.String userName, java.lang.String targetUserName, twitter4j.Status status, Network network)
public java.lang.String getOauthKey()
public void setOauthKey(java.lang.String oauthKey)
public java.lang.String getOauthSecret()
public void setOauthSecret(java.lang.String oauthSecret)
public java.lang.String getTokenSecret()
public void setTokenSecret(java.lang.String tokenSecret)
public java.lang.String getToken()
public void setToken(java.lang.String token)
public twitter4j.Twitter getConnection() throws twitter4j.TwitterException
twitter4j.TwitterException
public void setConnection(twitter4j.Twitter connection)
public boolean getAutoFollow()
public void setAutoFollow(boolean autoFollow)
public int getMaxFriends()
public void setMaxFriends(int maxFriends)
public boolean getLearn()
public void setLearn(boolean learn)
public boolean getLearnFromSelf()
public void setLearnFromSelf(boolean learnFromSelf)
public boolean getProcessStatus()
public void setProcessStatus(boolean processStatus)
public boolean getTweetChats()
public boolean getReplyToMentions()
public boolean getReplyToMessages()
public void setTweetChats(boolean tweetChats)
public void setReplyToMentions(boolean replyToMentions)
public void setReplyToMessages(boolean replyToMessages)
public java.util.List<java.lang.String> getRetweet()
public void setRetweet(java.util.List<java.lang.String> retweet)
public java.util.List<java.lang.String> getTweetRSS()
public void setTweetRSS(java.util.List<java.lang.String> tweetRSS)
public boolean getCheckTrends()
public void setCheckTrends(boolean checkTrends)
public java.util.List<java.lang.String> getTweetSearch()
public void setTweetSearch(java.util.List<java.lang.String> tweetSearch)
public boolean getFollowMessages()
public void setFollowMessages(boolean followMessages)
public int getMaxStatus()
public void setMaxStatus(int maxStatus)
public void message(Vertex source, Vertex replyUser, Vertex text)
public void sendMessage(Vertex source, Vertex text, Vertex replyUser)