|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.twitter.core.Twitter4jTemplate
public class Twitter4jTemplate
Implementation of TwitterOperations
that delegates to Twitter4J.
Constructor Summary | |
---|---|
Twitter4jTemplate()
Used to construct this template to perform Twitter API calls that do not require authorization. |
|
Twitter4jTemplate(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String accessToken,
java.lang.String accessTokenSecret)
Used to construct this template with OAuth authentication/authorization to perform Twitter API calls that do require authorization (e.g., send/receive DirectMessage) |
Method Summary | |
---|---|
java.util.List<Tweet> |
getDirectMessages()
|
java.util.List<Tweet> |
getDirectMessages(long sinceId)
|
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. |
SearchResults |
search(java.lang.String query)
Searches Twitter, returning the first page of Tweet s |
SearchResults |
search(java.lang.String query,
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 statusTweet)
Updates the user's status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Twitter4jTemplate()
public Twitter4jTemplate(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String accessTokenSecret)
consumerKey
- consumerSecret
- accessToken
- accessTokenSecret
- Method Detail |
---|
public java.lang.String getProfileId()
TwitterOperations
getProfileId
in interface TwitterOperations
public java.util.List<Tweet> getDirectMessages()
getDirectMessages
in interface TwitterOperations
public java.util.List<Tweet> getDirectMessages(long sinceId)
getDirectMessages
in interface TwitterOperations
public java.util.List<Tweet> getMentions()
getMentions
in interface TwitterOperations
public java.util.List<Tweet> getMentions(long sinceId)
getMentions
in interface TwitterOperations
public java.util.List<Tweet> getTimeline()
getTimeline
in interface TwitterOperations
public java.util.List<Tweet> getTimeline(long sinceId)
getTimeline
in interface TwitterOperations
public void sendDirectMessage(java.lang.String userName, java.lang.String text)
sendDirectMessage
in interface TwitterOperations
public void sendDirectMessage(int userId, java.lang.String text)
sendDirectMessage
in interface TwitterOperations
public void updateStatus(java.lang.String statusTweet)
TwitterOperations
updateStatus
in interface TwitterOperations
statusTweet
- The status messagepublic SearchResults search(java.lang.String query)
TwitterOperations
Tweet
s
search
in interface TwitterOperations
query
- The search query string
SearchResults
containing Tweet
spublic SearchResults search(java.lang.String query, long sinceId)
TwitterOperations
search
in interface TwitterOperations
query
- The search query stringsinceId
- The minimum Tweet
ID to return in the results
SearchResults
containing Tweet
spublic twitter4j.Twitter getUnderlyingTwitter()
TwitterOperations
getUnderlyingTwitter
in interface TwitterOperations
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |