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.APIaddOrDeleteRulesRequestaddOrDeleteRules(AddOrDeleteRulesRequest addOrDeleteRulesRequest)Add/Delete rules Add or delete rules from a User's active rule set.TweetsApi.APIcreateTweetRequestcreateTweet(TweetCreateRequest tweetCreateRequest)Creation of a Tweet Causes the User to create a Tweet under the authorized account.TweetsApi.APIdeleteTweetByIdRequestdeleteTweetById(String id)Tweet delete by Tweet ID Delete specified Tweet (in the path) by ID.TweetsApi.APIfindTweetByIdRequestfindTweetById(String id)Tweet lookup by Tweet ID Returns a variety of information about the Tweet specified by the requested ID.TweetsApi.APIfindTweetsByIdRequestfindTweetsById(List<String> ids)Tweet lookup by Tweet IDs Returns a variety of information about the Tweet specified by the requested ID.TweetsApi.APIfindTweetsThatQuoteATweetRequestfindTweetsThatQuoteATweet(String id)Retrieve Tweets that quote a Tweet.TweetsApi.APIgetRulesRequestgetRules()Rules lookup Returns rules from a User's active rule set.TweetsApi.APIgetTweetsFirehoseStreamRequestgetTweetsFirehoseStream(Integer partition)Firehose stream Streams 100% of public Tweets.TweetsApi.APIgetTweetsSample10StreamRequestgetTweetsSample10Stream(Integer partition)Sample 10% stream Streams a deterministic 10% of public Tweets.TweetsApi.APIhideReplyByIdRequesthideReplyById(String tweetId)Hide replies Hides or unhides a reply to an owned conversation.TweetsApi.APIlistsIdTweetsRequestlistsIdTweets(String id)List Tweets timeline by List ID.TweetsApi.APIsampleStreamRequestsampleStream()Sample stream Streams a deterministic 1% of public Tweets.TweetsApi.APIsearchStreamRequestsearchStream()Filtered stream Streams Tweets matching the stream's active rule set.TweetsApi.APIspaceBuyersRequestspaceBuyers(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.APIspaceTweetsRequestspaceTweets(String id)Retrieve Tweets from a Space.TweetsApi.APItweetCountsFullArchiveSearchRequesttweetCountsFullArchiveSearch(String query)Full archive search counts Returns Tweet Counts that match a search query.TweetsApi.APItweetCountsRecentSearchRequesttweetCountsRecentSearch(String query)Recent search counts Returns Tweet Counts from the last 7 days that match a search query.TweetsApi.APItweetsFullarchiveSearchRequesttweetsFullarchiveSearch(String query)Full-archive search Returns Tweets that match a search query.TweetsApi.APItweetsRecentSearchRequesttweetsRecentSearch(String query)Recent search Returns Tweets from the last 7 days that match a search query.TweetsApi.APIusersIdLikeRequestusersIdLike(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.APIusersIdLikedTweetsRequestusersIdLikedTweets(String id)Returns Tweet objects liked by the provided User ID Returns a list of Tweets liked by the provided User IDTweetsApi.APIusersIdMentionsRequestusersIdMentions(String id)User mention timeline by User ID Returns Tweet objects that mention username associated to the provided User IDTweetsApi.APIusersIdRetweetsRequestusersIdRetweets(String id)Causes the User (in the path) to retweet the specified Tweet.TweetsApi.APIusersIdTimelineRequestusersIdTimeline(String id)User home timeline by User ID Returns Tweet objects that appears in the provided User ID's home timelineTweetsApi.APIusersIdTweetsRequestusersIdTweets(String id)User Tweets timeline by User ID Returns a list of Tweets authored by the provided User IDTweetsApi.APIusersIdUnlikeRequestusersIdUnlike(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.APIusersIdUnretweetsRequestusersIdUnretweets(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
- See Also:
- Add/Delete rules Documentation
- 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
- See Also:
- Creation of a Tweet Documentation
- 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
- See Also:
- Tweet delete by Tweet ID Documentation
- 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
- See Also:
- Tweet lookup by Tweet ID Documentation
- 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
- See Also:
- Tweet lookup by Tweet IDs Documentation
- 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
- See Also:
- Retrieve Tweets that quote a Tweet. Documentation
- 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
- See Also:
- Rules lookup Documentation
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
getTweetsFirehoseStream
public TweetsApi.APIgetTweetsFirehoseStreamRequest getTweetsFirehoseStream(Integer partition)
Firehose stream Streams 100% of public Tweets.- Parameters:
partition- The partition number. (required)- Returns:
- APIgetTweetsFirehoseStreamRequest
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
getTweetsSample10Stream
public TweetsApi.APIgetTweetsSample10StreamRequest getTweetsSample10Stream(Integer partition)
Sample 10% stream Streams a deterministic 10% of public Tweets.- Parameters:
partition- The partition number. (required)- Returns:
- APIgetTweetsSample10StreamRequest
- 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
- See Also:
- Hide replies Documentation
- 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
- See Also:
- List Tweets timeline by List ID. Documentation
- 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
- See Also:
- Sample stream Documentation
- 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
- See Also:
- Filtered stream Documentation
- 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
- See Also:
- Retrieve the list of Users who purchased a ticket to the given space Documentation
- 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
- See Also:
- Retrieve Tweets from a Space. Documentation
- 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
- See Also:
- Full archive search counts Documentation
- 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
- See Also:
- Recent search counts Documentation
- 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
- See Also:
- Full-archive search Documentation
- 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
- See Also:
- Recent search Documentation
- 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
- See Also:
- Causes the User (in the path) to like the specified Tweet Documentation
- 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
- See Also:
- Returns Tweet objects liked by the provided User ID Documentation
- 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
- See Also:
- User mention timeline by User ID Documentation
- 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
- See Also:
- Causes the User (in the path) to retweet the specified Tweet. Documentation
- 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
- See Also:
- User home timeline by User ID Documentation
- 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
- See Also:
- User Tweets timeline by User ID Documentation
- 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
- See Also:
- Causes the User (in the path) to unlike the specified Tweet Documentation
- 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
- See Also:
- Causes the User (in the path) to unretweet the specified Tweet Documentation
- Http Response Details:
Status Code Description Response Headers 200 The request has succeeded. - 0 The request has failed. -
-
-