Package com.twitter.clientlib.api
Class TweetsApi
- java.lang.Object
-
- com.twitter.clientlib.api.ApiCommon
-
- com.twitter.clientlib.api.TweetsApi
-
public class TweetsApi extends ApiCommon
-
-
Nested Class Summary
-
Field Summary
-
Fields inherited from class com.twitter.clientlib.api.ApiCommon
localVarApiClient
-
-
Constructor Summary
Constructors Constructor Description TweetsApi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetsApi.APIaddOrDeleteRulesRequest
addOrDeleteRules(AddOrDeleteRulesRequest addOrDeleteRulesRequest)
Add/Delete rules Add or delete rules from a User's active rule set.TweetsApi.APIcreateTweetRequest
createTweet(TweetCreateRequest tweetCreateRequest)
Creation of a Tweet Causes the User to create a Tweet under the authorized account.TweetsApi.APIdeleteTweetByIdRequest
deleteTweetById(String id)
Tweet delete by Tweet ID Delete specified Tweet (in the path) by ID.TweetsApi.APIfindTweetByIdRequest
findTweetById(String id)
Tweet lookup by Tweet ID Returns a variety of information about the Tweet specified by the requested ID.TweetsApi.APIfindTweetsByIdRequest
findTweetsById(List<String> ids)
Tweet lookup by Tweet IDs Returns a variety of information about the Tweet specified by the requested ID.TweetsApi.APIfindTweetsThatQuoteATweetRequest
findTweetsThatQuoteATweet(String id)
Retrieve Tweets that quote a Tweet.TweetsApi.APIgetRulesRequest
getRules()
Rules lookup Returns rules from a User's active rule set.TweetsApi.APIhideReplyByIdRequest
hideReplyById(String tweetId)
Hide replies Hides or unhides a reply to an owned conversation.TweetsApi.APIlistsIdTweetsRequest
listsIdTweets(String id)
List Tweets timeline by List ID.TweetsApi.APIsampleStreamRequest
sampleStream()
Sample stream Streams a deterministic 1% of public Tweets.TweetsApi.APIsearchStreamRequest
searchStream()
Filtered stream Streams Tweets matching the stream's active rule set.TweetsApi.APIspaceBuyersRequest
spaceBuyers(String id)
Retrieve the list of Users who purchased a ticket to the given space Retrieves the list of Users who purchased a ticket to the given spaceTweetsApi.APIspaceTweetsRequest
spaceTweets(String id)
Retrieve Tweets from a Space.TweetsApi.APItweetCountsFullArchiveSearchRequest
tweetCountsFullArchiveSearch(String query)
Full archive search counts Returns Tweet Counts that match a search query.TweetsApi.APItweetCountsRecentSearchRequest
tweetCountsRecentSearch(String query)
Recent search counts Returns Tweet Counts from the last 7 days that match a search query.TweetsApi.APItweetsFullarchiveSearchRequest
tweetsFullarchiveSearch(String query)
Full-archive search Returns Tweets that match a search query.TweetsApi.APItweetsRecentSearchRequest
tweetsRecentSearch(String query)
Recent search Returns Tweets from the last 7 days that match a search query.TweetsApi.APIusersIdLikeRequest
usersIdLike(String id)
Causes the User (in the path) to like the specified Tweet Causes the User (in the path) to like the specified Tweet.TweetsApi.APIusersIdLikedTweetsRequest
usersIdLikedTweets(String id)
Returns Tweet objects liked by the provided User ID Returns a list of Tweets liked by the provided User IDTweetsApi.APIusersIdMentionsRequest
usersIdMentions(String id)
User mention timeline by User ID Returns Tweet objects that mention username associated to the provided User IDTweetsApi.APIusersIdRetweetsRequest
usersIdRetweets(String id)
Causes the User (in the path) to retweet the specified Tweet.TweetsApi.APIusersIdTimelineRequest
usersIdTimeline(String id)
User home timeline by User ID Returns Tweet objects that appears in the provided User ID's home timelineTweetsApi.APIusersIdTweetsRequest
usersIdTweets(String id)
User Tweets timeline by User ID Returns a list of Tweets authored by the provided User IDTweetsApi.APIusersIdUnlikeRequest
usersIdUnlike(String id, String tweetId)
Causes the User (in the path) to unlike the specified Tweet Causes the User (in the path) to unlike the specified Tweet.TweetsApi.APIusersIdUnretweetsRequest
usersIdUnretweets(String id, String sourceTweetId)
Causes the User (in the path) to unretweet the specified Tweet Causes the User (in the path) to unretweet the specified Tweet.-
Methods inherited from class com.twitter.clientlib.api.ApiCommon
handleRateLimit, reduceAuthNames, setClient
-
-
-
-
Method Detail
-
addOrDeleteRules
public TweetsApi.APIaddOrDeleteRulesRequest addOrDeleteRules(AddOrDeleteRulesRequest addOrDeleteRulesRequest)
Add/Delete rules Add or delete rules from a User's active rule set. Users can provide unique, optionally tagged rules to add. Users can delete their entire rule set or a subset specified by rule ids or values.- Parameters:
addOrDeleteRulesRequest
- (required)- Returns:
- APIaddOrDeleteRulesRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
createTweet
public TweetsApi.APIcreateTweetRequest createTweet(TweetCreateRequest tweetCreateRequest)
Creation of a Tweet Causes the User to create a Tweet under the authorized account.- Parameters:
tweetCreateRequest
- (required)- Returns:
- APIcreateTweetRequest
- Http Response Details:
Status Code Description Response Headers 201 The request has succeeded. - 0 The request has failed. -
-
deleteTweetById
public TweetsApi.APIdeleteTweetByIdRequest deleteTweetById(String id)
Tweet delete by Tweet ID Delete specified Tweet (in the path) by ID.- Parameters:
id
- The ID of the Tweet to be deleted. (required)- Returns:
- APIdeleteTweetByIdRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
findTweetById
public TweetsApi.APIfindTweetByIdRequest findTweetById(String id)
Tweet lookup by Tweet ID Returns a variety of information about the Tweet specified by the requested ID.- Parameters:
id
- A single Tweet ID. (required)- Returns:
- APIfindTweetByIdRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
findTweetsById
public TweetsApi.APIfindTweetsByIdRequest findTweetsById(List<String> ids)
Tweet lookup by Tweet IDs Returns a variety of information about the Tweet specified by the requested ID.- Parameters:
ids
- A comma separated list of Tweet IDs. Up to 100 are allowed in a single request. (required)- Returns:
- APIfindTweetsByIdRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
findTweetsThatQuoteATweet
public TweetsApi.APIfindTweetsThatQuoteATweetRequest findTweetsThatQuoteATweet(String id)
Retrieve Tweets that quote a Tweet. Returns a variety of information about each Tweet that quotes the Tweet specified by the requested ID.- Parameters:
id
- A single Tweet ID. (required)- Returns:
- APIfindTweetsThatQuoteATweetRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
getRules
public TweetsApi.APIgetRulesRequest getRules()
Rules lookup Returns rules from a User's active rule set. Users can fetch all of their rules or a subset, specified by the provided rule ids.- Returns:
- APIgetRulesRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
hideReplyById
public TweetsApi.APIhideReplyByIdRequest hideReplyById(String tweetId)
Hide replies Hides or unhides a reply to an owned conversation.- Parameters:
tweetId
- The ID of the reply that you want to hide or unhide. (required)- Returns:
- APIhideReplyByIdRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
listsIdTweets
public TweetsApi.APIlistsIdTweetsRequest listsIdTweets(String id)
List Tweets timeline by List ID. Returns a list of Tweets associated with the provided List ID.- Parameters:
id
- The ID of the List. (required)- Returns:
- APIlistsIdTweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
sampleStream
public TweetsApi.APIsampleStreamRequest sampleStream()
Sample stream Streams a deterministic 1% of public Tweets.- Returns:
- APIsampleStreamRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
searchStream
public TweetsApi.APIsearchStreamRequest searchStream()
Filtered stream Streams Tweets matching the stream's active rule set.- Returns:
- APIsearchStreamRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
spaceBuyers
public TweetsApi.APIspaceBuyersRequest spaceBuyers(String id)
Retrieve the list of Users who purchased a ticket to the given space Retrieves the list of Users who purchased a ticket to the given space- Parameters:
id
- The ID of the Space to be retrieved. (required)- Returns:
- APIspaceBuyersRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
spaceTweets
public TweetsApi.APIspaceTweetsRequest spaceTweets(String id)
Retrieve Tweets from a Space. Retrieves Tweets shared in the specified Space.- Parameters:
id
- The ID of the Space to be retrieved. (required)- Returns:
- APIspaceTweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
tweetCountsFullArchiveSearch
public TweetsApi.APItweetCountsFullArchiveSearchRequest tweetCountsFullArchiveSearch(String query)
Full archive search counts Returns Tweet Counts that match a search query.- Parameters:
query
- One query/rule/filter for matching Tweets. Refer to https://t.co/rulelength to identify the max query length. (required)- Returns:
- APItweetCountsFullArchiveSearchRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
tweetCountsRecentSearch
public TweetsApi.APItweetCountsRecentSearchRequest tweetCountsRecentSearch(String query)
Recent search counts Returns Tweet Counts from the last 7 days that match a search query.- Parameters:
query
- One query/rule/filter for matching Tweets. Refer to https://t.co/rulelength to identify the max query length. (required)- Returns:
- APItweetCountsRecentSearchRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
tweetsFullarchiveSearch
public TweetsApi.APItweetsFullarchiveSearchRequest tweetsFullarchiveSearch(String query)
Full-archive search Returns Tweets that match a search query.- Parameters:
query
- One query/rule/filter for matching Tweets. Refer to https://t.co/rulelength to identify the max query length. (required)- Returns:
- APItweetsFullarchiveSearchRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
tweetsRecentSearch
public TweetsApi.APItweetsRecentSearchRequest tweetsRecentSearch(String query)
Recent search Returns Tweets from the last 7 days that match a search query.- Parameters:
query
- One query/rule/filter for matching Tweets. Refer to https://t.co/rulelength to identify the max query length. (required)- Returns:
- APItweetsRecentSearchRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdLike
public TweetsApi.APIusersIdLikeRequest usersIdLike(String id)
Causes the User (in the path) to like the specified Tweet Causes the User (in the path) to like the specified Tweet. The User in the path must match the User context authorizing the request.- Parameters:
id
- The ID of the authenticated source User that is requesting to like the Tweet. (required)- Returns:
- APIusersIdLikeRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdLikedTweets
public TweetsApi.APIusersIdLikedTweetsRequest usersIdLikedTweets(String id)
Returns Tweet objects liked by the provided User ID Returns a list of Tweets liked by the provided User ID- Parameters:
id
- The ID of the User to lookup. (required)- Returns:
- APIusersIdLikedTweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdMentions
public TweetsApi.APIusersIdMentionsRequest usersIdMentions(String id)
User mention timeline by User ID Returns Tweet objects that mention username associated to the provided User ID- Parameters:
id
- The ID of the User to lookup. (required)- Returns:
- APIusersIdMentionsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdRetweets
public TweetsApi.APIusersIdRetweetsRequest usersIdRetweets(String id)
Causes the User (in the path) to retweet the specified Tweet. Causes the User (in the path) to retweet the specified Tweet. The User in the path must match the User context authorizing the request.- Parameters:
id
- The ID of the authenticated source User that is requesting to retweet the Tweet. (required)- Returns:
- APIusersIdRetweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdTimeline
public TweetsApi.APIusersIdTimelineRequest usersIdTimeline(String id)
User home timeline by User ID Returns Tweet objects that appears in the provided User ID's home timeline- Parameters:
id
- The ID of the authenticated source User to list Reverse Chronological Timeline Tweets of. (required)- Returns:
- APIusersIdTimelineRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdTweets
public TweetsApi.APIusersIdTweetsRequest usersIdTweets(String id)
User Tweets timeline by User ID Returns a list of Tweets authored by the provided User ID- Parameters:
id
- The ID of the User to lookup. (required)- Returns:
- APIusersIdTweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdUnlike
public TweetsApi.APIusersIdUnlikeRequest usersIdUnlike(String id, String tweetId)
Causes the User (in the path) to unlike the specified Tweet Causes the User (in the path) to unlike the specified Tweet. The User must match the User context authorizing the request- Parameters:
id
- The ID of the authenticated source User that is requesting to unlike the Tweet. (required)tweetId
- The ID of the Tweet that the User is requesting to unlike. (required)- Returns:
- APIusersIdUnlikeRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
usersIdUnretweets
public TweetsApi.APIusersIdUnretweetsRequest usersIdUnretweets(String id, String sourceTweetId)
Causes the User (in the path) to unretweet the specified Tweet Causes the User (in the path) to unretweet the specified Tweet. The User must match the User context authorizing the request- Parameters:
id
- The ID of the authenticated source User that is requesting to retweet the Tweet. (required)sourceTweetId
- The ID of the Tweet that the User is requesting to unretweet. (required)- Returns:
- APIusersIdUnretweetsRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
-