org.springframework.integration.twitter.core
Interface TwitterOperations

All Known Implementing Classes:
Twitter4jTemplate

public interface TwitterOperations

Since:
2.0

Method Summary
 java.util.List<Tweet> getDirectMessages()
           
 java.util.List<Tweet> getDirectMessages(long sinceId)
           
 java.util.List<java.lang.String> getFriends(java.lang.String screenName)
          Retrieves a list of users that the given user follows.
 java.util.List<Tweet> getMentions()
           
 java.util.List<Tweet> getMentions(long sinceId)
           
 java.lang.String getProfileId()
          Retrieves the user's Twitter screen name.
 java.util.List<Tweet> getTimeline()
           
 java.util.List<Tweet> getTimeline(long sinceId)
           
 twitter4j.Twitter getUnderlyingTwitter()
          Temporary method.
 void retweet(long tweetId)
          Posts a retweet of an existing tweet.
 SearchResults search(java.lang.String query)
          Searches Twitter, returning the first page of Tweets
 SearchResults search(java.lang.String query, int page, long sinceId)
          Searches Twitter, returning a specific page out of the complete set of results.
 void sendDirectMessage(int userId, java.lang.String text)
           
 void sendDirectMessage(java.lang.String userName, java.lang.String text)
           
 void updateStatus(java.lang.String status)
          Updates the user's status.
 

Method Detail

getProfileId

java.lang.String getProfileId()
Retrieves the user's Twitter screen name.

Returns:
the user's screen name at Twitter

getFriends

java.util.List<java.lang.String> getFriends(java.lang.String screenName)
Retrieves a list of users that the given user follows.

Parameters:
screenName - The user's Twitter screen name
Returns:
a list of user screen names

updateStatus

void updateStatus(java.lang.String status)
Updates the user's status.

Parameters:
status - The status message

retweet

void retweet(long tweetId)
Posts a retweet of an existing tweet.

Parameters:
tweetId - The ID of the tweet to be retweeted
Throws:
SocialException - if an error response is received from Twitter

search

SearchResults search(java.lang.String query)
Searches Twitter, returning the first page of Tweets

Parameters:
query - The search query string
Returns:
a SearchResults containing Tweets

search

SearchResults search(java.lang.String query,
                     int page,
                     long sinceId)
Searches Twitter, returning a specific page out of the complete set of results.

Parameters:
query - The search query string
page - The page to return
sinceId - The minimum Tweet ID to return in the results
Returns:
a SearchResults containing Tweets

getDirectMessages

java.util.List<Tweet> getDirectMessages()

getDirectMessages

java.util.List<Tweet> getDirectMessages(long sinceId)

getMentions

java.util.List<Tweet> getMentions()

getMentions

java.util.List<Tweet> getMentions(long sinceId)

getTimeline

java.util.List<Tweet> getTimeline()

getTimeline

java.util.List<Tweet> getTimeline(long sinceId)

sendDirectMessage

void sendDirectMessage(java.lang.String userName,
                       java.lang.String text)

sendDirectMessage

void sendDirectMessage(int userId,
                       java.lang.String text)

getUnderlyingTwitter

twitter4j.Twitter getUnderlyingTwitter()
Temporary method. Should be removed one migrated to Spring Social