class AsyncTwitterImpl extends TwitterBaseImpl implements AsyncTwitter
Modifier and Type | Class and Description |
---|---|
(package private) class |
AsyncTwitterImpl.AsyncTask |
Modifier and Type | Field and Description |
---|---|
private static Dispatcher |
dispatcher |
private java.util.List<TwitterListener> |
listeners |
private static Logger |
logger |
private static long |
serialVersionUID |
private Twitter |
twitter |
auth, conf, factory, http
Constructor and Description |
---|
AsyncTwitterImpl(Configuration conf,
Authorization auth) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(TwitterListener listener)
Adds twitter listener
|
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 |
createMute(long userId)
Mutes the user specified in the ID parameter as the authenticating user.
|
void |
createMute(java.lang.String screenName)
Mutes the user specified in the screen name parameter as the authenticating user.
|
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(long 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(long listId,
long... userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
createUserListMembers(long 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(long 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 |
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 |
destroyMute(long userId)
Un-mutes the user specified in the ID parameter as the authenticating user.
|
void |
destroyMute(java.lang.String screenName)
Un-mutes the user specified in the screen name parameter as the authenticating user.
|
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(long listId)
Deletes the specified list.
|
void |
destroyUserList(long ownerId,
java.lang.String slug)
Deletes the specified list.
|
void |
destroyUserListMember(long 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(long 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 |
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 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 |
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.
|
void |
getMutesIDs(long cursor)
Returns an array of numeric user ids the authenticating user is muting.
|
void |
getMutesList(long cursor)
Returns a list of user objects that the authenticating user is muting.
|
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 |
getOAuthRequestTokenAsync(java.lang.String callbackURL,
java.lang.String xAuthAccessType,
java.lang.String xAuthMode)
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(long 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(long 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(long 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 |
lookup(long... ids)
Returns fully-hydrated tweet objects for up to 100 tweets per request, as specified by comma-separated values passed to the id parameter.
|
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(long listId)
Show the specified list.
|
void |
showUserList(long ownerId,
java.lang.String slug)
Show the specified list.
|
void |
showUserListMembership(long 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(long 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 internal dispatcher thread shared across all AsyncTwitter instances.
|
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(long 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, fillInIDAndScreenName, getAuthorization, getConfiguration, getId, getOAuthRequestToken, getOAuthRequestToken, getScreenName, httpResponseReceived, onRateLimitReached, onRateLimitStatus, setFactory
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOAuthRequestToken, getOAuthRequestToken
addRateLimitStatusListener, getAuthorization, getConfiguration, getId, getScreenName, onRateLimitReached, onRateLimitStatus
private static final long serialVersionUID
private static final Logger logger
private final Twitter twitter
private final java.util.List<TwitterListener> listeners
private static transient volatile Dispatcher dispatcher
AsyncTwitterImpl(Configuration conf, Authorization auth)
public void addListener(TwitterListener listener)
AsyncTwitter
addListener
in interface AsyncTwitter
listener
- TwitterListenerpublic void getMentions()
TimelinesResourcesAsync
getMentions
in interface TimelinesResourcesAsync
public void getMentions(Paging paging)
TimelinesResourcesAsync
getMentions
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName, Paging paging)
TimelinesResourcesAsync
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)
TimelinesResourcesAsync
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)
TimelinesResourcesAsync
getUserTimeline
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName)
TimelinesResourcesAsync
getUserTimeline
in interface TimelinesResourcesAsync
screenName
- Specifies the screen name of the user for whom to return the user_timeline.public void getUserTimeline(long userId)
TimelinesResourcesAsync
getUserTimeline
in interface TimelinesResourcesAsync
userId
- Specifies the ID of the user for whom to return the user_timeline.public void getUserTimeline()
TimelinesResourcesAsync
getUserTimeline
in interface TimelinesResourcesAsync
public void getHomeTimeline()
TimelinesResourcesAsync
getHomeTimeline
in interface TimelinesResourcesAsync
public void getHomeTimeline(Paging paging)
TimelinesResourcesAsync
getHomeTimeline
in interface TimelinesResourcesAsync
paging
- controls paginationpublic void getRetweetsOfMe()
TimelinesResourcesAsync
getRetweetsOfMe
in interface TimelinesResourcesAsync
public void getRetweetsOfMe(Paging paging)
TimelinesResourcesAsync
getRetweetsOfMe
in interface TimelinesResourcesAsync
paging
- controls pagination. Supports since_id, max_id, count and page parameters.public void getRetweets(long statusId)
TweetsResourcesAsync
getRetweets
in interface TweetsResourcesAsync
statusId
- The numerical ID of the tweet you want the retweets of.public void showStatus(long id)
TweetsResourcesAsync
showStatus
in interface TweetsResourcesAsync
id
- intpublic void destroyStatus(long statusId)
TweetsResourcesAsync
destroyStatus
in interface TweetsResourcesAsync
statusId
- Stringpublic void updateStatus(java.lang.String statusText)
TweetsResourcesAsync
updateStatus
in interface TweetsResourcesAsync
statusText
- Stringpublic void updateStatus(StatusUpdate latestStatus)
TweetsResourcesAsync
updateStatus
in interface TweetsResourcesAsync
latestStatus
- the latest status to be updated.public void retweetStatus(long statusId)
TweetsResourcesAsync
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 lookup(long... ids)
TweetsResourcesAsync
lookup
in interface TweetsResourcesAsync
ids
- array of the ids to lookuppublic void search(Query query)
SearchResourceAsync
search
in interface SearchResourceAsync
query
- - the search conditionpublic void getDirectMessages()
DirectMessagesResourcesAsync
getDirectMessages
in interface DirectMessagesResourcesAsync
public void getDirectMessages(Paging paging)
DirectMessagesResourcesAsync
getDirectMessages
in interface DirectMessagesResourcesAsync
paging
- controls paginationpublic void getSentDirectMessages()
DirectMessagesResourcesAsync
getSentDirectMessages
in interface DirectMessagesResourcesAsync
public void getSentDirectMessages(Paging paging)
DirectMessagesResourcesAsync
getSentDirectMessages
in interface DirectMessagesResourcesAsync
paging
- controls paginationpublic void showDirectMessage(long id)
DirectMessagesResourcesAsync
showDirectMessage
in interface DirectMessagesResourcesAsync
id
- message idpublic void destroyDirectMessage(long id)
DirectMessagesResourcesAsync
destroyDirectMessage
in interface DirectMessagesResourcesAsync
id
- intpublic void sendDirectMessage(long userId, java.lang.String text)
DirectMessagesResourcesAsync
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)
DirectMessagesResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
lookupFriendships
in interface FriendsFollowersResourcesAsync
ids
- array of the ids to lookuppublic void lookupFriendships(java.lang.String... screenNames)
FriendsFollowersResourcesAsync
lookupFriendships
in interface FriendsFollowersResourcesAsync
screenNames
- array of the screen names to lookuppublic void getIncomingFriendships(long cursor)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
createFriendship
in interface FriendsFollowersResourcesAsync
userId
- the ID of the user to be befriendedpublic void createFriendship(java.lang.String screenName)
FriendsFollowersResourcesAsync
createFriendship
in interface FriendsFollowersResourcesAsync
screenName
- the screen name of the user to be befriendedpublic void createFriendship(long userId, boolean follow)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
destroyFriendship
in interface FriendsFollowersResourcesAsync
userId
- the screen name of the user to be befriendedpublic void destroyFriendship(java.lang.String screenName)
FriendsFollowersResourcesAsync
destroyFriendship
in interface FriendsFollowersResourcesAsync
screenName
- the screen name of the user to be befriendedpublic void updateFriendship(long userId, boolean enableDeviceNotification, boolean retweet)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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)
FriendsFollowersResourcesAsync
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()
UsersResourcesAsync
getAccountSettings
in interface UsersResourcesAsync
public void verifyCredentials()
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
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()
UsersResourcesAsync
getBlocksList
in interface UsersResourcesAsync
public void getBlocksList(long cursor)
UsersResourcesAsync
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()
UsersResourcesAsync
getBlocksIDs
in interface UsersResourcesAsync
public void getBlocksIDs(long cursor)
UsersResourcesAsync
getBlocksIDs
in interface UsersResourcesAsync
cursor
- cursorpublic void createBlock(long userId)
UsersResourcesAsync
createBlock
in interface UsersResourcesAsync
userId
- the screen_name of the user to blockpublic void createBlock(java.lang.String screenName)
UsersResourcesAsync
createBlock
in interface UsersResourcesAsync
screenName
- the screen_name of the user to blockpublic void destroyBlock(long userId)
UsersResourcesAsync
destroyBlock
in interface UsersResourcesAsync
userId
- the ID of the user to blockpublic void destroyBlock(java.lang.String screenName)
UsersResourcesAsync
destroyBlock
in interface UsersResourcesAsync
screenName
- the screen_name of the user to blockpublic void getMutesList(long cursor)
UsersResourcesAsync
getMutesList
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 getMutesIDs(long cursor)
UsersResourcesAsync
getMutesIDs
in interface UsersResourcesAsync
cursor
- Causes the list of muted 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 createMute(long userId)
UsersResourcesAsync
createMute
in interface UsersResourcesAsync
userId
- the ID of the user to mutepublic void createMute(java.lang.String screenName)
UsersResourcesAsync
createMute
in interface UsersResourcesAsync
screenName
- the screen_name of the user to mutepublic void destroyMute(long userId)
UsersResourcesAsync
destroyMute
in interface UsersResourcesAsync
userId
- the ID of the user to mutepublic void destroyMute(java.lang.String screenName)
UsersResourcesAsync
destroyMute
in interface UsersResourcesAsync
screenName
- the screen_name of the user to mutepublic void lookupUsers(long... ids)
UsersResourcesAsync
lookupUsers
in interface UsersResourcesAsync
ids
- Specifies the screen names of the users to retrieve.public void lookupUsers(java.lang.String... screenNames)
UsersResourcesAsync
lookupUsers
in interface UsersResourcesAsync
screenNames
- Specifies the screen names of the users to retrieve.public void showUser(long userId)
UsersResourcesAsync
showUser
in interface UsersResourcesAsync
userId
- the ID of the user for whom to request the retrievepublic void showUser(java.lang.String screenName)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
UsersResourcesAsync
getContributees
in interface UsersResourcesAsync
userId
- The user id of the user for whom to return results forpublic void getContributees(java.lang.String screenName)
UsersResourcesAsync
getContributees
in interface UsersResourcesAsync
screenName
- The screen name of the user for whom to return results forpublic void getContributors(long userId)
UsersResourcesAsync
getContributors
in interface UsersResourcesAsync
userId
- The user id of the user for whom to return results forpublic void getContributors(java.lang.String screenName)
UsersResourcesAsync
getContributors
in interface UsersResourcesAsync
screenName
- The screen name of the user for whom to return results forpublic void removeProfileBanner()
UsersResourcesAsync
removeProfileBanner
in interface UsersResourcesAsync
public void updateProfileBanner(java.io.File image)
UsersResourcesAsync
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)
UsersResourcesAsync
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)
SuggestedUsersResourcesAsync
getUserSuggestions
in interface SuggestedUsersResourcesAsync
categorySlug
- slugpublic void getSuggestedUserCategories()
SuggestedUsersResourcesAsync
getSuggestedUserCategories
in interface SuggestedUsersResourcesAsync
public void getMemberSuggestions(java.lang.String categorySlug)
SuggestedUsersResourcesAsync
getMemberSuggestions
in interface SuggestedUsersResourcesAsync
categorySlug
- slugpublic void getFavorites()
FavoritesResourcesAsync
getFavorites
in interface FavoritesResourcesAsync
public void getFavorites(long userId)
FavoritesResourcesAsync
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)
FavoritesResourcesAsync
getFavorites
in interface FavoritesResourcesAsync
screenName
- the screen name of the user for whom to request a list of favorite statusespublic void getFavorites(Paging paging)
FavoritesResourcesAsync
getFavorites
in interface FavoritesResourcesAsync
paging
- controls pagination. Supports sinceId and page parameters.public void getFavorites(long userId, Paging paging)
FavoritesResourcesAsync
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)
FavoritesResourcesAsync
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)
FavoritesResourcesAsync
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)
FavoritesResourcesAsync
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)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId, Paging paging)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId, long userId)
ListsResourcesAsync
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 destroyUserListMember(long ownerId, java.lang.String slug, long userId)
ListsResourcesAsync
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 getUserListMemberships(long cursor)
ListsResourcesAsync
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)
ListsResourcesAsync
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)
ListsResourcesAsync
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)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId, long cursor)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId)
ListsResourcesAsync
createUserListSubscription
in interface ListsResourcesAsync
listId
- The id of the list.public void createUserListSubscription(long ownerId, java.lang.String slug)
ListsResourcesAsync
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(long listId, long userId)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId)
ListsResourcesAsync
destroyUserListSubscription
in interface ListsResourcesAsync
listId
- The id of the list.public void destroyUserListSubscription(long ownerId, java.lang.String slug)
ListsResourcesAsync
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(long listId, long... userIds)
ListsResourcesAsync
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 createUserListMembers(long ownerId, java.lang.String slug, long... userIds)
ListsResourcesAsync
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 createUserListMembers(long listId, java.lang.String... screenNames)
ListsResourcesAsync
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 createUserListMembers(long ownerId, java.lang.String slug, java.lang.String... screenNames)
ListsResourcesAsync
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 showUserListMembership(long listId, long userId)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId, long cursor)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId, long userId)
ListsResourcesAsync
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 createUserListMember(long ownerId, java.lang.String slug, long userId)
ListsResourcesAsync
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 destroyUserList(long listId)
ListsResourcesAsync
destroyUserList
in interface ListsResourcesAsync
listId
- The id of the list to deletepublic void destroyUserList(long ownerId, java.lang.String slug)
ListsResourcesAsync
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(long listId, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription)
ListsResourcesAsync
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)
ListsResourcesAsync
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)
ListsResourcesAsync
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(long listId)
ListsResourcesAsync
showUserList
in interface ListsResourcesAsync
listId
- The id of the list to showpublic void showUserList(long ownerId, java.lang.String slug)
ListsResourcesAsync
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)
ListsResourcesAsync
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()
SavedSearchesResourcesAsync
getSavedSearches
in interface SavedSearchesResourcesAsync
public void showSavedSearch(int id)
SavedSearchesResourcesAsync
showSavedSearch
in interface SavedSearchesResourcesAsync
id
- The id of the saved search to be retrieved.public void createSavedSearch(java.lang.String query)
SavedSearchesResourcesAsync
createSavedSearch
in interface SavedSearchesResourcesAsync
query
- the query stringpublic void destroySavedSearch(int id)
SavedSearchesResourcesAsync
destroySavedSearch
in interface SavedSearchesResourcesAsync
id
- The id of the saved search to be deleted.public void getGeoDetails(java.lang.String id)
PlacesGeoResourcesAsync
PlacesGeoResourcesAsync.reverseGeoCode(twitter4j.GeoQuery)
method.
getGeoDetails
in interface PlacesGeoResourcesAsync
id
- The ID of the location to query about.public void reverseGeoCode(GeoQuery query)
PlacesGeoResourcesAsync
reverseGeoCode
in interface PlacesGeoResourcesAsync
query
- search querypublic void searchPlaces(GeoQuery query)
PlacesGeoResourcesAsync
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 getPlaceTrends(int woeid)
TrendsResourcesAsync
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()
TrendsResourcesAsync
getAvailableTrends
in interface TrendsResourcesAsync
public void getClosestTrends(GeoLocation location)
TrendsResourcesAsync
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)
SpamReportingResourceAsync
reportSpam
in interface SpamReportingResourceAsync
userId
- The ID of the user you want to report as a spammer.public void reportSpam(java.lang.String screenName)
SpamReportingResourceAsync
reportSpam
in interface SpamReportingResourceAsync
screenName
- The screen name of the user you want to report as a spammer.public void getAPIConfiguration()
HelpResourcesAsync
getAPIConfiguration
in interface HelpResourcesAsync
public void getLanguages()
HelpResourcesAsync
getLanguages
in interface HelpResourcesAsync
public void getPrivacyPolicy()
HelpResourcesAsync
getPrivacyPolicy
in interface HelpResourcesAsync
public void getTermsOfService()
HelpResourcesAsync
getTermsOfService
in interface HelpResourcesAsync
public void getRateLimitStatus()
HelpResourcesAsync
getRateLimitStatus
in interface HelpResourcesAsync
public void getRateLimitStatus(java.lang.String... resources)
HelpResourcesAsync
getRateLimitStatus
in interface HelpResourcesAsync
resources
- resourcespublic void getOAuthRequestTokenAsync()
AsyncOAuthSupport
public void getOAuthRequestTokenAsync(java.lang.String callbackURL)
AsyncOAuthSupport
getOAuthRequestTokenAsync
in interface AsyncOAuthSupport
callbackURL
- callback URLpublic void getOAuthRequestTokenAsync(java.lang.String callbackURL, java.lang.String xAuthAccessType)
AsyncOAuthSupport
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 getOAuthRequestTokenAsync(java.lang.String callbackURL, java.lang.String xAuthAccessType, java.lang.String xAuthMode)
AsyncOAuthSupport
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.xAuthMode
- Set to reverse_auth to obtain a special request token to be used in the reverse auth process.public void getOAuthAccessTokenAsync()
AsyncOAuthSupport
public void getOAuthAccessTokenAsync(java.lang.String oauthVerifier)
AsyncOAuthSupport
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
oauthVerifier
- OAuth verifier. AKA pin.public void getOAuthAccessTokenAsync(RequestToken requestToken)
AsyncOAuthSupport
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
requestToken
- the request tokenpublic void getOAuthAccessTokenAsync(RequestToken requestToken, java.lang.String oauthVerifier)
AsyncOAuthSupport
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
requestToken
- the request tokenoauthVerifier
- OAuth verifier. AKA pin.public void getOAuthAccessTokenAsync(java.lang.String screenName, java.lang.String password)
AsyncOAuthSupport
getOAuthAccessTokenAsync
in interface AsyncOAuthSupport
screenName
- the screen namepassword
- the passwordpublic void shutdown()
AsyncTwitter
shutdown
in interface AsyncTwitter
private Dispatcher getDispatcher()
public void setOAuthConsumer(java.lang.String consumerKey, java.lang.String consumerSecret)
OAuthSupport
setOAuthConsumer
in interface OAuth2Support
setOAuthConsumer
in interface OAuthSupport
setOAuthConsumer
in class TwitterBaseImpl
consumerKey
- OAuth consumer keyconsumerSecret
- OAuth consumer secretpublic RequestToken getOAuthRequestToken() throws TwitterException
OAuthSupport
getOAuthRequestToken
in interface OAuthSupport
getOAuthRequestToken
in class TwitterBaseImpl
TwitterException
- when Twitter service or network is unavailablepublic RequestToken getOAuthRequestToken(java.lang.String callbackUrl) throws TwitterException
OAuthSupport
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
OAuthSupport
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
oauthVerifier
- OAuth verifier. AKA pin.TwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(RequestToken requestToken) throws TwitterException
OAuthSupport
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
requestToken
- the request tokenTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(RequestToken requestToken, java.lang.String oauthVerifier) throws TwitterException
OAuthSupport
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterBaseImpl
requestToken
- the request tokenoauthVerifier
- OAuth verifier. AKA pin.TwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
OAuthSupport
setOAuthAccessToken
in interface OAuthSupport
setOAuthAccessToken
in class TwitterBaseImpl
accessToken
- accessTokenpublic AccessToken getOAuthAccessToken(java.lang.String screenName, java.lang.String password) throws TwitterException
OAuthSupport
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
OAuth2Support
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)
OAuth2Support
setOAuth2Token
in interface OAuth2Support
setOAuth2Token
in class TwitterBaseImpl
oauth2Token
- OAuth 2 Bearer tokenpublic void getOAuth2TokenAsync()
AsyncOAuth2Support
getOAuth2TokenAsync
in interface AsyncOAuth2Support
public void invalidateOAuth2Token() throws TwitterException
OAuth2Support
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