public class AsyncTwitter extends TwitterOAuthSupportBase implements java.io.Serializable, SearchMethodsAsync, TrendsMethodsAsync, TimelineMethodsAsync, StatusMethodsAsync, UserMethodsAsync, ListMethodsAsync, ListMembersMethodsAsync, ListSubscribersMethodsAsync, DirectMessageMethodsAsync, FriendshipMethodsAsync, FriendsFollowersMethodsAsync, AccountMethodsAsync, FavoriteMethodsAsync, NotificationMethodsAsync, BlockMethodsAsync, SpamReportingMethodsAsync, SavedSearchesMethodsAsync, LocalTrendsMethodsAsync, GeoMethodsAsync, LegalResourcesAsync, NewTwitterMethodsAsync, HelpMethodsAsync
AsyncTwitter
,
TwitterListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
(package private) class |
AsyncTwitter.AsyncTask |
Modifier and Type | Field and Description |
---|---|
private static twitter4j.internal.async.Dispatcher |
dispatcher |
private TwitterListener |
listener |
private static long |
serialVersionUID |
private boolean |
shutdown |
private Twitter |
twitter |
http, rateLimitStatusListener
auth, conf
Constructor and Description |
---|
AsyncTwitter(Configuration conf,
Authorization auth,
TwitterListener listener) |
AsyncTwitter(java.lang.String screenName,
java.lang.String password,
TwitterListener listener)
Deprecated.
use
AsyncTwitterFactory.getInstance(String,String) instead. |
Modifier and Type | Method and Description |
---|---|
void |
addUserListMember(int listId,
int userId)
Adds a member to a list.
|
void |
addUserListMembers(int listId,
int[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
void |
addUserListMembers(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 |
checkUserListMembership(java.lang.String listOwnerScreenName,
int listId,
int userId)
Check if a user is a member of the specified list.
This method calls http://api.twitter.com/1/[listOwner]/[listId]/members/id.json |
void |
checkUserListSubscription(java.lang.String listOwnerScreenName,
int listId,
int userId)
Check if the specified user is a subscriber of the specified list.
|
void |
createBlock(int 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(int 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(int 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 |
createUserList(java.lang.String listName,
boolean isPublicList,
java.lang.String description)
Creates a new list for the authenticated user.
|
void |
deleteUserListMember(int listId,
int userId)
Removes the specified member from the list.
|
void |
destroyBlock(int 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(int 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(int 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 |
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 |
disableNotification(int userId)
Disables notifications for updates from the specified user to the authenticating user.
|
void |
disableNotification(java.lang.String screenName)
Disables notifications for updates from the specified user to the authenticating user.
|
void |
enableNotification(int userId)
Enables notifications for updates from the specified user to the authenticating user.
|
void |
enableNotification(java.lang.String screenName)
Enables notifications for updates from the specified user to the authenticating user.
|
void |
existsBlock(int userId)
Returns if the authenticating user is blocking a target user.
|
void |
existsBlock(java.lang.String screenName)
Returns if the authenticating user is blocking a target user.
|
void |
existsFriendship(java.lang.String userA,
java.lang.String userB)
Tests for the existence of friendship between two users.
|
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 |
getBlockingUsers()
Returns a list of user objects that the authenticating user is blocking.
|
void |
getBlockingUsers(int page)
Returns a list of user objects that the authenticating user is blocking.
|
void |
getBlockingUsersIDs()
Returns an array of numeric user ids the authenticating user is blocking.
|
void |
getCurrentTrends()
Returns the current top 10 trending topics on Twitter.
|
void |
getCurrentTrends(boolean excludeHashTags)
Returns the current top 10 trending topics on Twitter.
|
void |
getDailyTrends()
Returns the top 20 trending topics for each hour in a given day.
|
void |
getDailyTrends(java.util.Date date,
boolean excludeHashTags)
Returns the top 20 trending topics for each hour in a given day.
|
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(int page)
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 id)
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 id,
int page)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
void |
getFollowersIDs()
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(int userId)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(int userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
void |
getFollowersIDs(java.lang.String screenName)
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 |
getFollowersStatuses()
Returns the authenticating user's followers, each with current status inline.
|
void |
getFollowersStatuses(int userId)
Returns the specified user's followers, each with current status inline.
|
void |
getFollowersStatuses(int userId,
long cursor)
Returns the specified user's followers, each with current status inline.
|
void |
getFollowersStatuses(long cursor)
Returns the authenticating user's followers, each with current status inline.
|
void |
getFollowersStatuses(java.lang.String screenName)
Returns the specified user's followers, each with current status inline.
|
void |
getFollowersStatuses(java.lang.String screenName,
long cursor)
Returns the specified user's followers, each with current status inline.
|
void |
getFriendsIDs()
Returns an array of numeric IDs for every user the authenticating user is following.
|
void |
getFriendsIDs(int userId)
Returns an array of numeric IDs for every user the specified user is following.
|
void |
getFriendsIDs(int userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is following.
|
void |
getFriendsIDs(long cursor)
Returns an array of numeric IDs for every user the authenticating user is following.
|
void |
getFriendsIDs(java.lang.String screenName)
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 |
getFriendsStatuses()
Returns the specified user's friends, each with current status inline.
|
void |
getFriendsStatuses(int userId)
Returns a user's friends, each with current status inline.
|
void |
getFriendsStatuses(int userId,
long cursor)
Returns a user's friends, each with current status inline.
|
void |
getFriendsStatuses(long cursor)
Returns a user's friends, each with current status inline.
|
void |
getFriendsStatuses(java.lang.String screenName)
Returns a user's friends, each with current status inline.
|
void |
getFriendsStatuses(java.lang.String screenName,
long cursor)
Returns a user's friends, each with current status inline.
|
void |
getFriendsTimeline()
Returns the 20 most recent statuses posted by the authenticating user and that user's friends.
|
void |
getFriendsTimeline(Paging paging)
Returns the 20 most recent statuses posted by the authenticating user and that user's friends.
|
void |
getGeoDetails(java.lang.String id)
Find out more details of a place that was returned from the
GeoMethodsAsync.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.
|
int |
getId()
Returns authenticating user's user id.
This method may internally call verifyCredentials() on the first invocation if - this instance is authenticated by Basic and email address is supplied instead of screen name, or - this instance is authenticated by OAuth. |
void |
getIncomingFriendships(long cursor)
Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
|
void |
getLocationTrends(int woeid)
Retrieves the top 10 trending topics for a specific location Twitter has trending topic information for.
|
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 |
getNearbyPlaces(GeoQuery query)
Search for places (cities and neighborhoods) that can be attached to a statuses/update.
|
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 token,
java.lang.String tokenSecret)
Deprecated.
|
AccessToken |
getOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret,
java.lang.String pin)
Retrieves an access token associated with the supplied request token.
|
RequestToken |
getOAuthRequestToken()
Retrieves a request token
|
RequestToken |
getOAuthRequestToken(java.lang.String callbackUrl)
Retrieves a request token
|
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 |
getPrivacyPolicy()
Returns Twitter's Privacy Policy.
|
void |
getProfileImage(java.lang.String screenName,
ProfileImage.ImageSize size)
Access the profile image in various sizes for the user with the indicated screen_name.
|
void |
getPublicTimeline()
Returns the 20 most recent statuses from non-protected users who have set a custom user icon.
|
void |
getRateLimitStatus()
Gets the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
|
void |
getRelatedResults(long statusId)
If available, returns an array of replies and mentions related to the specified Tweet.
|
void |
getRetweetedBy(long statusId)
Show user objects of up to 100 members who retweeted the status.
|
void |
getRetweetedBy(long statusId,
Paging paging)
Show user objects of up to 100 members who retweeted the status.
|
void |
getRetweetedByIDs(long statusId)
Show user ids of up to 100 users who retweeted the status represented by id
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format |
void |
getRetweetedByIDs(long statusId,
Paging paging)
Show user ids of up to 100 users who retweeted the status.
|
void |
getRetweetedByMe()
Returns the 20 most recent retweets posted by the authenticating user.
|
void |
getRetweetedByMe(Paging paging)
Returns the 20 most recent retweets posted by the authenticating user.
|
void |
getRetweetedToMe()
Returns the 20 most recent retweets posted by the authenticating user's friends.
|
void |
getRetweetedToMe(Paging paging)
Returns the 20 most recent retweets posted by the authenticating user's friends.
|
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.
|
java.lang.String |
getScreenName()
Returns authenticating user's screen name.
This method may internally call verifyCredentials() on the first invocation if - this instance is authenticated by Basic and email address is supplied instead of screen name, or - this instance is authenticated by OAuth. Note that this method returns a transiently cached (will be lost upon serialization) screen name while it is possible to change a user's screen name. |
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 |
getTrends()
Returns the top ten topics that are currently trending on Twitter.
|
void |
getUserListMembers(java.lang.String listOwnerScreenName,
int listId,
long cursor)
Returns the members of the specified list.
|
void |
getUserListMemberships(java.lang.String listMemberScreenName,
long cursor)
List the lists the specified user has been added to.
|
void |
getUserLists(java.lang.String listOwnerScreenName,
long cursor)
List the lists of the specified user.
|
void |
getUserListStatuses(java.lang.String listOwnerScreenName,
int id,
Paging paging)
Show tweet timeline for members of the specified list.
|
void |
getUserListSubscribers(java.lang.String listOwnerScreenName,
int listId,
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(int userId)
Returns the 20 most recent statuses posted from the authenticating user.
|
void |
getUserTimeline(int 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.
|
void |
getWeeklyTrends()
Returns the top 30 trending topics for each day in a given week.
|
void |
getWeeklyTrends(java.util.Date date,
boolean excludeHashTags)
Returns the top 30 trending topics for each day in a given week.
|
void |
lookupUsers(int[] 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 |
reportSpam(int 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(int 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 |
setOAuthAccessToken(AccessToken accessToken)
Deprecated.
|
void |
setOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret)
Deprecated.
|
void |
setOAuthConsumer(java.lang.String consumerKey,
java.lang.String consumerSecret)
sets the OAuth consumer key and consumer secret
|
void |
showFriendship(int sourceId,
int 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 |
showStatus(long id)
Returns a single status, specified by the id parameter below.
|
void |
showUser(int 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(java.lang.String listOwnerScreenName,
int id)
Show the specified list.
|
void |
shutdown()
Shuts down internal dispatcher thread.
|
void |
subscribeUserList(java.lang.String listOwnerScreenName,
int listId)
Make the authenticated user follow the specified list.
|
void |
test()
Returns the string "ok" in the requested format with a 200 OK HTTP status code.
|
void |
unsubscribeUserList(java.lang.String listOwnerScreenName,
int listId)
Unsubscribes the authenticated user form the specified list.
|
void |
updateDeliveryDevice(Device device)
Sets which device Twitter delivers updates to for the authenticating 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 |
updateProfile(java.lang.String name,
java.lang.String email,
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 |
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 |
updateStatus(StatusUpdate latestStatus)
Updates the authenticating user's status.
|
void |
updateStatus(java.lang.String status)
Updates the authenticating user's status.
|
void |
updateStatus(java.lang.String status,
GeoLocation location)
Updates the authenticating user's status.
|
void |
updateStatus(java.lang.String status,
long inReplyToStatusId)
Updates the authenticating user's status.
|
void |
updateStatus(java.lang.String status,
long inReplyToStatusId,
GeoLocation location)
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 |
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.
|
equals, hashCode, httpResponseReceived, isOAuthEnabled, setRateLimitStatusListener
ensureAuthorizationEnabled, ensureOAuthEnabled, getAuthorization, getConfiguration, isBasicAuthEnabled, toString
private static final long serialVersionUID
private Twitter twitter
private TwitterListener listener
private static transient twitter4j.internal.async.Dispatcher dispatcher
private boolean shutdown
public AsyncTwitter(java.lang.String screenName, java.lang.String password, TwitterListener listener)
AsyncTwitterFactory.getInstance(String,String)
instead.screenName
- screen namepassword
- passwordlistener
- listenerAsyncTwitter(Configuration conf, Authorization auth, TwitterListener listener)
public java.lang.String getScreenName() throws TwitterException, java.lang.IllegalStateException
TwitterException
- when verifyCredentials threw an exception.java.lang.IllegalStateException
- if no credentials are supplied. i.e.) this is an anonymous Twitter instancepublic int getId() throws TwitterException, java.lang.IllegalStateException
TwitterException
- when verifyCredentials threw an exception.java.lang.IllegalStateException
- if no credentials are supplied. i.e.) this is an anonymous Twitter instancepublic void search(Query query)
search
in interface SearchMethodsAsync
query
- - the search conditionpublic void getTrends()
getTrends
in interface TrendsMethodsAsync
public void getCurrentTrends()
getCurrentTrends
in interface TrendsMethodsAsync
public void getCurrentTrends(boolean excludeHashTags)
getCurrentTrends
in interface TrendsMethodsAsync
excludeHashTags
- Setting this to true will remove all hashtags from the trends list.public void getDailyTrends()
getDailyTrends
in interface TrendsMethodsAsync
public void getDailyTrends(java.util.Date date, boolean excludeHashTags)
getDailyTrends
in interface TrendsMethodsAsync
date
- Permits specifying a start date for the report.excludeHashTags
- Setting this to true will remove all hashtags from the trends list.public void getWeeklyTrends()
getWeeklyTrends
in interface TrendsMethodsAsync
public void getWeeklyTrends(java.util.Date date, boolean excludeHashTags)
getWeeklyTrends
in interface TrendsMethodsAsync
date
- Permits specifying a start date for the report.excludeHashTags
- Setting this to true will remove all hashtags from the trends list.public void getPublicTimeline()
getPublicTimeline
in interface TimelineMethodsAsync
public void getHomeTimeline()
getHomeTimeline
in interface TimelineMethodsAsync
public void getHomeTimeline(Paging paging)
getHomeTimeline
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getFriendsTimeline()
getFriendsTimeline
in interface TimelineMethodsAsync
public void getFriendsTimeline(Paging paging)
getFriendsTimeline
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName, Paging paging)
getUserTimeline
in interface TimelineMethodsAsync
screenName
- Specifies the screen name of the user for whom to return the user_timeline.paging
- controls paginationpublic void getUserTimeline(int userId, Paging paging)
getUserTimeline
in interface TimelineMethodsAsync
userId
- Specifies the ID of the user for whom to return the user_timeline.paging
- controls paginationpublic void getUserTimeline(Paging paging)
getUserTimeline
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getUserTimeline(java.lang.String screenName)
getUserTimeline
in interface TimelineMethodsAsync
screenName
- Specifies the screen name of the user for whom to return the user_timeline.public void getUserTimeline(int userId)
getUserTimeline
in interface TimelineMethodsAsync
userId
- Specifies the ID of the user for whom to return the user_timeline.public void getUserTimeline()
getUserTimeline
in interface TimelineMethodsAsync
public void getMentions()
getMentions
in interface TimelineMethodsAsync
public void getMentions(Paging paging)
getMentions
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getRetweetedByMe()
getRetweetedByMe
in interface TimelineMethodsAsync
public void getRetweetedByMe(Paging paging)
getRetweetedByMe
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getRetweetedToMe()
getRetweetedToMe
in interface TimelineMethodsAsync
public void getRetweetedToMe(Paging paging)
getRetweetedToMe
in interface TimelineMethodsAsync
paging
- controls paginationpublic void getRetweetsOfMe()
getRetweetsOfMe
in interface TimelineMethodsAsync
public void getRetweetsOfMe(Paging paging)
getRetweetsOfMe
in interface TimelineMethodsAsync
paging
- controls paginationpublic void showStatus(long id)
showStatus
in interface StatusMethodsAsync
id
- intpublic void updateStatus(java.lang.String status)
updateStatus
in interface StatusMethodsAsync
status
- Stringpublic void updateStatus(java.lang.String status, GeoLocation location)
updateStatus
in interface StatusMethodsAsync
status
- the text of your status updatelocation
- The location that this tweet refers to.public void updateStatus(java.lang.String status, long inReplyToStatusId)
updateStatus
in interface StatusMethodsAsync
status
- StringinReplyToStatusId
- The ID of an existing status that the status to be posted is in reply to. This implicitly sets the in_reply_to_user_id attribute of the resulting status to the user ID of the message being replied to. Invalid/missing status IDs will be ignored.public void updateStatus(java.lang.String status, long inReplyToStatusId, GeoLocation location)
updateStatus
in interface StatusMethodsAsync
status
- the text of your status updateinReplyToStatusId
- The ID of an existing status that the status to be posted is in reply to. This implicitly sets the in_reply_to_user_id attribute of the resulting status to the user ID of the message being replied to. Invalid/missing status IDs will be ignored.location
- The location that this tweet refers to.public void updateStatus(StatusUpdate latestStatus)
updateStatus
in interface StatusMethodsAsync
latestStatus
- the latest status to be updated.public void destroyStatus(long statusId)
destroyStatus
in interface StatusMethodsAsync
statusId
- Stringpublic void retweetStatus(long statusId)
retweetStatus
in interface StatusMethodsAsync
statusId
- The ID of the status to retweet.public void getRetweets(long statusId)
getRetweets
in interface StatusMethodsAsync
statusId
- The numerical ID of the tweet you want the retweets of.public void getRetweetedBy(long statusId)
getRetweetedBy
in interface StatusMethodsAsync
statusId
- The ID of the status you want to get retweeters ofpublic void getRetweetedBy(long statusId, Paging paging)
getRetweetedBy
in interface StatusMethodsAsync
statusId
- The ID of the status you want to get retweeters ofpaging
- specify your paging requirementspublic void getRetweetedByIDs(long statusId)
getRetweetedByIDs
in interface StatusMethodsAsync
statusId
- The ID of the status you want to get retweeters ofpublic void getRetweetedByIDs(long statusId, Paging paging)
getRetweetedByIDs
in interface StatusMethodsAsync
statusId
- The ID of the status you want to get retweeters ofpaging
- specify your paging requirementspublic void showUser(java.lang.String screenName)
showUser
in interface UserMethodsAsync
screenName
- the screen name of the user for whom to request the detailpublic void showUser(int userId)
showUser
in interface UserMethodsAsync
userId
- the ID of the user for whom to request the retrievepublic void lookupUsers(java.lang.String[] screenNames)
lookupUsers
in interface UserMethodsAsync
screenNames
- Specifies the screen names of the users to retrieve.public void lookupUsers(int[] ids)
lookupUsers
in interface UserMethodsAsync
ids
- Specifies the screen names of the users to retrieve.public void searchUsers(java.lang.String query, int page)
searchUsers
in interface UserMethodsAsync
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 getSuggestedUserCategories()
getSuggestedUserCategories
in interface UserMethodsAsync
public void getUserSuggestions(java.lang.String categorySlug)
getUserSuggestions
in interface UserMethodsAsync
categorySlug
- slugpublic void getProfileImage(java.lang.String screenName, ProfileImage.ImageSize size)
getProfileImage
in interface UserMethodsAsync
screenName
- The screen name of the user for whom to return results for.size
- Specifies the size of image to fetch. Not specifying a size will give the default, normal size of 48px by 48px. Valid options include: BIGGER - 73px by 73px NORMAL - 48px by 48px MINI - 24px by 24pxpublic void getFriendsStatuses()
getFriendsStatuses
in interface UserMethodsAsync
public void getFriendsStatuses(long cursor)
getFriendsStatuses
in interface UserMethodsAsync
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 getFriendsStatuses(java.lang.String screenName)
getFriendsStatuses
in interface UserMethodsAsync
screenName
- the screen name of the user for whom to request a list of friendspublic void getFriendsStatuses(int userId)
getFriendsStatuses
in interface UserMethodsAsync
userId
- the ID of the user for whom to request a list of friendspublic void getFriendsStatuses(java.lang.String screenName, long cursor)
getFriendsStatuses
in interface UserMethodsAsync
screenName
- the screen name of the user for whom to request a list of friendscursor
- 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 getFriendsStatuses(int userId, long cursor)
getFriendsStatuses
in interface UserMethodsAsync
userId
- the screen name of the user for whom to request a list of friendscursor
- 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 getFollowersStatuses()
getFollowersStatuses
in interface UserMethodsAsync
public void getFollowersStatuses(long cursor)
getFollowersStatuses
in interface UserMethodsAsync
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 getFollowersStatuses(java.lang.String screenName)
getFollowersStatuses
in interface UserMethodsAsync
screenName
- The screen name of the user for whom to request a list of followers.public void getFollowersStatuses(int userId)
getFollowersStatuses
in interface UserMethodsAsync
userId
- The ID of the user for whom to request a list of followers.public void getFollowersStatuses(java.lang.String screenName, long cursor)
getFollowersStatuses
in interface UserMethodsAsync
screenName
- The screen name of the user for whom to request a list of followers.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 getFollowersStatuses(int userId, long cursor)
getFollowersStatuses
in interface UserMethodsAsync
userId
- The ID of the user for whom to request a list of followers.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 createUserList(java.lang.String listName, boolean isPublicList, java.lang.String description)
createUserList
in interface ListMethodsAsync
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 updateUserList(int listId, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription)
updateUserList
in interface ListMethodsAsync
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 getUserLists(java.lang.String listOwnerScreenName, long cursor)
getUserLists
in interface ListMethodsAsync
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 showUserList(java.lang.String listOwnerScreenName, int id)
showUserList
in interface ListMethodsAsync
listOwnerScreenName
- The screen name of the list ownerid
- The id of the list to showpublic void destroyUserList(int listId)
destroyUserList
in interface ListMethodsAsync
listId
- The id of the list to deletepublic void getUserListStatuses(java.lang.String listOwnerScreenName, int id, Paging paging)
getUserListStatuses
in interface ListMethodsAsync
listOwnerScreenName
- The screen name of the list ownerid
- The id of the list to deletepaging
- controls pagination. Supports since_id, max_id, count and page parameters.public void getUserListMemberships(java.lang.String listMemberScreenName, long cursor)
getUserListMemberships
in interface ListMethodsAsync
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 getUserListSubscriptions(java.lang.String listOwnerScreenName, long cursor)
getUserListSubscriptions
in interface ListMethodsAsync
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 getUserListMembers(java.lang.String listOwnerScreenName, int listId, long cursor)
getUserListMembers
in interface ListMembersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- 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 addUserListMember(int listId, int userId)
addUserListMember
in interface ListMembersMethodsAsync
listId
- The id of the list.userId
- The id of the user to add as a member of the list.public void addUserListMembers(int listId, int[] userIds)
addUserListMembers
in interface ListMembersMethodsAsync
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, java.lang.String[] screenNames)
addUserListMembers
in interface ListMembersMethodsAsync
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 deleteUserListMember(int listId, int userId)
deleteUserListMember
in interface ListMembersMethodsAsync
listId
- The id of the list.userId
- The screen name of the member you wish to remove from the list.public void checkUserListMembership(java.lang.String listOwnerScreenName, int listId, int userId)
checkUserListMembership
in interface ListMembersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- 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 getUserListSubscribers(java.lang.String listOwnerScreenName, int listId, long cursor)
getUserListSubscribers
in interface ListSubscribersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- 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 subscribeUserList(java.lang.String listOwnerScreenName, int listId)
subscribeUserList
in interface ListSubscribersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- The id of the list.public void unsubscribeUserList(java.lang.String listOwnerScreenName, int listId)
unsubscribeUserList
in interface ListSubscribersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- The id of the list.public void checkUserListSubscription(java.lang.String listOwnerScreenName, int listId, int userId)
checkUserListSubscription
in interface ListSubscribersMethodsAsync
listOwnerScreenName
- The screen name of the list ownerlistId
- 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 getDirectMessages()
getDirectMessages
in interface DirectMessageMethodsAsync
public void getDirectMessages(Paging paging)
getDirectMessages
in interface DirectMessageMethodsAsync
paging
- controls paginationpublic void getSentDirectMessages()
getSentDirectMessages
in interface DirectMessageMethodsAsync
public void getSentDirectMessages(Paging paging)
getSentDirectMessages
in interface DirectMessageMethodsAsync
paging
- controls paginationpublic void sendDirectMessage(java.lang.String screenName, java.lang.String text)
sendDirectMessage
in interface DirectMessageMethodsAsync
screenName
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.public void sendDirectMessage(int userId, java.lang.String text)
sendDirectMessage
in interface DirectMessageMethodsAsync
userId
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.public void destroyDirectMessage(int id)
destroyDirectMessage
in interface DirectMessageMethodsAsync
id
- intpublic void createFriendship(java.lang.String screenName)
createFriendship
in interface FriendshipMethodsAsync
screenName
- the screen name of the user to be befriendedpublic void createFriendship(int userId)
createFriendship
in interface FriendshipMethodsAsync
userId
- the ID of the user to be befriendedpublic void createFriendship(java.lang.String screenName, boolean follow)
createFriendship
in interface FriendshipMethodsAsync
screenName
- the screen name of the user to be befriendedfollow
- Enable notifications for the target user in addition to becoming friends.public void createFriendship(int userId, boolean follow)
createFriendship
in interface FriendshipMethodsAsync
userId
- the ID of the user to be befriendedfollow
- Enable notifications for the target user in addition to becoming friends.public void destroyFriendship(java.lang.String screenName)
destroyFriendship
in interface FriendshipMethodsAsync
screenName
- the screen name of the user to be befriendedpublic void destroyFriendship(int userId)
destroyFriendship
in interface FriendshipMethodsAsync
userId
- the screen name of the user to be befriendedpublic void existsFriendship(java.lang.String userA, java.lang.String userB)
existsFriendship
in interface FriendshipMethodsAsync
userA
- The ID or screen_name of the first user to test friendship for.userB
- The ID or screen_name of the second user to test friendship for.public void showFriendship(java.lang.String sourceScreenName, java.lang.String targetScreenName)
showFriendship
in interface FriendshipMethodsAsync
sourceScreenName
- the screen name of the source usertargetScreenName
- the screen name of the target userpublic void showFriendship(int sourceId, int targetId)
showFriendship
in interface FriendshipMethodsAsync
sourceId
- the screen ID of the source usertargetId
- the screen ID of the target userpublic void getIncomingFriendships(long cursor)
getIncomingFriendships
in interface FriendshipMethodsAsync
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 FriendshipMethodsAsync
cursor
- Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.public void getFriendsIDs()
getFriendsIDs
in interface FriendsFollowersMethodsAsync
public void getFriendsIDs(long cursor)
getFriendsIDs
in interface FriendsFollowersMethodsAsync
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(int userId)
getFriendsIDs
in interface FriendsFollowersMethodsAsync
userId
- Specifies the ID of the user for whom to return the friends list.public void getFriendsIDs(int userId, long cursor)
getFriendsIDs
in interface FriendsFollowersMethodsAsync
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)
getFriendsIDs
in interface FriendsFollowersMethodsAsync
screenName
- Specifies the screen name of the user for whom to return the friends list.public void getFriendsIDs(java.lang.String screenName, long cursor)
getFriendsIDs
in interface FriendsFollowersMethodsAsync
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()
getFollowersIDs
in interface FriendsFollowersMethodsAsync
public void getFollowersIDs(long cursor)
getFollowersIDs
in interface FriendsFollowersMethodsAsync
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(int userId)
getFollowersIDs
in interface FriendsFollowersMethodsAsync
userId
- Specifies the ID of the user for whom to return the followers list.public void getFollowersIDs(int userId, long cursor)
getFollowersIDs
in interface FriendsFollowersMethodsAsync
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)
getFollowersIDs
in interface FriendsFollowersMethodsAsync
screenName
- Specifies the screen name of the user for whom to return the followers list.public void getFollowersIDs(java.lang.String screenName, long cursor)
getFollowersIDs
in interface FriendsFollowersMethodsAsync
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 verifyCredentials()
verifyCredentials
in interface AccountMethodsAsync
public void updateProfile(java.lang.String name, java.lang.String email, java.lang.String url, java.lang.String location, java.lang.String description)
updateProfile
in interface AccountMethodsAsync
name
- Optional. Maximum of 20 characters.email
- Optional. Maximum of 40 characters. Must be a valid email address.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 updateProfile(java.lang.String name, java.lang.String url, java.lang.String location, java.lang.String description)
updateProfile
in interface AccountMethodsAsync
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 getRateLimitStatus()
getRateLimitStatus
in interface AccountMethodsAsync
public void updateDeliveryDevice(Device device)
updateDeliveryDevice
in interface AccountMethodsAsync
device
- new Delivery device. Must be one of: IM, SMS, NONE.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 AccountMethodsAsync
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 AccountMethodsAsync
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 updateProfileBackgroundImage(java.io.File image, boolean tile)
updateProfileBackgroundImage
in interface AccountMethodsAsync
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 getFavorites()
getFavorites
in interface FavoriteMethodsAsync
public void getFavorites(int page)
getFavorites
in interface FavoriteMethodsAsync
page
- number of page to retrieve favoritespublic void getFavorites(java.lang.String id)
getFavorites
in interface FavoriteMethodsAsync
id
- the ID or screen name of the user for whom to request a list of favorite statusespublic void getFavorites(java.lang.String id, int page)
getFavorites
in interface FavoriteMethodsAsync
id
- the ID or screen name of the user for whom to request a list of favorite statuses.page
- retrieves the 20 next most recent favorite statuses.public void createFavorite(long id)
createFavorite
in interface FavoriteMethodsAsync
id
- the ID or screen name of the user for whom to request a list of favorite statuses.public void destroyFavorite(long id)
destroyFavorite
in interface FavoriteMethodsAsync
id
- the ID or screen name of the user for whom to request a list of un-favorite statuses.public void enableNotification(java.lang.String screenName)
enableNotification
in interface NotificationMethodsAsync
screenName
- Specifies the screen name of the user to follow with device updates.public void enableNotification(int userId)
enableNotification
in interface NotificationMethodsAsync
userId
- Specifies the ID of the user to follow with device updates.public void disableNotification(java.lang.String screenName)
disableNotification
in interface NotificationMethodsAsync
screenName
- Specifies the screen name of the user to disable device notifications.public void disableNotification(int userId)
disableNotification
in interface NotificationMethodsAsync
userId
- Specifies the ID of the user to disable device notifications.public void createBlock(java.lang.String screenName)
createBlock
in interface BlockMethodsAsync
screenName
- the screen_name of the user to blockpublic void createBlock(int userId)
createBlock
in interface BlockMethodsAsync
userId
- the screen_name of the user to blockpublic void destroyBlock(java.lang.String screenName)
destroyBlock
in interface BlockMethodsAsync
screenName
- the screen_name of the user to blockpublic void destroyBlock(int userId)
destroyBlock
in interface BlockMethodsAsync
userId
- the ID of the user to blockpublic void existsBlock(java.lang.String screenName)
existsBlock
in interface BlockMethodsAsync
screenName
- The screen_name of the potentially blocked user.public void existsBlock(int userId)
existsBlock
in interface BlockMethodsAsync
userId
- The ID of the potentially blocked user.public void getBlockingUsers()
getBlockingUsers
in interface BlockMethodsAsync
public void getBlockingUsers(int page)
getBlockingUsers
in interface BlockMethodsAsync
page
- the number of pagepublic void getBlockingUsersIDs()
getBlockingUsersIDs
in interface BlockMethodsAsync
public void reportSpam(int userId) throws TwitterException
reportSpam
in interface SpamReportingMethodsAsync
userId
- The ID of the user you want to report as a spammer.TwitterException
- when Twitter service or network is unavailablepublic void reportSpam(java.lang.String screenName) throws TwitterException
reportSpam
in interface SpamReportingMethodsAsync
screenName
- The screen name of the user you want to report as a spammer.TwitterException
- when Twitter service or network is unavailablepublic void getAvailableTrends()
getAvailableTrends
in interface LocalTrendsMethodsAsync
public void getAvailableTrends(GeoLocation location)
getAvailableTrends
in interface LocalTrendsMethodsAsync
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 getLocationTrends(int woeid)
getLocationTrends
in interface LocalTrendsMethodsAsync
woeid
- The WOEID of the location to be querying forpublic void searchPlaces(GeoQuery query)
searchPlaces
in interface GeoMethodsAsync
query
- search querypublic void getSimilarPlaces(GeoLocation location, java.lang.String name, java.lang.String containedWithin, java.lang.String streetAddress)
GeoMethodsAsync
getSimilarPlaces
in interface GeoMethodsAsync
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 getNearbyPlaces(GeoQuery query)
getNearbyPlaces
in interface GeoMethodsAsync
query
- search querypublic void reverseGeoCode(GeoQuery query)
reverseGeoCode
in interface GeoMethodsAsync
query
- search querypublic void getGeoDetails(java.lang.String id)
GeoMethodsAsync.reverseGeoCode(twitter4j.GeoQuery)
method.
getGeoDetails
in interface GeoMethodsAsync
id
- The ID of the location to query about.public void createPlace(java.lang.String name, java.lang.String containedWithin, java.lang.String token, GeoLocation location, java.lang.String streetAddress)
GeoMethodsAsync
createPlace
in interface GeoMethodsAsync
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 getTermsOfService()
getTermsOfService
in interface LegalResourcesAsync
public void getPrivacyPolicy()
getPrivacyPolicy
in interface LegalResourcesAsync
public void getRelatedResults(long statusId) throws TwitterException
NewTwitterMethodsAsync
getRelatedResults
in interface NewTwitterMethodsAsync
statusId
- the numerical ID of the status you're trying to retrieveTwitterException
- when Twitter service or network is unavailablepublic void test()
test
in interface HelpMethodsAsync
public void shutdown()
shutdown
in class TwitterOAuthSupportBase
private twitter4j.internal.async.Dispatcher getDispatcher()
public void setOAuthConsumer(java.lang.String consumerKey, java.lang.String consumerSecret)
setOAuthConsumer
in class TwitterOAuthSupportBase
consumerKey
- OAuth consumer keyconsumerSecret
- OAuth consumer secretpublic RequestToken getOAuthRequestToken() throws TwitterException
getOAuthRequestToken
in interface OAuthSupport
getOAuthRequestToken
in class TwitterOAuthSupportBase
TwitterException
- when Twitter service or network is unavailablepublic RequestToken getOAuthRequestToken(java.lang.String callbackUrl) throws TwitterException
getOAuthRequestToken
in interface OAuthSupport
getOAuthRequestToken
in class TwitterOAuthSupportBase
callbackUrl
- callback URLTwitterException
- when Twitter service or network is unavailablepublic AccessToken getOAuthAccessToken() throws TwitterException
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterOAuthSupportBase
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 TwitterOAuthSupportBase
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 TwitterOAuthSupportBase
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 TwitterOAuthSupportBase
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)
AsyncTwitterFactory.getInstance(Authorization)
setOAuthAccessToken
in interface OAuthSupport
setOAuthAccessToken
in class TwitterOAuthSupportBase
accessToken
- accessTokenpublic AccessToken getOAuthAccessToken(java.lang.String token, java.lang.String tokenSecret) throws TwitterException
AsyncTwitterFactory.getInstance(Authorization)
getOAuthAccessToken
in interface OAuthSupport
getOAuthAccessToken
in class TwitterOAuthSupportBase
token
- the screen nametokenSecret
- the passwordTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(java.lang.String token, java.lang.String tokenSecret, java.lang.String pin) throws TwitterException
getOAuthAccessToken
in class TwitterOAuthSupportBase
token
- request tokentokenSecret
- request token secretpin
- pinTwitterException
- when Twitter service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(java.lang.String token, java.lang.String tokenSecret)
AsyncTwitterFactory.getInstance(Authorization)
setOAuthAccessToken
in class TwitterOAuthSupportBase
token
- access tokentokenSecret
- access token secretjava.lang.IllegalStateException
- when AccessToken has already been retrieved or set