public interface TwitterTimelineService
| Modifier and Type | Method and Description |
|---|---|
void |
addToFavorites(long id)
Adds a tweet to the user's collection of favorite tweets.
|
void |
deleteStatus(long tweetId)
Removes a status entry.
|
List<Tweet> |
getFavorites()
Retrieves the 20 most recent tweets favorited by the authenticated user.
|
List<Tweet> |
getFavorites(int page,
int pageSize)
Retrieves tweets favorited by the authenticated user.
|
List<Tweet> |
getHomeTimeline()
Retrieves the 20 most recently posted tweets, including retweets, from the authenticating user's home timeline.
|
List<Tweet> |
getHomeTimeline(int page,
int pageSize)
Retrieves tweets, including retweets, from the authenticating user's home timeline.
|
List<Tweet> |
getHomeTimeline(int page,
int pageSize,
long sinceId,
long maxId)
Retrieves tweets, including retweets, from the authenticating user's home timeline.
|
List<Tweet> |
getMentions()
Retrieve the 20 most recent tweets that mention the authenticated user.
|
List<Tweet> |
getMentions(int page,
int pageSize)
Retrieve tweets that mention the authenticated user.
|
List<Tweet> |
getMentions(int page,
int pageSize,
long sinceId,
long maxId)
Retrieve tweets that mention the authenticated user.
|
List<Tweet> |
getPublicTimeline()
Retrieves the 20 most recently posted tweets from the public timeline.
|
List<TwitterProfile> |
getRetweetedBy(long id)
Retrieves the profiles of up to 100 users how have retweeted a specific tweet.
|
List<TwitterProfile> |
getRetweetedBy(long tweetId,
int page,
int pageSize)
Retrieves the profiles of users how have retweeted a specific tweet.
|
List<Long> |
getRetweetedByIds(long tweetId)
Retrieves the IDs of up to 100 users who have retweeted a specific tweet.
|
List<Long> |
getRetweetedByIds(long tweetId,
int page,
int pageSize)
Retrieves the IDs of users who have retweeted a specific tweet.
|
List<Tweet> |
getRetweetedByMe()
Retrieve the 20 most recent retweets posted by the authenticated user.
|
List<Tweet> |
getRetweetedByMe(int page,
int pageSize)
Retrieve retweets posted by the authenticated user.
|
List<Tweet> |
getRetweetedByMe(int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets posted by the authenticated user.
|
List<Tweet> |
getRetweetedByUser(long userId)
Retrieve the 20 most recent retweets posted by the specified user.
|
List<Tweet> |
getRetweetedByUser(long userId,
int page,
int pageSize)
Retrieve retweets posted by the specified user.
|
List<Tweet> |
getRetweetedByUser(long userId,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets posted by the specified user.
|
List<Tweet> |
getRetweetedByUser(String screenName)
Retrieve the 20 most recent retweets posted by the specified user.
|
List<Tweet> |
getRetweetedByUser(String screenName,
int page,
int pageSize)
Retrieve retweets posted by the specified user.
|
List<Tweet> |
getRetweetedByUser(String screenName,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets posted by the specified user.
|
List<Tweet> |
getRetweetedToMe()
Retrieve the 20 most recent retweets posted by users the authenticating user follow.
|
List<Tweet> |
getRetweetedToMe(int page,
int pageSize)
Retrieve retweets posted by users the authenticating user follow.
|
List<Tweet> |
getRetweetedToMe(int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets posted by users the authenticating user follow.
|
List<Tweet> |
getRetweetedToUser(long userId)
Retrieve the 20 most recent retweets posted by users that the specified user follows.
|
List<Tweet> |
getRetweetedToUser(long userId,
int page,
int pageSize)
Retrieve retweets posted by users that the specified user follows.
|
List<Tweet> |
getRetweetedToUser(long userId,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets posted by users that the specified user follows.
|
List<Tweet> |
getRetweetedToUser(String screenName)
Retrieve the 20 most recent retweets by users that the specified user follows.
|
List<Tweet> |
getRetweetedToUser(String screenName,
int page,
int pageSize)
Retrieve retweets by users that the specified user follows.
|
List<Tweet> |
getRetweetedToUser(String screenName,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieve retweets by users that the specified user follows.
|
List<Tweet> |
getRetweets(long tweetId)
Retrieves up to 100 retweets of a specific tweet.
|
List<Tweet> |
getRetweets(long tweetId,
int count)
Retrieves retweets of a specific tweet.
|
List<Tweet> |
getRetweetsOfMe()
Retrieve the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
List<Tweet> |
getRetweetsOfMe(int page,
int pageSize)
Retrieve tweets of the authenticated user that have been retweeted by others.
|
List<Tweet> |
getRetweetsOfMe(int page,
int pageSize,
long sinceId,
long maxId)
Retrieve tweets of the authenticated user that have been retweeted by others.
|
Tweet |
getStatus(long tweetId)
Returns a single tweet.
|
List<Tweet> |
getUserTimeline()
Retrieves the 20 most recent tweets posted by the authenticating user.
|
List<Tweet> |
getUserTimeline(int page,
int pageSize)
Retrieves tweets posted by the authenticating user.
|
List<Tweet> |
getUserTimeline(int page,
int pageSize,
long sinceId,
long maxId)
Retrieves tweets posted by the authenticating user.
|
List<Tweet> |
getUserTimeline(long userId)
Retrieves the 20 most recent tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(long userId,
int page,
int pageSize)
Retrieves tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(long userId,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieves tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(String screenName)
Retrieves the 20 most recent tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(String screenName,
int page,
int pageSize)
Retrieves tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(String screenName,
int page,
int pageSize,
long sinceId,
long maxId)
Retrieves tweets posted by the given user.
|
void |
removeFromFavorites(long id)
Removes a tweet from the user's collection of favorite tweets.
|
void |
retweet(long tweetId)
Posts a retweet of an existing tweet.
|
Tweet |
updateStatus(String status)
Updates the user's status.
|
List<Tweet> getPublicTimeline()
Note that Twitter caches public timeline results for 60 seconds. Calling this method more frequently than that will count against rate limits and will not return any new results.
Tweets in the public timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getHomeTimeline()
Tweets in the authenticating user's home timeline.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getHomeTimeline(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)Tweets in the authenticating user's home timeline.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getHomeTimeline(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsTweets in the authenticating user's home timeline.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline()
Tweets that have been posted by the authenticating user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)Tweets that have been posted by the authenticating user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsTweets that have been posted by the authenticating user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline(String screenName)
screenName - The screen name of the user whose timeline is being requested.Tweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getUserTimeline(String screenName, int page, int pageSize)
screenName - The screen name of the user whose timeline is being requested.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)Tweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getUserTimeline(String screenName, int page, int pageSize, long sinceId, long maxId)
screenName - The screen name of the user whose timeline is being requested.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsTweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getUserTimeline(long userId)
userId - The user ID of the user whose timeline is being requested.Tweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getUserTimeline(long userId, int page, int pageSize)
userId - The user ID of the user whose timeline is being requested.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)Tweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getUserTimeline(long userId, int page, int pageSize, long sinceId, long maxId)
userId - The user ID of the user whose timeline is being requested.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsTweets from the specified user's timeline.ApiException - if there is an error while communicating with Twitter.List<Tweet> getMentions()
Tweet objects that mention the authenticated user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getMentions(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)Tweet objects that mention the authenticated user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getMentions(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 200. (Will return at most 200
entries, even if pageSize is greater than 200.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsTweet objects that mention the authenticated user.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByMe()
ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByMe(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByMe(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(long userId)
userId - The user ID to get retweets for.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(long userId, int page, int pageSize)
userId - The user ID to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(long userId, int page, int pageSize, long sinceId, long maxId)
userId - The user ID to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(String screenName)
screenName - The screen name of the user to get retweets for.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(String screenName, int page, int pageSize)
screenName - The screen name of the user to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedByUser(String screenName, int page, int pageSize, long sinceId, long maxId)
screenName - The screen name of the user to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToMe()
ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToMe(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToMe(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(long userId)
userId - The user ID to get retweets for.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(long userId, int page, int pageSize)
userId - The user ID to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(long userId, int page, int pageSize, long sinceId, long maxId)
userId - The user ID to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(String screenName)
screenName - The screen name of the user to get retweets for.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(String screenName, int page, int pageSize)
screenName - The screen name of the user to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetedToUser(String screenName, int page, int pageSize, long sinceId, long maxId)
screenName - The screen name of the user to get retweets for.page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetsOfMe()
ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetsOfMe(int page, int pageSize)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweetsOfMe(int page, int pageSize, long sinceId, long maxId)
page - The page to returnpageSize - The number of Tweets per page. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)sinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.Tweet getStatus(long tweetId)
tweetId - the tweet's IDApiException - if there is an error while communicating with Twitter.Tweet updateStatus(String status)
status - The status messageApiException - if there is an error while communicating with Twitter.DuplicateTweetException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void deleteStatus(long tweetId)
tweetId - the tweet's IDApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void retweet(long tweetId)
tweetId - The ID of the tweet to be retweetedApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweets(long tweetId)
tweetId - the tweet's IDApiException - if there is an error while communicating with Twitter.List<Tweet> getRetweets(long tweetId, int count)
tweetId - the tweet's IDcount - The maximum number of retweets to return. Should be less than or equal to 100. (Will return at most 100
entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.List<TwitterProfile> getRetweetedBy(long id)
id - the tweet's IDApiException - if there is an error while communicating with Twitter.List<TwitterProfile> getRetweetedBy(long tweetId, int page, int pageSize)
tweetId - the tweet's IDpage - The page to returnpageSize - The number of TwitterProfiles per page. Should be less than or equal to 100. (Will return at most
100 entries, even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.List<Long> getRetweetedByIds(long tweetId)
tweetId - the tweet's ID.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Long> getRetweetedByIds(long tweetId, int page, int pageSize)
tweetId - the tweet's ID.page - The page to returnpageSize - The number of entries per page. Should be less than or equal to 100. (Will return at most 100 entries,
even if pageSize is greater than 100.)ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getFavorites()
Tweets from the specified user's favorite timeline.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getFavorites(int page, int pageSize)
page - The page to returnpageSize - The number of entries per page.Tweets from the specified user's favorite timeline.ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void addToFavorites(long id)
id - the tweet's IDApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void removeFromFavorites(long id)
id - the tweet's IDApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.Copyright © 2013. All Rights Reserved.