|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.twitter.TwitterConnector
@Connector(namespacePrefix="twitter") public class TwitterConnector
A Connector for Twitter which uses twitter4j.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
TwitterConnector()
|
|
| Method Summary | |
|---|---|
twitter4j.Status |
destroyStatus(long statusId)
Destroys the status specified by the required ID parameter. Usage note: The authenticating user must be the author of the specified status. |
twitter4j.ResponseList<twitter4j.Status> |
getHomeTimeline(int page,
int count,
int sinceId)
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. |
twitter4j.ResponseList<twitter4j.Status> |
getMentions(int page,
int count,
int sinceId)
Returns the 20 most recent mentions (status containing @username) for the authenticating user. |
protected twitter4j.Paging |
getPaging(int page,
int count,
long sinceId)
|
twitter4j.ResponseList<twitter4j.Status> |
getPublicTimeline()
Returns the 20 most recent statuses from non-protected users who have set a custom user icon. |
twitter4j.ResponseList<twitter4j.User> |
getRetweetedBy(long statusId,
int page,
int count,
int sinceId)
Show user objects of up to 100 members who retweeted the status. |
twitter4j.IDs |
getRetweetedByIDs(long statusId,
int page,
int count,
int sinceId)
Show user ids of up to 100 users who retweeted the status represented by id This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedByMe(int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by the authenticating user. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedByUserByScreenName(String screenName,
int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by the specified user. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedByUserByUserId(long userId,
int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by the specified user. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedToMe(int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by the authenticating user's friends. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedToUserByScreenName(String screenName,
int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by users the specified user follows. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetedToUserByUserId(long userId,
int page,
int count,
int sinceId)
Returns the 20 most recent retweets posted by users the specified user follows. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweets(long statusId)
Returns up to 100 of the first retweets of a given tweet. |
twitter4j.ResponseList<twitter4j.Status> |
getRetweetsOfMe(int page,
int count,
int sinceId)
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others. |
twitter4j.Twitter |
getTwitterClient()
|
twitter4j.ResponseList<twitter4j.Status> |
getUserTimeline(int page,
int count,
int sinceId)
Returns the 20 most recent statuses posted from the authenticating user. |
twitter4j.ResponseList<twitter4j.Status> |
getUserTimelineByScreenName(String screenName,
int page,
int count,
int sinceId)
Returns the 20 most recent statuses posted from the authenticating user. |
twitter4j.ResponseList<twitter4j.Status> |
getUserTimelineByUserId(long userId,
int page,
int count,
int sinceId)
Returns the 20 most recent statuses posted from the authenticating user. |
boolean |
getUseSSL()
|
void |
initialise()
|
String |
requestAuthorization(String callbackUrl)
Start the OAuth request authorization process. |
twitter4j.Status |
retweetStatus(long statusId)
Retweets a tweet. |
twitter4j.QueryResult |
search(String query)
Returns tweets that match a specified query. |
void |
setAccessToken(String accessToken)
|
void |
setAccessTokenSecret(String accessTokenSecret)
|
void |
setConsumerKey(String consumerKey)
|
void |
setConsumerSecret(String consumerSecret)
|
void |
setMuleContext(org.mule.api.MuleContext context)
|
void |
setOauthVerifier(String oauthVerifier)
Set the OAuth verifier after it has been retrieved via requestAuthorization. |
void |
setUseSSL(boolean useSSL)
|
twitter4j.Status |
showStatus(long id)
Returns a single status, specified by the id parameter below. |
twitter4j.Status |
updateStatus(String status,
long inReplyTo,
twitter4j.GeoLocation geoLocation)
Updates the authenticating user's status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public TwitterConnector()
| Method Detail |
|---|
public void initialise()
throws org.mule.api.lifecycle.InitialisationException
initialise in interface org.mule.api.lifecycle.Initialisableorg.mule.api.lifecycle.InitialisationException
@Operation
public twitter4j.QueryResult search(String query)
throws twitter4j.TwitterException
This method calls http://search.twitter.com/search.json
query - The search query.
twitter4j.TwitterException
@Operation
public twitter4j.ResponseList<twitter4j.Status> getPublicTimeline()
throws twitter4j.TwitterException
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getHomeTimeline(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
paging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getUserTimelineByScreenName(String screenName,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
screenName - specifies the screen name of the user for whom to return the user_timeline
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getUserTimelineByUserId(long userId,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
userId - specifies the ID of the user for whom to return the user_timelinepaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
protected twitter4j.Paging getPaging(int page,
int count,
long sinceId)
@Operation
public twitter4j.ResponseList<twitter4j.Status> getUserTimeline(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
userId - specifies the ID of the user for whom to return the user_timelinepaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getMentions(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
paging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedByMe(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedToMe(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
paging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetsOfMe(@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
paging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedToUserByScreenName(String screenName,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
screenName - the user to viewpaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedToUserByUserId(long userId,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
userId - the user to viewpaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedByUserByScreenName(String screenName,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
screenName - the user to viewpaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweetedByUserByUserId(long userId,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
userId - the user to viewpaging - controls pagination. Supports since_id, max_id, count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.Status showStatus(long id)
throws twitter4j.TwitterException
id - the numerical ID of the status you're trying to retrieve
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.Status updateStatus(String status,
@Parameter(optional=true,defaultValue="-1")
long inReplyTo,
@Parameter(optional=true)
twitter4j.GeoLocation geoLocation)
throws twitter4j.TwitterException
status - the text of your status update
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.Status destroyStatus(long statusId)
throws twitter4j.TwitterException
statusId - The ID of the status to destroy.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.Status retweetStatus(long statusId)
throws twitter4j.TwitterException
statusId - The ID of the status to retweet.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.Status> getRetweets(long statusId)
throws twitter4j.TwitterException
statusId - The numerical ID of the tweet you want the retweets of.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.ResponseList<twitter4j.User> getRetweetedBy(long statusId,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
statusId - The ID of the status you want to get retweeters ofpaging - controls pagination. Supports count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public twitter4j.IDs getRetweetedByIDs(long statusId,
@Parameter(defaultValue="1",optional=true)
int page,
@Parameter(defaultValue="100",optional=true)
int count,
@Parameter(defaultValue="-1",optional=true)
int sinceId)
throws twitter4j.TwitterException
statusId - The ID of the status you want to get retweeters ofpaging - controls pagination. Supports count and page parameters.
twitter4j.TwitterException - when Twitter service or network is unavailable
@Operation
public void setOauthVerifier(String oauthVerifier)
throws twitter4j.TwitterException
oauthVerifier - The OAuth verifier code from Twitter.
twitter4j.TwitterException
@Operation
public String requestAuthorization(@Parameter(optional=true)
String callbackUrl)
throws twitter4j.TwitterException
twitter4j.TwitterExceptionpublic twitter4j.Twitter getTwitterClient()
public boolean getUseSSL()
public void setUseSSL(boolean useSSL)
public void setAccessToken(String accessToken)
public void setAccessTokenSecret(String accessTokenSecret)
public void setConsumerKey(String consumerKey)
public void setConsumerSecret(String consumerSecret)
public void setMuleContext(org.mule.api.MuleContext context)
setMuleContext in interface org.mule.api.context.MuleContextAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||