|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TwitterOperations
Interface specifying a basic set of operations for interacting with Twitter. Implemented by TwitterTemplate. Not often used directly, but a useful option to enhance testability, as it can easily be mocked or stubbed.
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getFriends(java.lang.String screenName)
Retrieves a list of users that the given user follows. |
java.lang.String |
getProfileId()
Retrieves the user's Twitter screen name. |
void |
retweet(long tweetId)
Posts a retweet of an existing tweet. |
SearchResults |
search(java.lang.String query)
Searches Twitter, returning the first 50 matching Tweet s |
SearchResults |
search(java.lang.String query,
int page,
int pageSize)
Searches Twitter, returning a specific page out of the complete set of results. |
SearchResults |
search(java.lang.String query,
int page,
int resultsPerPage,
int sinceId,
int maxId)
Searches Twitter, returning a specific page out of the complete set of results. |
void |
updateStatus(java.lang.String status)
Updates the user's status. |
Method Detail |
---|
java.lang.String getProfileId()
java.util.List<java.lang.String> getFriends(java.lang.String screenName)
screenName
- The user's Twitter screen name
void updateStatus(java.lang.String status)
status
- The status message
SocialException
- if an error response is received from Twittervoid retweet(long tweetId)
tweetId
- The ID of the tweet to be retweeted
SocialException
- if an error response is received from TwitterSearchResults search(java.lang.String query)
Tweet
s
query
- The search query string
SearchResults
containing the search results metadata
and a list of matching Tweet
sSearchResults, {@link Tweet}
SearchResults search(java.lang.String query, int page, int pageSize)
query
- The search query stringpage
- The page to returnpageSize
- The number of Tweet
s per page
SearchResults
containing the search results metadata
and a list of matching Tweet
sSearchResults, {@link Tweet}
SearchResults search(java.lang.String query, int page, int resultsPerPage, int sinceId, int maxId)
query
- The search query stringpage
- The page to returnpageSize
- The number of Tweet
s per pagesinceId
- The minimum Tweet
ID to return in the resultsmaxId
- The maximum Tweet
ID to return in the results
SearchResults
containing the search results metadata
and a list of matching Tweet
sSearchResults, {@link Tweet}
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |