public interface TimelineOperations
| 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 pageSize)
Retrieves tweets favorited by the authenticated user.
|
List<Tweet> |
getFavorites(long userId)
Retrieves the 20 most recent tweets favorited by the specified user.
|
List<Tweet> |
getFavorites(long userId,
int pageSize)
Retrieves tweets favorited by the specified user.
|
List<Tweet> |
getFavorites(String screenName)
Retrieves the 20 most recent tweets favorited by the specified user.
|
List<Tweet> |
getFavorites(String screenName,
int pageSize)
Retrieves tweets favorited by the specified user.
|
List<Tweet> |
getHomeTimeline()
Retrieves the 20 most recently posted tweets, including retweets, from
the authenticating user's home timeline.
|
List<Tweet> |
getHomeTimeline(int pageSize)
Retrieves tweets, including retweets, from the authenticating user's home timeline.
|
List<Tweet> |
getHomeTimeline(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 pageSize)
Retrieve tweets that mention the authenticated user.
|
List<Tweet> |
getMentions(int pageSize,
long sinceId,
long maxId)
Retrieve tweets that mention the authenticated user.
|
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.
|
OEmbedTweet |
getStatusOEmbed(String tweetId)
Returns a single tweet as an oEmbed representation.
|
OEmbedTweet |
getStatusOEmbed(String tweetId,
OEmbedOptions options)
Returns a single tweet as an oEmbed representation.
|
List<Tweet> |
getUserTimeline()
Retrieves the 20 most recent tweets posted by the authenticating user.
|
List<Tweet> |
getUserTimeline(int pageSize)
Retrieves tweets posted by the authenticating user.
|
List<Tweet> |
getUserTimeline(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 pageSize)
Retrieves tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(long userId,
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 pageSize)
Retrieves tweets posted by the given user.
|
List<Tweet> |
getUserTimeline(String screenName,
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.
|
Tweet |
retweet(long tweetId)
Posts a retweet of an existing tweet.
|
Tweet |
updateStatus(String status)
Updates the user's status.
|
Tweet |
updateStatus(String status,
Resource photo)
Deprecated.
Use
updateStatus(TweetData) instead. |
Tweet |
updateStatus(String status,
Resource photo,
StatusDetails details)
Deprecated.
Use
updateStatus(TweetData) instead. |
Tweet |
updateStatus(String status,
StatusDetails details)
Deprecated.
Use
updateStatus(TweetData) instead. |
Tweet |
updateStatus(TweetData tweetData)
Updates the user's status, including any additional metadata about the status carried in TweetData
|
List<Tweet> getHomeTimeline()
Tweets in the authenticating user's home timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getHomeTimeline(int pageSize)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getHomeTimeline(int pageSize, long sinceId, long maxId)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline()
Tweets that have been posted by the authenticating user.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline(int pageSize)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getUserTimeline(int pageSize, long sinceId, long maxId)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getUserTimeline(String screenName, int pageSize)
screenName - The screen name of the user whose timeline is being requested.pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getUserTimeline(String screenName, int pageSize, long sinceId, long maxId)
screenName - The screen name of the user whose timeline is being requested.pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getUserTimeline(long userId)
userId - The user ID of the user whose timeline is being requested.Tweets from the specified user's timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getUserTimeline(long userId, int pageSize)
userId - The user ID of the user whose timeline is being requested.pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getUserTimeline(long userId, int pageSize, long sinceId, long maxId)
userId - The user ID of the user whose timeline is being requested.pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getRetweetsOfMe()
org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.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.)org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.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 results.maxId - The maximum Tweet ID to return in the results.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getMentions()
Tweet objects that mention the authenticated user.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getMentions(int pageSize)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getMentions(int pageSize, long sinceId, long maxId)
pageSize - 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.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.Tweet getStatus(long tweetId)
tweetId - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.OEmbedTweet getStatusOEmbed(String tweetId)
tweetId - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.OEmbedTweet getStatusOEmbed(String tweetId, OEmbedOptions options)
tweetId - the tweet's IDoptions - options for the embedded tweetorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.Tweet updateStatus(String status)
status - The status messageorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.@Deprecated Tweet updateStatus(String status, Resource photo)
updateStatus(TweetData) instead.status - The status messagephoto - A Resource for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource or ClassPathResource) and must contain GIF, JPG, or PNG data.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.org.springframework.social.OperationNotPermittedException - if the photo resource isn't a GIF, JPG, or PNG.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.@Deprecated Tweet updateStatus(String status, StatusDetails details)
updateStatus(TweetData) instead.status - The status messagedetails - Metadata pertaining to the statusorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.@Deprecated Tweet updateStatus(String status, Resource photo, StatusDetails details)
updateStatus(TweetData) instead.status - The status messagephoto - A Resource for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource or ClassPathResource) and must contain GIF, JPG, or PNG data.details - Metadata pertaining to the statusorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.org.springframework.social.OperationNotPermittedException - if the photo resource isn't a GIF, JPG, or PNG.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.Tweet updateStatus(TweetData tweetData)
tweetData - The data defining the status.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.MessageTooLongException - if the length of the status message exceeds Twitter's 140 character limit.org.springframework.social.OperationNotPermittedException - if the photo resource isn't a GIF, JPG, or PNG.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void deleteStatus(long tweetId)
tweetId - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.Tweet retweet(long tweetId)
tweetId - The ID of the tweet to be retweetedorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getRetweets(long tweetId)
tweetId - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.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.)org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getFavorites()
Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getFavorites(int pageSize)
pageSize - The number of entries per page.Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Tweet> getFavorites(long userId)
userId - The user ID of the user whose favorites are being requested.Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getFavorites(long userId, int pageSize)
userId - The user ID of the user whose favorites are being requested.pageSize - The number of entries per page.Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getFavorites(String screenName)
screenName - The screen name of the user whose favorites are being requested.Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.List<Tweet> getFavorites(String screenName, int pageSize)
screenName - The screen name of the user whose favorites are being requested.pageSize - The number of entries per page.Tweets from the specified user's favorite timeline.org.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials or an application access token.void addToFavorites(long id)
id - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void removeFromFavorites(long id)
id - the tweet's IDorg.springframework.social.ApiException - if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.