class AsyncTwitterImpl extends TwitterBaseImpl implements AsyncTwitter
twitter4j.AsyncTwitter}
,
twitter4j.TwitterListener}
Modifier and Type | Class and Description |
---|---|
(package private) class |
AsyncTwitterImpl.AsyncTask |
Modifier and Type | Field and Description |
---|---|
private static twitter4j.internal.async.Dispatcher |
dispatcher |
private java.util.List<TwitterListener> |
listeners |
private static long |
serialVersionUID |
private Twitter |
twitter |
auth, conf, factory, http, id, screenName
Constructor and Description |
---|
AsyncTwitterImpl(Configuration conf,
Authorization auth) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(TwitterListener listener)
Adds twitter listener
|
void |
addUserListMember(int listId,
long userId) |
void |
addUserListMember(long ownerId,
java.lang.String slug,
long userId) |
void |
addUserListMembers(int listId,
long[] userIds) |
void |
addUserListMembers(int listId,
java.lang.String[] screenNames) |
void |
addUserListMembers(long ownerId,
java.lang.String slug,
long[] userIds) |
void |
addUserListMembers(long ownerId,
java.lang.String slug,
java.lang.String[] screenNames) |
void |
createBlock(long userId)
Blocks the user specified in the ID parameter as the authenticating user.
|
void |
createBlock(java.lang.String screenName)
Blocks the user specified in the ID parameter as the authenticating user.
|
void |
createFavorite(long id)
Favorites the status specified in the ID parameter as the authenticating user.
|
void |
createFriendship(long userId)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
void |
createFriendship(long userId,
boolean follow)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
void |
createFriendship(java.lang.String screenName)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
void |
createFriendship(java.lang.String screenName,
boolean follow)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
void |
createPlace(java.lang.String name,
java.lang.String containedWithin,
java.lang.String token,
GeoLocation location,
java.lang.String streetAddress)
Creates a new place at the given latitude and longitude.
|
void |
createSavedSearch(java.lang.String query)
Creates a saved search for the authenticated user.
|
void |
createUserList(java.lang.String listName,
boolean isPublicList,
java.lang.String description)
Creates a new list for the authenticated user.
|
void |
createUserListMember(int listId,
long userId)
Adds a member to a list.
|
void |
createUserListMember(long ownerId,
java.lang.String slug,
long userId)
Adds a member to a list.
|
void |
createUserListMembers(int listId,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
createUserListMembers(int listId,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
createUserListMembers(long ownerId,
java.lang.String slug,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
createUserListMembers(long ownerId,
java.lang.String slug,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
createUserListSubscription(int listId)
Make the authenticated user follow the specified list.
|
void |
createUserListSubscription(long ownerId,
java.lang.String slug)
Make the authenticated user follow the specified list.
|
void |
deleteUserListMember(int listId,
long userId) |
void |
deleteUserListMember(long ownerId,
java.lang.String slug,
long userId) |
void |
destroyBlock(long userId)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
void |
destroyBlock(java.lang.String screenName)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
void |
destroyDirectMessage(long id)
Destroys the direct message specified in the required ID parameter.
|
void |
destroyFavorite(long id)
Favorites the status specified in the ID parameter as the authenticating user.
|
void |
destroyFriendship(long userId)
Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. |
void |
destroyFriendship(java.lang.String screenName)
Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. |
void |
destroySavedSearch(int id)
Destroys a saved search for the authenticated user.
|
void |
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. |
void |
destroyUserList(int listId)
Deletes the specified list.
|
void |
destroyUserList(long ownerId,
java.lang.String slug)
Deletes the specified list.
|
void |
destroyUserListMember(int listId,
long userId)
Removes the specified member from the list.
|
void |
destroyUserListMember(long ownerId,
java.lang.String slug,
long userId)
Removes the specified member from the list.
|
void |
destroyUserListSubscription(int listId)
Unsubscribes the authenticated user form the specified list.
|
void |
destroyUserListSubscription(long ownerId,
java.lang.String slug)
Unsubscribes the authenticated user form the specified list.
|
boolean |
equals(java.lang.Object o) |
void |
getAccountSettings()
Returns the current trend, geo and sleep time information for the authenticating user.
|
void |
getAPIConfiguration()
Returns the current configuration used by Twitter including twitter.com slugs which are not usernames, maximum photo resolutions, and t.co URL lengths.
It is recommended applications request this endpoint when they are loaded, but no more than once a day.
|
void |
getAvailableTrends()
Retrieves the locations that Twitter has trending topic information for.
|
void |
getAvailableTrends(GeoLocation location)
Retrieves the sorted locations that Twitter has trending topic information for.
|
void |
getBlocksIDs()
Returns an array of numeric user ids the authenticating user is blocking.
|
void |
getBlocksIDs(long cursor)
Returns an array of numeric user ids the authenticating user is blocking.
|
void |
getBlocksList()
Returns a list of user objects that the authenticating user is blocking.
|
void |
getBlocksList(long cursor)
Returns a list of user objects that the authenticating user is blocking.
|
void |
getClosestTrends(GeoLocation location)
Returns the locations that Twitter has trending topic information for, closest to a specified location.
The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in. A WOEID is a Yahoo! Where On Earth ID. |
void |
getContributees(long userId)
Returns an array of users that the specified user can contribute to.
|
void |
getContributees(java.lang.String screenName)
Returns an array of users that the specified user can contribute to.
|
void |
getContributors(long userId)
Returns an array of users who can contribute to the specified account.
|
void |
getContributors(java.lang.String screenName)
Returns an array of users who can contribute to the specified account.
|
void |
getDirectMessages()
Returns a list of the direct messages sent to the authenticating user.
|
void |
getDirectMessages(Paging paging)
Returns a list of the direct messages sent to the authenticating user.
|
private twitter4j.internal.async.Dispatcher |
getDispatcher() |
void |
getFavorites()
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFavorites(long userId)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFavorites(long userId,
Paging paging)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFavorites(Paging paging)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFavorites(java.lang.String screenName)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFavorites(java.lang.String screenName,
Paging paging)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFollowersIDs(long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(long userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(java.lang.String screenName,
long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersList(long userId,
long cursor)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
void |
getFollowersList(java.lang.String screenName,
long cursor)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
void |
getFriendsIDs(long cursor)
Returns an array of numeric IDs for every user the authenticating user is following.
|
void |
getFriendsIDs(long userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is following.
|
void |
getFriendsIDs(java.lang.String screenName,
long cursor)
Returns an array of numeric IDs for every user the specified user is following.
|
void |
getFriendsList(long userId,
long cursor)
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
void |
getFriendsList(java.lang.String screenName,
long cursor)
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
void |
getGeoDetails(java.lang.String id)
Find out more details of a place that was returned from the
PlacesGeoResourcesAsync.reverseGeoCode(twitter4j.GeoQuery) method. |
void |
getHomeTimeline()
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
|
void |
getHomeTimeline(Paging paging)
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
|
void |
getIncomingFriendships(long cursor)
Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
|
void |
getLanguages()
Returns the list of languages supported by Twitter along with their ISO 639-1 code.
|
void |
getLocationTrends(int woeid)
Returns the top 10 trending topics for a specific WOEID, if trending information is available for it.
The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. This information is cached for 5 minutes. |
void |
getMemberSuggestions(java.lang.String categorySlug)
Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.
|
void |
getMentions()
Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user.
|
void |
getMentions(Paging paging)
Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user.
|
OAuth2Token |
getOAuth2Token()
Obtains an OAuth 2 Bearer token.
|
void |
getOAuth2TokenAsync()
Obtains an OAuth 2 Bearer token.
|
AccessToken |
getOAuthAccessToken()
Returns an access token associated with this instance.
If no access token is associated with this instance, this will retrieve a new access token. |
AccessToken |
getOAuthAccessToken(RequestToken requestToken)
Retrieves an access token associated with the supplied request token and sets userId.
|
AccessToken |
getOAuthAccessToken(RequestToken requestToken,
java.lang.String oauthVerifier)
Retrieves an access token associated with the supplied request token and sets userId.
|
AccessToken |
getOAuthAccessToken(java.lang.String oauthVerifier)
Retrieves an access token.
|
AccessToken |
getOAuthAccessToken(java.lang.String screenName,
java.lang.String password)
Retrieves an access token associated with the supplied screen name and password using xAuth.
In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error. |
void |
getOAuthAccessTokenAsync()
Returns an access token associated with this instance.
If no access token is associated with this instance, this will retrieve a new access token. |
void |
getOAuthAccessTokenAsync(RequestToken requestToken)
Retrieves an access token associated with the supplied request token and sets userId.
|
void |
getOAuthAccessTokenAsync(RequestToken requestToken,
java.lang.String oauthVerifier)
Retrieves an access token associated with the supplied request token and sets userId.
|
void |
getOAuthAccessTokenAsync(java.lang.String oauthVerifier)
Retrieves an access token.
|
void |
getOAuthAccessTokenAsync(java.lang.String screenName,
java.lang.String password)
Retrieves an access token associated with the supplied screen name and password using xAuth.
In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error. |
RequestToken |
getOAuthRequestToken()
Retrieves a request token
|
RequestToken |
getOAuthRequestToken(java.lang.String callbackUrl)
Retrieves a request token
|
void |
getOAuthRequestTokenAsync()
Retrieves a request token
|
void |
getOAuthRequestTokenAsync(java.lang.String callbackURL)
Retrieves a request token
|
void |
getOAuthRequestTokenAsync(java.lang.String callbackURL,
java.lang.String xAuthAccessType)
Retrieves a request token
|
void |
getOEmbed(OEmbedRequest req)
Returns information allowing the creation of an embedded representation of a Tweet on third party sites.
|
void |
getOutgoingFriendships(long cursor)
Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
|
void |
getPlaceTrends(int woeid)
Returns the top 10 trending topics for a specific WOEID, if trending information is available for it.
The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. This information is cached for 5 minutes. |
void |
getPrivacyPolicy()
Returns Twitter's Privacy Policy.
|
void |
getRateLimitStatus()
Returns the current rate limits for methods belonging to the specified resource families.
Each 1.1 API resource belongs to a "resource family" which is indicated in its method documentation. |
void |
getRateLimitStatus(java.lang.String... resources)
Returns the current rate limits for methods belonging to the specified resource families.
Each 1.1 API resource belongs to a "resource family" which is indicated in its method documentation. |
void |
getRetweets(long statusId)
Returns up to 100 of the first retweets of a given tweet.
|
void |
getRetweetsOfMe()
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
void |
getRetweetsOfMe(Paging paging)
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
void |
getSavedSearches()
Returns the authenticated user's saved search queries.
|
void |
getSentDirectMessages()
Returns a list of the direct messages sent by the authenticating user.
|
void |
getSentDirectMessages(Paging paging)
Returns a list of the direct messages sent by the authenticating user.
|
void |
getSimilarPlaces(GeoLocation location,
java.lang.String name,
java.lang.String containedWithin,
java.lang.String streetAddress)
Locates places near the given coordinates which are similar in name.
|
void |
getSuggestedUserCategories()
Access to Twitter's suggested user list.
|
void |
getTermsOfService()
Returns Twitter's' Terms of Service.
|
void |
getUserListMembers(int listId,
long cursor)
Returns the members of the specified list.
|
void |
getUserListMembers(long ownerId,
java.lang.String slug,
long cursor)
Returns the members of the specified list.
|
void |
getUserListMemberships(long cursor)
List the lists the authenticating user has been added to.
|
void |
getUserListMemberships(long listMemberId,
long cursor)
List the lists the specified user has been added to.
|
void |
getUserListMemberships(long listMemberId,
long cursor,
boolean filterToOwnedLists)
List the lists the specified user has been added to.
|
void |
getUserListMemberships(java.lang.String listMemberScreenName,
long cursor)
List the lists the specified user has been added to.
|
void |
getUserListMemberships(java.lang.String listMemberScreenName,
long cursor,
boolean filterToOwnedLists)
List the lists the specified user has been added to.
|
void |
getUserLists(long listOwnerUserId)
List the lists of the specified user.
|
void |
getUserLists(java.lang.String listOwnerScreenName)
List the lists of the specified user.
|
void |
getUserListStatuses(int listId,
Paging paging)
Show tweet timeline for members of the specified list.
|
void |
getUserListStatuses(long ownerId,
java.lang.String slug,
Paging paging)
Show tweet timeline for members of the specified list.
|
void |
getUserListSubscribers(int listId,
long cursor)
Returns the subscribers of the specified list.
|
void |
getUserListSubscribers(long ownerId,
java.lang.String slug,
long cursor)
Returns the subscribers of the specified list.
|
void |
getUserListSubscriptions(java.lang.String listOwnerScreenName,
long cursor)
List the lists the specified user follows.
|
void |
getUserSuggestions(java.lang.String categorySlug)
Access the users in a given category of the Twitter suggested user list.
It is recommended that end clients cache this data for no more than one hour. |
void |
getUserTimeline()
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(long userId)
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(long userId,
Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(java.lang.String screenName)
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(java.lang.String screenName,
Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
int |
hashCode() |
void |
invalidateOAuth2Token()
Revokes an issued OAuth 2 Bearer Token.
|
void |
lookupFriendships(long[] ids)
Returns the relationship of the authenticating user to the specified users.
|
void |
lookupFriendships(java.lang.String[] screenNames)
Returns the relationship of the authenticating user to the specified users.
|
void |
lookupUsers(long[] ids)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
void |
lookupUsers(java.lang.String[] screenNames)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
void |
removeProfileBanner()
Removes the uploaded profile banner for the authenticating user.
|
void |
reportSpam(long userId)
The user specified in the id is blocked by the authenticated user and reported as a spammer.
|
void |
reportSpam(java.lang.String screenName)
The user specified in the id is blocked by the authenticated user and reported as a spammer.
|
void |
retweetStatus(long statusId)
Retweets a tweet.
|
void |
reverseGeoCode(GeoQuery query)
Search for places (cities and neighborhoods) that can be attached to a statuses/update.
|
void |
search(Query query)
Returns tweets that match a specified query.
|
void |
searchPlaces(GeoQuery query)
Search for places that can be attached to a statuses/update.
|
void |
searchUsers(java.lang.String query,
int page)
Run a search for users similar to the Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API.
Usage note: It is only possible to retrieve the first 1000 matches from this API. |
void |
sendDirectMessage(long userId,
java.lang.String text)
Sends a new direct message to the specified user from the authenticating user.
|
void |
sendDirectMessage(java.lang.String screenName,
java.lang.String text)
Sends a new direct message to the specified user from the authenticating user.
|
void |
setOAuth2Token(OAuth2Token oauth2Token)
Sets the OAuth 2 Bearer token.
|
void |
setOAuthAccessToken(AccessToken accessToken)
Sets the access token
|
void |
setOAuthConsumer(java.lang.String consumerKey,
java.lang.String consumerSecret)
sets the OAuth consumer key and consumer secret
|
void |
showDirectMessage(long id)
Returns a single direct message, specified by an id parameter.
|
void |
showFriendship(long sourceId,
long targetId)
Returns detailed information about the relationship between two users.
|
void |
showFriendship(java.lang.String sourceScreenName,
java.lang.String targetScreenName)
Returns detailed information about the relationship between two users.
|
void |
showSavedSearch(int id)
Retrieve the data for a saved search owned by the authenticating user specified by the given id.
|
void |
showStatus(long id)
Returns a single status, specified by the id parameter below.
|
void |
showUser(long userId)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
void |
showUser(java.lang.String screenName)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
void |
showUserList(int listId)
Show the specified list.
|
void |
showUserList(long ownerId,
java.lang.String slug)
Show the specified list.
|
void |
showUserListMembership(int listId,
long userId)
Check if a user is a member of the specified list.
This method calls https://api.twitter.com/1.1/lists/members/show.json |
void |
showUserListMembership(long ownerId,
java.lang.String slug,
long userId)
Check if a user is a member of the specified list.
This method calls https://api.twitter.com/1.1/lists/members/show.json |
void |
showUserListSubscription(int listId,
long userId)
Check if the specified user is a subscriber of the specified list.
|
void |
showUserListSubscription(long ownerId,
java.lang.String slug,
long userId)
Check if the specified user is a subscriber of the specified list.
|
void |
shutdown()
Shuts down this instance and releases allocated resources.
|
java.lang.String |
toString() |
void |
updateAccountSettings(java.lang.Integer trend_locationWoeid,
java.lang.Boolean sleep_timeEnabled,
java.lang.String start_sleepTime,
java.lang.String end_sleepTime,
java.lang.String time_zone,
java.lang.String lang)
Updates the current trend, geo, language, timezone and sleep time information for the authenticating user.
|
void |
updateFriendship(long userId,
boolean enableDeviceNotification,
boolean retweet)
Allows you to enable or disable retweets and device notifications from the specified user.
|
void |
updateFriendship(java.lang.String screenName,
boolean enableDeviceNotification,
boolean retweet)
Allows you to enable or disable retweets and device notifications from the specified user.
|
void |
updateProfile(java.lang.String name,
java.lang.String url,
java.lang.String location,
java.lang.String description)
Sets values that users are able to set under the "Account" tab of their settings page.
|
void |
updateProfileBackgroundImage(java.io.File image,
boolean tile)
Updates the authenticating user's profile background image.
|
void |
updateProfileBackgroundImage(java.io.InputStream image,
boolean tile)
Updates the authenticating user's profile background image.
|
void |
updateProfileBanner(java.io.File image)
Uploads a profile banner on behalf of the authenticating user.
|
void |
updateProfileBanner(java.io.InputStream image)
Uploads a profile banner on behalf of the authenticating user.
|
void |
updateProfileColors(java.lang.String profileBackgroundColor,
java.lang.String profileTextColor,
java.lang.String profileLinkColor,
java.lang.String profileSidebarFillColor,
java.lang.String profileSidebarBorderColor)
Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com.
|
void |
updateProfileImage(java.io.File image)
Updates the authenticating user's profile image.
|
void |
updateProfileImage(java.io.InputStream image)
Updates the authenticating user's profile image.
|
void |
updateStatus(StatusUpdate latestStatus)
Updates the authenticating user's status.
|
void |
updateStatus(java.lang.String statusText)
Updates the authenticating user's status.
|
void |
updateUserList(int listId,
java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription)
Updates the specified list.
|
void |
updateUserList(long ownerId,
java.lang.String slug,
java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription)
Updates the specified list.
|
void |
verifyCredentials()
Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.
|
addRateLimitStatusListener, ensureAuthorizationEnabled, ensureOAuthEnabled, fillInIDAndScreenName, getAuthorization, getConfiguration, getId, getOAuthRequestToken, getScreenName, httpResponseReceived, setFactory
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOAuthRequestToken
addRateLimitStatusListener, getAuthorization, getConfiguration, getId, getScreenName
private static final long serialVersionUID
private final Twitter twitter
private final java.util.List<TwitterListener> listeners
private static transient twitter4j.internal.async.Dispatcher dispatcher
AsyncTwitterImpl(Configuration conf, Authorization auth)
public void addListener(TwitterListener listener)
addListener
in interface AsyncTwitter
listener
- TwitterListenerpublic void getMentions()
getMentions
in interface TimelinesResourcesAsync
public void getMentions(Paging paging)
getMentions
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName, Paging paging)
getUserTimeline
in interface TimelinesResourcesAsync
screenName
- Specifies the screen name of the user for whom to return the user_timeline.paging
- controls paginationpublic void getUserTimeline(long userId, Paging paging)
getUserTimeline
in interface TimelinesResourcesAsync
userId
- Specifies the ID of the user for whom to return the user_timeline.paging
- controls paginationpublic void getUserTimeline(Paging paging)
getUserTimeline
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName)
getUserTimeline
in interface TimelinesResourcesAsync
screenName
- Specifies the screen name of the user for whom to return the user_timeline.public void getUserTimeline(long userId)
getUserTimeline
in interface TimelinesResourcesAsync
userId
- Specifies the ID of the user for whom to return the user_timeline.public void getUserTimeline()
getUserTimeline
in interface TimelinesResourcesAsync
public void getHomeTimeline()
getHomeTimeline
in interface TimelinesResourcesAsync
public void getHomeTimeline(Paging paging)
getHomeTimeline
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getRetweetsOfMe()
getRetweetsOfMe
in interface TimelinesResourcesAsync
public void getRetweetsOfMe(Paging paging)
getRetweetsOfMe
in interface TimelinesResourcesAsync
paging
- controls pagination. Supports since_id, max_id, count and page parameters.public void getRetweets(long statusId)
getRetweets
in interface TweetsResourcesAsync
statusId
- The numerical ID of the tweet you want the retweets of.public void showStatus(long id)
showStatus
in interface TweetsResourcesAsync
id
- intpublic void destroyStatus(long statusId)
destroyStatus
in interface TweetsResourcesAsync
statusId
- Stringpublic void updateStatus(java.lang.String statusText)
updateStatus
in interface TweetsResourcesAsync
statusText
- Stringpublic void updateStatus(StatusUpdate latestStatus)
updateStatus
in interface TweetsResourcesAsync
latestStatus
- the latest status to be updated.public void retweetStatus(long statusId)
retweetStatus
in interface TweetsResourcesAsync
statusId
- The ID of the status to retweet.public void getOEmbed(OEmbedRequest req)
TweetsResourcesAsync
getOEmbed
in interface TweetsResourcesAsync
req
- requestpublic void search(Query query)
search
in interface SearchResourceAsync
query
- - the search conditionpublic void getDirectMessages()
getDirectMessages
in interface DirectMessagesResourcesAsync
public void getDirectMessages(Paging paging)
getDirectMessages
in interface DirectMessagesResourcesAsync
paging
- controls paginationpublic void getSentDirectMessages()
getSentDirectMessages
in interface DirectMessagesResourcesAsync
public void getSentDirectMessages(Paging paging)
getSentDirectMessages
in interface DirectMessagesResourcesAsync
paging
- controls paginationpublic void showDirectMessage(long id)
showDirectMessage
in interface DirectMessagesResourcesAsync
id
- message idpublic void destroyDirectMessage(long id)
destroyDirectMessage
in interface DirectMessagesResourcesAsync
id
- intpublic void sendDirectMessage(long userId, java.lang.String text)
sendDirectMessage
in interface DirectMessagesResourcesAsync
userId
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.public void sendDirectMessage(java.lang.String screenName, java.lang.String text)
sendDirectMessage
in interface DirectMessagesResourcesAsync
screenName
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.public void getFriendsIDs(long cursor)
getFriendsIDs
in interface FriendsFollowersResourcesAsync
cursor
- Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.public void getFriendsIDs(long userId, long cursor)
getFriendsIDs
in interface FriendsFollowersResourcesAsync
userId
- Specifies the ID of the user for whom to return the friends list.cursor
- Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.public void getFriendsIDs(java.lang.String screenName, long cursor)
getFriendsIDs
in interface FriendsFollowersResourcesAsync
screenName
- Specifies the screen name of the user for whom to return the friends list.cursor
- Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.public void getFollowersIDs(long cursor)
getFollowersIDs
in interface FriendsFollowersResourcesAsync
cursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getFollowersIDs(long userId, long cursor)
getFollowersIDs
in interface FriendsFollowersResourcesAsync
userId
- Specifies the ID of the user for whom to return the followers list.cursor
- Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.public void getFollowersIDs(java.lang.String screenName, long cursor)
getFollowersIDs
in interface FriendsFollowersResourcesAsync
screenName
- Specifies the screen name of the user for whom to return the followers list.cursor
- Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.public void lookupFriendships(long[] ids)
lookupFriendships
in interface FriendsFollowersResourcesAsync
ids
- array of the ids to lookuppublic void lookupFriendships(java.lang.String[] screenNames)
lookupFriendships
in interface FriendsFollowersResourcesAsync
screenNames
- array of the screen names to lookuppublic void getIncomingFriendships(long cursor)
getIncomingFriendships
in interface FriendsFollowersResourcesAsync
cursor
- Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.public void getOutgoingFriendships(long cursor)
getOutgoingFriendships
in interface FriendsFollowersResourcesAsync
cursor
- Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.public void createFriendship(long userId)
createFriendship
in interface FriendsFollowersResourcesAsync
userId
- the ID of the user to be befriendedpublic void createFriendship(java.lang.String screenName)
createFriendship
in interface FriendsFollowersResourcesAsync
screenName
- the screen name of the user to be befriendedpublic void createFriendship(long userId, boolean follow)
createFriendship
in interface FriendsFollowersResourcesAsync
userId
- the ID of the user to be befriendedfollow
- Enable notifications for the target user in addition to becoming friends.public void createFriendship(java.lang.String screenName, boolean follow)
createFriendship
in interface FriendsFollowersResourcesAsync
screenName
- the screen name of the user to be befriendedfollow
- Enable notifications for the target user in addition to becoming friends.public void destroyFriendship(long userId)
destroyFriendship
in interface FriendsFollowersResourcesAsync
userId
- the screen name of the user to be befriendedpublic void destroyFriendship(java.lang.String screenName)
destroyFriendship
in interface FriendsFollowersResourcesAsync
screenName
- the screen name of the user to be befriendedpublic void updateFriendship(long userId, boolean enableDeviceNotification, boolean retweet)
updateFriendship
in interface FriendsFollowersResourcesAsync
userId
- user id to updateenableDeviceNotification
- set true to enable device notificationretweet
- set true to enable retweetspublic void updateFriendship(java.lang.String screenName, boolean enableDeviceNotification, boolean retweet)
updateFriendship
in interface FriendsFollowersResourcesAsync
screenName
- screen name to updateenableDeviceNotification
- set true to enable device notificationretweet
- set true to enable retweetspublic void showFriendship(long sourceId, long targetId)
showFriendship
in interface FriendsFollowersResourcesAsync
sourceId
- the ID of the source usertargetId
- the ID of the target userpublic void showFriendship(java.lang.String sourceScreenName, java.lang.String targetScreenName)
showFriendship
in interface FriendsFollowersResourcesAsync
sourceScreenName
- the screen name of the source usertargetScreenName
- the screen name of the target userpublic void getFriendsList(long userId, long cursor)
getFriendsList
in interface FriendsFollowersResourcesAsync
userId
- The ID of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.public void getFriendsList(java.lang.String screenName, long cursor)
getFriendsList
in interface FriendsFollowersResourcesAsync
screenName
- The screen name of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.public void getFollowersList(long userId, long cursor)
getFollowersList
in interface FriendsFollowersResourcesAsync
userId
- The ID of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.public void getFollowersList(java.lang.String screenName, long cursor)
getFollowersList
in interface FriendsFollowersResourcesAsync
screenName
- The screen name of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.public void getAccountSettings()
getAccountSettings
in interface UsersResourcesAsync
public void verifyCredentials()
verifyCredentials
in interface UsersResourcesAsync
public void updateAccountSettings(java.lang.Integer trend_locationWoeid, java.lang.Boolean sleep_timeEnabled, java.lang.String start_sleepTime, java.lang.String end_sleepTime, java.lang.String time_zone, java.lang.String lang)
updateAccountSettings
in interface UsersResourcesAsync
trend_locationWoeid
- Optional. The Yahoo! Where On Earth ID to use as the user's default trend location.sleep_timeEnabled
- Optional. Whether sleep time is enabled for the userstart_sleepTime
- Optional. The hour that sleep time should begin if it is enabled.end_sleepTime
- Optional. The hour that sleep time should end if it is enabled.time_zone
- Optional. The timezone dates and times should be displayed in for the user.lang
- Optional. The language which Twitter should render in for this user. (two letter ISO 639-1)public void updateProfile(java.lang.String name, java.lang.String url, java.lang.String location, java.lang.String description)
updateProfile
in interface UsersResourcesAsync
name
- Optional. Maximum of 20 characters.url
- Optional. Maximum of 100 characters. Will be prepended with "http://" if not present.location
- Optional. Maximum of 30 characters. The contents are not normalized or geocoded in any way.description
- Optional. Maximum of 160 characters.public void updateProfileBackgroundImage(java.io.File image, boolean tile)
updateProfileBackgroundImage
in interface UsersResourcesAsync
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forcibly scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.public void updateProfileBackgroundImage(java.io.InputStream image, boolean tile)
updateProfileBackgroundImage
in interface UsersResourcesAsync
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forcibly scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.public void updateProfileColors(java.lang.String profileBackgroundColor, java.lang.String profileTextColor, java.lang.String profileLinkColor, java.lang.String profileSidebarFillColor, java.lang.String profileSidebarBorderColor)
updateProfileColors
in interface UsersResourcesAsync
profileBackgroundColor
- optional, can be nullprofileTextColor
- optional, can be nullprofileLinkColor
- optional, can be nullprofileSidebarFillColor
- optional, can be nullprofileSidebarBorderColor
- optional, can be nullpublic void updateProfileImage(java.io.File image)
updateProfileImage
in interface UsersResourcesAsync
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.public void updateProfileImage(java.io.InputStream image)
updateProfileImage
in interface UsersResourcesAsync
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.public void getBlocksList()
getBlocksList
in interface UsersResourcesAsync
public void getBlocksList(long cursor)
getBlocksList
in interface UsersResourcesAsync
cursor
- Causes the list of blocked users to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."public void getBlocksIDs()
getBlocksIDs
in interface UsersResourcesAsync
public void getBlocksIDs(long cursor)
getBlocksIDs
in interface UsersResourcesAsync
public void createBlock(long userId)
createBlock
in interface UsersResourcesAsync
userId
- the screen_name of the user to blockpublic void createBlock(java.lang.String screenName)
createBlock
in interface UsersResourcesAsync
screenName
- the screen_name of the user to blockpublic void destroyBlock(long userId)
destroyBlock
in interface UsersResourcesAsync
userId
- the ID of the user to blockpublic void destroyBlock(java.lang.String screenName)
destroyBlock
in interface UsersResourcesAsync
screenName
- the screen_name of the user to blockpublic void lookupUsers(long[] ids)
lookupUsers
in interface UsersResourcesAsync
ids
- Specifies the screen names of the users to retrieve.public void lookupUsers(java.lang.String[] screenNames)
lookupUsers
in interface UsersResourcesAsync
screenNames
- Specifies the screen names of the users to retrieve.public void showUser(long userId)
showUser
in interface UsersResourcesAsync
userId
- the ID of the user for whom to request the retrievepublic void showUser(java.lang.String screenName)
showUser
in interface UsersResourcesAsync
screenName
- the screen name of the user for whom to request the detailpublic void searchUsers(java.lang.String query, int page)
searchUsers
in interface UsersResourcesAsync
query
- The query to run against people search.page
- Specifies the page of results to retrieve. Number of statuses per page is fixed to 20.public void getContributees(long userId)
getContributees
in interface UsersResourcesAsync
userId
- The user id of the user for whom to return results forpublic void getContributees(java.lang.String screenName)
getContributees
in interface UsersResourcesAsync
screenName
- The screen name of the user for whom to return results forpublic void getContributors(long userId)
getContributors
in interface UsersResourcesAsync
userId
- The user id of the user for whom to return results forpublic void getContributors(java.lang.String screenName)
getContributors
in interface UsersResourcesAsync
screenName
- The screen name of the user for whom to return results forpublic void removeProfileBanner()
removeProfileBanner
in interface UsersResourcesAsync
public void updateProfileBanner(java.io.File image)
updateProfileBanner
in interface UsersResourcesAsync
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.public void updateProfileBanner(java.io.InputStream image)
updateProfileBanner
in interface UsersResourcesAsync
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.public void getUserSuggestions(java.lang.String categorySlug)
getUserSuggestions
in interface SuggestedUsersResourcesAsync
categorySlug
- slugpublic void getSuggestedUserCategories()
getSuggestedUserCategories
in interface SuggestedUsersResourcesAsync
public void getMemberSuggestions(java.lang.String categorySlug)
getMemberSuggestions
in interface SuggestedUsersResourcesAsync
categorySlug
- slugpublic void getFavorites()
getFavorites
in interface FavoritesResourcesAsync
public void getFavorites(long userId)
getFavorites
in interface FavoritesResourcesAsync
userId
- the id of the user for whom to request a list of favorite statusespublic void getFavorites(java.lang.String screenName)
getFavorites
in interface FavoritesResourcesAsync
screenName
- the screen name of the user for whom to request a list of favorite statusespublic void getFavorites(Paging paging)
getFavorites
in interface FavoritesResourcesAsync
paging
- controls pagination. Supports sinceId and page parameters.public void getFavorites(long userId, Paging paging)
getFavorites
in interface FavoritesResourcesAsync
userId
- the id of the user for whom to request a list of favorite statusespaging
- controls pagination. Supports sinceId and page parameters.public void getFavorites(java.lang.String screenName, Paging paging)
getFavorites
in interface FavoritesResourcesAsync
screenName
- the screen name of the user for whom to request a list of favorite statusespaging
- controls pagination. Supports sinceId and page parameters.public void destroyFavorite(long id)
destroyFavorite
in interface FavoritesResourcesAsync
id
- the ID or screen name of the user for whom to request a list of un-favorite statuses.public void createFavorite(long id)
createFavorite
in interface FavoritesResourcesAsync
id
- the ID or screen name of the user for whom to request a list of favorite statuses.public void getUserLists(long listOwnerUserId)
getUserLists
in interface ListsResourcesAsync
listOwnerUserId
- The id of the list owner
returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserLists(java.lang.String listOwnerScreenName)
getUserLists
in interface ListsResourcesAsync
listOwnerScreenName
- The screen name of the list owner
as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListStatuses(int listId, Paging paging)
getUserListStatuses
in interface ListsResourcesAsync
listId
- The id of the listpaging
- controls pagination. Supports since_id, max_id, count and page parameters.public void getUserListStatuses(long ownerId, java.lang.String slug, Paging paging)
getUserListStatuses
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpaging
- controls pagination. Supports since_id, max_id, count and page parameters.public void destroyUserListMember(int listId, long userId)
destroyUserListMember
in interface ListsResourcesAsync
listId
- The id of the list.userId
- The screen name of the member you wish to remove from the list.public void deleteUserListMember(int listId, long userId)
deleteUserListMember
in interface ListsResourcesAsync
public void destroyUserListMember(long ownerId, java.lang.String slug, long userId)
destroyUserListMember
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The screen name of the member you wish to remove from the list.public void deleteUserListMember(long ownerId, java.lang.String slug, long userId)
deleteUserListMember
in interface ListsResourcesAsync
public void getUserListMemberships(long cursor)
getUserListMemberships
in interface ListsResourcesAsync
cursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListMemberships(java.lang.String listMemberScreenName, long cursor)
getUserListMemberships
in interface ListsResourcesAsync
listMemberScreenName
- The screen name of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListMemberships(long listMemberId, long cursor)
getUserListMemberships
in interface ListsResourcesAsync
listMemberId
- The id of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListMemberships(java.lang.String listMemberScreenName, long cursor, boolean filterToOwnedLists)
getUserListMemberships
in interface ListsResourcesAsync
listMemberScreenName
- The screen name of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.filterToOwnedLists
- Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.public void getUserListMemberships(long listMemberId, long cursor, boolean filterToOwnedLists)
getUserListMemberships
in interface ListsResourcesAsync
listMemberId
- The id of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.filterToOwnedLists
- Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.public void getUserListSubscribers(int listId, long cursor)
getUserListSubscribers
in interface ListsResourcesAsync
listId
- The id of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListSubscribers(long ownerId, java.lang.String slug, long cursor)
getUserListSubscribers
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void createUserListSubscription(int listId)
createUserListSubscription
in interface ListsResourcesAsync
listId
- The id of the list.public void createUserListSubscription(long ownerId, java.lang.String slug)
createUserListSubscription
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpublic void showUserListSubscription(int listId, long userId)
showUserListSubscription
in interface ListsResourcesAsync
listId
- The id of the list.userId
- The id of the user who you want to know is a member or not of the specified list.
, or the user is not a member of the specified list(TwitterException.getStatusCode() returns 404 in that case.)public void showUserListSubscription(long ownerId, java.lang.String slug, long userId)
showUserListSubscription
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The id of the user who you want to know is a member or not of the specified list.
, or the user is not a member of the specified list(TwitterException.getStatusCode() returns 404 in that case.)public void destroyUserListSubscription(int listId)
destroyUserListSubscription
in interface ListsResourcesAsync
listId
- The id of the list.public void destroyUserListSubscription(long ownerId, java.lang.String slug)
destroyUserListSubscription
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpublic void createUserListMembers(int listId, long[] userIds)
createUserListMembers
in interface ListsResourcesAsync
listId
- The id of the list.userIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.public void addUserListMembers(int listId, long[] userIds)
addUserListMembers
in interface ListsResourcesAsync
public void createUserListMembers(long ownerId, java.lang.String slug, long[] userIds)
createUserListMembers
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.public void addUserListMembers(long ownerId, java.lang.String slug, long[] userIds)
addUserListMembers
in interface ListsResourcesAsync
public void createUserListMembers(int listId, java.lang.String[] screenNames)
createUserListMembers
in interface ListsResourcesAsync
listId
- The id of the list.screenNames
- The array of screen names of the user to add as member of the list. up to 100 are allowed in a single request.public void addUserListMembers(int listId, java.lang.String[] screenNames)
addUserListMembers
in interface ListsResourcesAsync
public void createUserListMembers(long ownerId, java.lang.String slug, java.lang.String[] screenNames)
createUserListMembers
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listscreenNames
- The array of screen names of the user to add as member of the list. up to 100 are allowed in a single request.public void addUserListMembers(long ownerId, java.lang.String slug, java.lang.String[] screenNames)
addUserListMembers
in interface ListsResourcesAsync
public void showUserListMembership(int listId, long userId)
showUserListMembership
in interface ListsResourcesAsync
listId
- The id of the list.userId
- The id of the user who you want to know is a member or not of the specified list.public void showUserListMembership(long ownerId, java.lang.String slug, long userId)
showUserListMembership
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The id of the user who you want to know is a member or not of the specified list.
.getStatusCode() returns 404 in that case.)public void getUserListMembers(int listId, long cursor)
getUserListMembers
in interface ListsResourcesAsync
listId
- The id of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getUserListMembers(long ownerId, java.lang.String slug, long cursor)
getUserListMembers
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void createUserListMember(int listId, long userId)
createUserListMember
in interface ListsResourcesAsync
listId
- The id of the list.userId
- The id of the user to add as a member of the list.public void addUserListMember(int listId, long userId)
addUserListMember
in interface ListsResourcesAsync
public void createUserListMember(long ownerId, java.lang.String slug, long userId)
createUserListMember
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The id of the user to add as a member of the list.public void addUserListMember(long ownerId, java.lang.String slug, long userId)
addUserListMember
in interface ListsResourcesAsync
public void destroyUserList(int listId)
destroyUserList
in interface ListsResourcesAsync
listId
- The id of the list to deletepublic void destroyUserList(long ownerId, java.lang.String slug)
destroyUserList
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpublic void updateUserList(int listId, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription)
updateUserList
in interface ListsResourcesAsync
listId
- The id of the list to update.newListName
- What you'd like to change the list's name to.isPublicList
- Whether your list is public or private. Optional. Values can be public or private. Lists are public by default if no mode is specified.newDescription
- What you'd like to change the list description to.public void updateUserList(long ownerId, java.lang.String slug, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription)
updateUserList
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listnewListName
- What you'd like to change the list's name to.isPublicList
- Whether your list is public or private. Optional. Values can be public or private. Lists are public by default if no mode is specified.newDescription
- What you'd like to change the list description to.public void createUserList(java.lang.String listName, boolean isPublicList, java.lang.String description)
createUserList
in interface ListsResourcesAsync
listName
- The name of the list you are creating. Required.isPublicList
- set true if you wish to make a public listdescription
- The description of the list you are creating. Optional.public void showUserList(int listId)
showUserList
in interface ListsResourcesAsync
listId
- The id of the list to showpublic void showUserList(long ownerId, java.lang.String slug)
showUserList
in interface ListsResourcesAsync
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpublic void getUserListSubscriptions(java.lang.String listOwnerScreenName, long cursor)
getUserListSubscriptions
in interface ListsResourcesAsync
listOwnerScreenName
- The screen name of the list ownercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.public void getSavedSearches()
getSavedSearches
in interface SavedSearchesResourcesAsync
public void showSavedSearch(int id)
showSavedSearch
in interface SavedSearchesResourcesAsync
id
- The id of the saved search to be retrieved.public void createSavedSearch(java.lang.String query)
createSavedSearch
in interface SavedSearchesResourcesAsync
query
- the query stringpublic void destroySavedSearch(int id)
destroySavedSearch
in interface SavedSearchesResourcesAsync
id
- The id of the saved search to be deleted.public void getGeoDetails(java.lang.String id)
PlacesGeoResourcesAsync.reverseGeoCode(twitter4j.GeoQuery)
method.
getGeoDetails
in interface PlacesGeoResourcesAsync
id
- The ID of the location to query about.public void reverseGeoCode(GeoQuery query)
reverseGeoCode
in interface PlacesGeoResourcesAsync
query
- search querypublic void searchPlaces(GeoQuery query)
searchPlaces
in interface PlacesGeoResourcesAsync
query
- search querypublic void getSimilarPlaces(GeoLocation location, java.lang.String name, java.lang.String containedWithin, java.lang.String streetAddress)
PlacesGeoResourcesAsync
getSimilarPlaces
in interface PlacesGeoResourcesAsync
location
- The latitude and longitude to search around.name
- The name a place is known as.containedWithin
- optional: the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found.streetAddress
- optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes.public void createPlace(java.lang.String name, java.lang.String containedWithin, java.lang.String token, GeoLocation location, java.lang.String streetAddress)
PlacesGeoResourcesAsync
createPlace
in interface PlacesGeoResourcesAsync
name
- The name a place is known as.containedWithin
- The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id.token
- The token found in the response from geo/similar_places.location
- The latitude and longitude the place is located at.streetAddress
- optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes.public void getLocationTrends(int woeid)
getLocationTrends
in interface TrendsResourcesAsync
woeid
- The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.public void getPlaceTrends(int woeid)
getPlaceTrends
in interface TrendsResourcesAsync
woeid
- The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.public void getAvailableTrends()
getAvailableTrends
in interface TrendsResourcesAsync
public void getAvailableTrends(GeoLocation location)
getAvailableTrends
in interface TrendsResourcesAsync
location
- the available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest.public void getClosestTrends(GeoLocation location)
getClosestTrends
in interface TrendsResourcesAsync
location
- the available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest.public void reportSpam(long userId)
reportSpam
in interface SpamReportingResourceAsync
userId
- The ID of the user you want to report as a spammer.public void reportSpam(java.lang.String screenName)
reportSpam
in interface SpamReportingResourceAsync
screenName
- The screen name of the user you want to report as a spammer.public void getAPIConfiguration()
getAPIConfiguration
in interface HelpResourcesAsync
public void getLanguages()
getLanguages
in interface HelpResourcesAsync
public void getPrivacyPolicy()
getPrivacyPolicy
in interface HelpResourcesAsync
public void getTermsOfService()
getTermsOfService
in interface HelpResourcesAsync
public void getRateLimitStatus()
getRateLimitStatus
in interface HelpResourcesAsync
public void getRateLimitStatus(java.lang.String... resources)
getRateLimitStatus
in interface HelpResourcesAsync
public void getOAuthRequestTokenAsync()
public void getOAuthRequestTokenAsync(java.lang.String callbackURL)
getOAuthRequestTokenAsync
in interface AsyncOAuthSupport
callbackURL
- callback URLpublic void getOAuthRequestTokenAsync(java.lang.String callbackURL, java.lang.String xAuthAccessType)
getOAuthRequestTokenAsync
in interface AsyncOAuthSupport
callbackURL
- callback URLxAuthAccessType
- Overrides the access level an application requests to a users account. Supported values are read or write. This parameter is intended to allow a developer to register a read/write application but also request read only access when appropriate.public void getOAuthAccessTokenAsync()
public void getOAuthAccessTokenAsync(java.lang.String oauthVerifier)
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
oauthVerifier
- OAuth verifier. AKA pin.public void getOAuthAccessTokenAsync(RequestToken requestToken)
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
requestToken
- the request tokenpublic void getOAuthAccessTokenAsync(RequestToken requestToken, java.lang.String oauthVerifier)
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
requestToken
- the request tokenoauthVerifier
- OAuth verifier. AKA pin.public void getOAuthAccessTokenAsync(java.lang.String screenName, java.lang.String password)
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
screenName
- the screen namepassword
- the passwordpublic void shutdown()
shutdown
in interface TwitterBase
shutdown
in class TwitterBaseImpl
private twitter4j.internal.async.Dispatcher getDispatcher()
public void setOAuthConsumer(java.lang.String consumerKey, java.lang.String consumerSecret)
setOAuthConsumer
in interface OAuth2Support
setOAuthConsumer
in interface OAuthSupport
setOAuthConsumer
in class TwitterBaseImpl
consumerKey
- OAuth consumer keyconsumerSecret
- OAuth consumer secretpublic RequestToken getOAuthRequestToken() throws TwitterException
getOAuthRequestToken
in interface OAuthSupport
getOAuthRequestToken
in class TwitterBaseImpl
TwitterException
- when Twitter service or network is unavailablepublic RequestToken getOAuthRequestToken(java.lang.String callbackUrl) throws TwitterException
getOAuthRequestToken
in interface OAuthSupport
getOAuthRequestToken
in class TwitterBaseImpl
callbackUrl
- callback URLTwitterException
- when Twitter service or network is unavailablepublic AccessToken getOAuthAccessToken() throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
TwitterException
- When Twitter service or network is unavailable, when the user has not authorized, or when the client application is not permitted to use xAuthpublic AccessToken getOAuthAccessToken(java.lang.String oauthVerifier) throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
oauthVerifier
- OAuth verifier. AKA pin.java.lang.IllegalStateException
- when AccessToken has already been retrieved or setTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(RequestToken requestToken) throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
requestToken
- the request tokenjava.lang.IllegalStateException
- when AccessToken has already been retrieved or setTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(RequestToken requestToken, java.lang.String oauthVerifier) throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
requestToken
- the request tokenoauthVerifier
- OAuth verifier. AKA pin.java.lang.IllegalStateException
- when AccessToken has already been retrieved or setTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
setOAuthAccessToken
in interface OAuthSupport
setOAuthAccessToken
in class TwitterBaseImpl
accessToken
- accessTokenpublic AccessToken getOAuthAccessToken(java.lang.String screenName, java.lang.String password) throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
screenName
- the screen namepassword
- the passwordTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic OAuth2Token getOAuth2Token() throws TwitterException
getOAuth2Token
in interface OAuth2Support
getOAuth2Token
in class TwitterBaseImpl
TwitterException
- when Twitter service or network is unavailable, or connecting non-SSL endpoints.public void setOAuth2Token(OAuth2Token oauth2Token)
setOAuth2Token
in interface OAuth2Support
setOAuth2Token
in class TwitterBaseImpl
oauth2Token
- OAuth 2 Bearer tokenpublic void getOAuth2TokenAsync()
getOAuth2TokenAsync
in interface AsyncOAuth2Support
public void invalidateOAuth2Token() throws TwitterException
invalidateOAuth2Token
in interface OAuth2Support
invalidateOAuth2Token
in class TwitterBaseImpl
TwitterException
- when Twitter service or network is unavailable, or connecting non-SSL endpoints.public boolean equals(java.lang.Object o)
equals
in class TwitterBaseImpl
public int hashCode()
hashCode
in class TwitterBaseImpl
public java.lang.String toString()
toString
in class TwitterBaseImpl