twitter4j
Class AsyncTwitter

java.lang.Object
  extended by twitter4j.Twitter
      extended by twitter4j.AsyncTwitter
All Implemented Interfaces:
java.io.Serializable

public class AsyncTwitter
extends Twitter

Twitter API with a series of asynchronous APIs.
With this class, you can call TwitterAPI acynchronously.

See Also:
AsyncTwitter, TwitterListener, Serialized Form

Field Summary
static int ARCHIVE
           
static int BLOCK
           
static int CREATE
           
static int CREATE_FAVORITE
           
static int DESTORY
           
static int DESTROY_FAVORITE
           
static int DIRECT_MESSAGES
           
static int FAVORITES
           
static int FEATURED
           
static int FOLLOW
           
static int FOLLOWERS
           
static int FRIENDS
           
static int FRIENDS_TIMELINE
           
static int GET_DOWNTIME_SCHEDULE
           
static int LEAVE
           
static int PUBLIC_TIMELINE
           
static int REPLIES
           
static int SEND_DIRECT_MESSAGE
           
static int SHOW
           
static int TEST
           
static int UNBLOCK
           
static int UPDATE
           
static int UPDATE_DELIVERLY_DEVICE
           
static int UPDATE_LOCATION
           
static int USER_DETAIL
           
static int USER_TIMELINE
           
 
Fields inherited from class twitter4j.Twitter
IM, NONE, SMS
 
Constructor Summary
AsyncTwitter(java.lang.String id, java.lang.String password)
           
AsyncTwitter(java.lang.String id, java.lang.String password, java.lang.String baseURL)
           
 
Method Summary
 void archiveAsync(int page, TwitterListener listener)
          Returns 80 statuses per page for the authenticating user, ordered by descending date of posting.
 void archiveAsync(TwitterListener listener)
          Returns 80 statuses per page for the authenticating user, ordered by descending date of posting.
 void blockAsync(java.lang.String id)
          Blocks the user specified in the ID parameter as the authenticating user.
 void createAsync(java.lang.String id)
          Befriends the user specified in the ID parameter as the authenticating user.
 void createAsync(java.lang.String id, TwitterListener listener)
          Befriends the user specified in the ID parameter as the authenticating user.
 void createFavoriteAsync(int id)
          Favorites the status specified in the ID parameter as the authenticating user.
 void createFavoriteAsync(int id, TwitterListener listener)
          Favorites the status specified in the ID parameter as the authenticating user.
 void deleteDirectMessageAsync(int id, TwitterListener listener)
          Delete specified direct message
 void destroyAsync(java.lang.String id)
          Discontinues friendship with the specified in the ID parameter as the authenticating user.
 void destroyAsync(java.lang.String id, TwitterListener listener)
          Discontinues friendship with the specified in the ID parameter as the authenticating user.
 void destroyFavoriteAsync(int id)
          Favorites the status specified in the ID parameter as the authenticating user.
 void destroyFavoriteAsync(int id, TwitterListener listener)
          Favorites the status specified in the ID parameter as the authenticating user.
 void favoritesAsync(int page, TwitterListener listener)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 void favoritesAsync(java.lang.String id, int page, TwitterListener listener)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 void favoritesAsync(java.lang.String id, TwitterListener listener)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 void favoritesAsync(TwitterListener listener)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 void followAsync(java.lang.String id)
          Enables notifications for updates from the specified user to the authenticating user.
 void followAsync(java.lang.String id, TwitterListener listener)
          Enables notifications for updates from the specified user to the authenticating user.
 void getDirectMessagesAsync(java.util.Date since, TwitterListener listener)
          Returns a list of the direct messages sent to the authenticating user.
 void getDirectMessagesAsync(int sinceId, TwitterListener listener)
          Returns a list of the direct messages sent to the authenticating user.
 void getDirectMessagesAsync(TwitterListener listener)
          Returns a list of the direct messages sent to the authenticating user.
 void getDirectMessagesByPageAsync(int page, TwitterListener listener)
          Returns a list of the direct messages sent to the authenticating user.
 void getDowntimeScheduleAsync()
          Returns the same text displayed on http://twitter.com/home when a maintenance window is scheduled, in the requested format.
 void getFeaturedAsync(TwitterListener listener)
          Returns a list of the users currently featured on the site with their current statuses inline.
 void getFollowersAsync(TwitterListener listener)
          Returns the authenticating user's followers, each with current status inline.
 void getFriendsAsync(int page, TwitterListener listener)
          Returns the specified user's friends, each with current status inline.
 void getFriendsAsync(java.lang.String id, int page, TwitterListener listener)
          Returns the user's friends, each with current status inline.
 void getFriendsAsync(java.lang.String id, TwitterListener listener)
          Returns the user's friends, each with current status inline.
 void getFriendsAsync(TwitterListener listener)
          Returns the specified user's friends, each with current status inline.
 void getFriendsTimelineAsync(java.util.Date since, TwitterListener listener)
          Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user.
 void getFriendsTimelineAsync(java.lang.String id, java.util.Date since, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the specified user id.
 void getFriendsTimelineAsync(java.lang.String id, TwitterListener listener)
          Returns the 20 most recent statuses posted in the last 24 hours from the specified user id.
 void getFriendsTimelineAsync(TwitterListener listener)
          Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user and that user's friends.
 void getFriendsTimelineByPageAsync(int page, TwitterListener listener)
          Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user.
 void getFriendsTimelineByPageAsync(java.lang.String id, int page, TwitterListener listener)
          Returns the 20 most recent statuses posted in the last 24 hours from the specified user id.
 void getPublicTimelineAsync(int sinceID, TwitterListener listener)
          Returns only public statuses with an ID greater than (that is, more recent than) the specified ID.
 void getPublicTimelineAsync(java.lang.String sinceID, TwitterListener listener)
          Deprecated. argument should be always numeric. Use getPublicTimelineAsync(int sinceID, TwitterListener listener) instead
 void getPublicTimelineAsync(TwitterListener listener)
          Returns the 20 most recent statuses from non-protected users who have set a custom user icon.
 void getRepliesAsync(TwitterListener listener)
          Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user.
 void getRepliesByPageAsync(int page, TwitterListener listener)
          Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user.
 void getSentDirectMessagesAsync(java.util.Date since, TwitterListener listener)
          Returns a list of the direct messages sent by the authenticating user.
 void getSentDirectMessagesAsync(int sinceId, TwitterListener listener)
          Returns a list of the direct messages sent by the authenticating user.
 void getSentDirectMessagesAsync(TwitterListener listener)
          Returns a list of the direct messages sent by the authenticating user.
 void getUserDetailAsync(java.lang.String id, TwitterListener listener)
          Returns extended information of a given user, specified by ID or screen name as per the required id parameter below.
 void getUserTimelineAsync(int count, java.util.Date since, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the authenticating user.
 void getUserTimelineAsync(java.lang.String id, java.util.Date since, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the specified user id.
 void getUserTimelineAsync(java.lang.String id, int count, java.util.Date since, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the specified user id.
 void getUserTimelineAsync(java.lang.String id, int count, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the specified user id.
 void getUserTimelineAsync(java.lang.String id, TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the specified user id.
 void getUserTimelineAsync(TwitterListener listener)
          Returns the most recent statuses posted in the last 24 hours from the authenticating user.
 void leaveAsync(java.lang.String id)
          Disables notifications for updates from the specified user to the authenticating user.
 void leaveAsync(java.lang.String id, TwitterListener listener)
          Disables notifications for updates from the specified user to the authenticating user.
 void sendDirectMessageAsync(java.lang.String id, java.lang.String text)
          Sends a new direct message to the specified user from the authenticating user.
 void sendDirectMessageAsync(java.lang.String id, java.lang.String text, TwitterListener listener)
          Sends a new direct message to the specified user from the authenticating user.
 void showAsync(int id, TwitterListener listener)
          Returns a single status, specified by the id parameter.
 void testAsync()
          Returns the string "ok" in the requested format with a 200 OK HTTP status code.
 void unblockAsync(java.lang.String id)
          Un-blocks the user specified in the ID parameter as the authenticating user.
 void updateAsync(java.lang.String status)
          Updates the user's status asynchronously
 void updateAsync(java.lang.String status, TwitterListener listener)
          Updates the user's status asynchronously
 void updateDeliverlyDeviceAsync(twitter4j.Twitter.Device device, TwitterListener listener)
          Sets which device Twitter delivers updates to for the authenticating user.
 void updateLocationAsync(java.lang.String location, TwitterListener listener)
          Update the location
 
Methods inherited from class twitter4j.Twitter
archive, archive, block, create, createFavorite, deleteDirectMessage, destroy, destroyFavorite, equals, favorites, favorites, favorites, favorites, follow, forceUsePost, getBaseURL, getDirectMessages, getDirectMessages, getDirectMessages, getDirectMessagesByPage, getDowntimeSchedule, getFeatured, getFollowers, getFriends, getFriends, getFriends, getFriends, getFriendsTimeline, getFriendsTimeline, getFriendsTimeline, getFriendsTimeline, getFriendsTimelineByPage, getFriendsTimelineByPage, getPassword, getPublicTimeline, getPublicTimeline, getPublicTimeline, getReplies, getRepliesByPage, getSentDirectMessages, getSentDirectMessages, getSentDirectMessages, getSource, getUserDetail, getUserId, getUserTimeline, getUserTimeline, getUserTimeline, getUserTimeline, getUserTimeline, getUserTimeline, hashCode, isUsePostForced, leave, sendDirectMessage, setBaseURL, setPassword, setRequestHeader, setRetryCount, setRetryIntervalSecs, setSource, setUserId, show, test, unblock, update, updateDeliverlyDevice, updateLocation, verifyCredentials
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC_TIMELINE

public static final int PUBLIC_TIMELINE
See Also:
Constant Field Values

FRIENDS_TIMELINE

public static final int FRIENDS_TIMELINE
See Also:
Constant Field Values

USER_TIMELINE

public static final int USER_TIMELINE
See Also:
Constant Field Values

SHOW

public static final int SHOW
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

REPLIES

public static final int REPLIES
See Also:
Constant Field Values

FRIENDS

public static final int FRIENDS
See Also:
Constant Field Values

FOLLOWERS

public static final int FOLLOWERS
See Also:
Constant Field Values

FEATURED

public static final int FEATURED
See Also:
Constant Field Values

USER_DETAIL

public static final int USER_DETAIL
See Also:
Constant Field Values

DIRECT_MESSAGES

public static final int DIRECT_MESSAGES
See Also:
Constant Field Values

SEND_DIRECT_MESSAGE

public static final int SEND_DIRECT_MESSAGE
See Also:
Constant Field Values

CREATE

public static final int CREATE
See Also:
Constant Field Values

DESTORY

public static final int DESTORY
See Also:
Constant Field Values

FOLLOW

public static final int FOLLOW
See Also:
Constant Field Values

LEAVE

public static final int LEAVE
See Also:
Constant Field Values

ARCHIVE

public static final int ARCHIVE
See Also:
Constant Field Values

FAVORITES

public static final int FAVORITES
See Also:
Constant Field Values

CREATE_FAVORITE

public static final int CREATE_FAVORITE
See Also:
Constant Field Values

DESTROY_FAVORITE

public static final int DESTROY_FAVORITE
See Also:
Constant Field Values

UPDATE_LOCATION

public static final int UPDATE_LOCATION
See Also:
Constant Field Values

UPDATE_DELIVERLY_DEVICE

public static final int UPDATE_DELIVERLY_DEVICE
See Also:
Constant Field Values

BLOCK

public static final int BLOCK
See Also:
Constant Field Values

UNBLOCK

public static final int UNBLOCK
See Also:
Constant Field Values

TEST

public static final int TEST
See Also:
Constant Field Values

GET_DOWNTIME_SCHEDULE

public static final int GET_DOWNTIME_SCHEDULE
See Also:
Constant Field Values
Constructor Detail

AsyncTwitter

public AsyncTwitter(java.lang.String id,
                    java.lang.String password)

AsyncTwitter

public AsyncTwitter(java.lang.String id,
                    java.lang.String password,
                    java.lang.String baseURL)
Method Detail

getPublicTimelineAsync

public void getPublicTimelineAsync(TwitterListener listener)
Returns the 20 most recent statuses from non-protected users who have set a custom user icon.

Parameters:
listener - TwitterListener a listener object that receives the response

getPublicTimelineAsync

public void getPublicTimelineAsync(java.lang.String sinceID,
                                   TwitterListener listener)
Deprecated. argument should be always numeric. Use getPublicTimelineAsync(int sinceID, TwitterListener listener) instead

Returns only public statuses with an ID greater than (that is, more recent than) the specified ID.

Parameters:
sinceID - String
listener - TwitterListener a listener object that receives the response

getPublicTimelineAsync

public void getPublicTimelineAsync(int sinceID,
                                   TwitterListener listener)
Returns only public statuses with an ID greater than (that is, more recent than) the specified ID.

Parameters:
sinceID - String
listener - TwitterListener a listener object that receives the response

getFriendsTimelineAsync

public final void getFriendsTimelineAsync(TwitterListener listener)
Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user and that user's friends. It's also possible to request another user's friends_timeline via the id parameter below.

Parameters:
listener - TwitterListener a listener object that receives the response

getFriendsTimelineByPageAsync

public final void getFriendsTimelineByPageAsync(int page,
                                                TwitterListener listener)
Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user.

Parameters:
page - int
listener - TwitterListener a listener object that receives the response

getFriendsTimelineAsync

public final void getFriendsTimelineAsync(java.lang.String id,
                                          TwitterListener listener)
Returns the 20 most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String user ID
listener - TwitterListener a listener object that receives the response

getFriendsTimelineByPageAsync

public final void getFriendsTimelineByPageAsync(java.lang.String id,
                                                int page,
                                                TwitterListener listener)
Returns the 20 most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String user ID
page - int
listener - TwitterListener a listener object that receives the response

getFriendsTimelineAsync

public final void getFriendsTimelineAsync(java.util.Date since,
                                          TwitterListener listener)
Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user.

Parameters:
since - Date
listener - TwitterListener a listener object that receives the response

getFriendsTimelineAsync

public final void getFriendsTimelineAsync(java.lang.String id,
                                          java.util.Date since,
                                          TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String user ID
since - Date
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(java.lang.String id,
                                       int count,
                                       java.util.Date since,
                                       TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String
count - int
since - Date
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(java.lang.String id,
                                       java.util.Date since,
                                       TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String
since - Date
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(java.lang.String id,
                                       int count,
                                       TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String
count - int
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(int count,
                                       java.util.Date since,
                                       TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the authenticating user.

Parameters:
count - int
since - Date
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(java.lang.String id,
                                       TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the specified user id.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response

getUserTimelineAsync

public final void getUserTimelineAsync(TwitterListener listener)
Returns the most recent statuses posted in the last 24 hours from the authenticating user.

Parameters:
listener - TwitterListener a listener object that receives the response

showAsync

public final void showAsync(int id,
                            TwitterListener listener)
Returns a single status, specified by the id parameter. The status's author will be returned inline.

Parameters:
id - int
listener - TwitterListener a listener object that receives the response

updateAsync

public void updateAsync(java.lang.String status,
                        TwitterListener listener)
Updates the user's status asynchronously

Parameters:
status - String
listener - TwitterListener a listener object that receives the response

updateAsync

public void updateAsync(java.lang.String status)
Updates the user's status asynchronously

Parameters:
status - String

getRepliesAsync

public final void getRepliesAsync(TwitterListener listener)
Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user. Replies are only available to the authenticating user; you can not request a list of replies to another user whether public or protected.

Parameters:
listener - TwitterListener a listener object that receives the response

getRepliesByPageAsync

public final void getRepliesByPageAsync(int page,
                                        TwitterListener listener)
Returns the 20 most recent replies (status updates prefixed with @username) to the authenticating user. Replies are only available to the authenticating user; you can not request a list of replies to another user whether public or protected.

Parameters:
page - int
listener - TwitterListener a listener object that receives the response

getFriendsAsync

public final void getFriendsAsync(TwitterListener listener)
Returns the specified user's friends, each with current status inline.

Parameters:
listener - TwitterListener a listener object that receives the response

getFriendsAsync

public final void getFriendsAsync(int page,
                                  TwitterListener listener)
Returns the specified user's friends, each with current status inline.

Parameters:
page - number of the page to retrieve friends
listener - TwitterListener a listener object that receives the response

getFriendsAsync

public final void getFriendsAsync(java.lang.String id,
                                  TwitterListener listener)
Returns the user's friends, each with current status inline.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response

getFriendsAsync

public final void getFriendsAsync(java.lang.String id,
                                  int page,
                                  TwitterListener listener)
Returns the user's friends, each with current status inline.

Parameters:
id - String
page - int
listener - TwitterListener a listener object that receives the response

getFollowersAsync

public final void getFollowersAsync(TwitterListener listener)
Returns the authenticating user's followers, each with current status inline.

Parameters:
listener - TwitterListener a listener object that receives the response

getFeaturedAsync

public final void getFeaturedAsync(TwitterListener listener)
Returns a list of the users currently featured on the site with their current statuses inline.

Parameters:
listener - TwitterListener a listener object that receives the response

getUserDetailAsync

public final void getUserDetailAsync(java.lang.String id,
                                     TwitterListener listener)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter below. This information includes design settings, so third party developers can theme their widgets according to a given user's preferences.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response

getDirectMessagesAsync

public final void getDirectMessagesAsync(TwitterListener listener)
Returns a list of the direct messages sent to the authenticating user.

Parameters:
listener - TwitterListener a listener object that receives the response

getDirectMessagesByPageAsync

public final void getDirectMessagesByPageAsync(int page,
                                               TwitterListener listener)
Returns a list of the direct messages sent to the authenticating user.

Parameters:
page - int
listener - TwitterListener a listener object that receives the response

getDirectMessagesAsync

public final void getDirectMessagesAsync(java.util.Date since,
                                         TwitterListener listener)
Returns a list of the direct messages sent to the authenticating user.

Parameters:
since - Date
listener - TwitterListener a listener object that receives the response

getDirectMessagesAsync

public final void getDirectMessagesAsync(int sinceId,
                                         TwitterListener listener)
Returns a list of the direct messages sent to the authenticating user.

Parameters:
sinceId - int
listener - TwitterListener a listener object that receives the response

getSentDirectMessagesAsync

public final void getSentDirectMessagesAsync(TwitterListener listener)
Returns a list of the direct messages sent by the authenticating user.

Parameters:
listener - TwitterListener a listener object that receives the response

getSentDirectMessagesAsync

public final void getSentDirectMessagesAsync(java.util.Date since,
                                             TwitterListener listener)
Returns a list of the direct messages sent by the authenticating user.

Parameters:
since - Date
listener - TwitterListener a listener object that receives the response

getSentDirectMessagesAsync

public final void getSentDirectMessagesAsync(int sinceId,
                                             TwitterListener listener)
Returns a list of the direct messages sent by the authenticating user.

Parameters:
sinceId - Date
listener - TwitterListener a listener object that receives the response

sendDirectMessageAsync

public void sendDirectMessageAsync(java.lang.String id,
                                   java.lang.String text,
                                   TwitterListener listener)
Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimed if the length of the text is exceeding 140 characters.

Parameters:
id - String
text - String
listener - TwitterListener a listener object that receives the response

sendDirectMessageAsync

public void sendDirectMessageAsync(java.lang.String id,
                                   java.lang.String text)
Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimed if the length of the text is exceeding 140 characters.

Parameters:
id - String
text - String

deleteDirectMessageAsync

public final void deleteDirectMessageAsync(int id,
                                           TwitterListener listener)
Delete specified direct message

Parameters:
id - int
listener - TwitterListener a listener object that receives the response

createAsync

public final void createAsync(java.lang.String id,
                              TwitterListener listener)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response

createAsync

public final void createAsync(java.lang.String id)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.

Parameters:
id - String

destroyAsync

public final void destroyAsync(java.lang.String id,
                               TwitterListener listener)
Discontinues friendship with the specified in the ID parameter as the authenticating user. Returns the un-friended user in the requested format when successful.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response

destroyAsync

public final void destroyAsync(java.lang.String id)
Discontinues friendship with the specified in the ID parameter as the authenticating user. Returns the un-friended user in the requested format when successful.

Parameters:
id - String

archiveAsync

public final void archiveAsync(TwitterListener listener)
Returns 80 statuses per page for the authenticating user, ordered by descending date of posting. Use this method to rapidly export your archive of statuses.

Parameters:
listener - TwitterListener a listener object that receives the response

archiveAsync

public final void archiveAsync(int page,
                               TwitterListener listener)
Returns 80 statuses per page for the authenticating user, ordered by descending date of posting. Use this method to rapidly export your archive of statuses.

Parameters:
page - number of the page to retrieve archive
listener - a listener object that receives the response

updateLocationAsync

public final void updateLocationAsync(java.lang.String location,
                                      TwitterListener listener)
                               throws TwitterException
Update the location

Parameters:
location - the current location of the user
listener - a listener object that receives the response
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4

updateDeliverlyDeviceAsync

public final void updateDeliverlyDeviceAsync(twitter4j.Twitter.Device device,
                                             TwitterListener listener)
                                      throws TwitterException
Sets which device Twitter delivers updates to for the authenticating user. Sending none as the device parameter will disable IM or SMS updates.

Parameters:
device - new Delivery device. Must be one of: IM, SMS, NONE.
listener - a listener object that receives the response
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4

favoritesAsync

public final void favoritesAsync(TwitterListener listener)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

Parameters:
listener - TwitterListener a listener object that receives the response

favoritesAsync

public final void favoritesAsync(int page,
                                 TwitterListener listener)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

Parameters:
page - number of page to retrieve favorites
listener - TwitterListener a listener object that receives the response

favoritesAsync

public final void favoritesAsync(java.lang.String id,
                                 TwitterListener listener)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

Parameters:
id - the ID or screen name of the user for whom to request a list of favorite statuses
listener - TwitterListener a listener object that receives the response

favoritesAsync

public final void favoritesAsync(java.lang.String id,
                                 int page,
                                 TwitterListener listener)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

Parameters:
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.
listener - TwitterListener a listener object that receives the response

createFavoriteAsync

public final void createFavoriteAsync(int id,
                                      TwitterListener listener)
Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.

Parameters:
id - the ID or screen name of the user for whom to request a list of favorite statuses.
listener - TwitterListener a listener object that receives the response

createFavoriteAsync

public final void createFavoriteAsync(int id)
Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.

Parameters:
id - the ID or screen name of the user for whom to request a list of favorite statuses.

destroyFavoriteAsync

public final void destroyFavoriteAsync(int id,
                                       TwitterListener listener)
Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.

Parameters:
id - the ID or screen name of the user for whom to request a list of un-favorite statuses.
listener - TwitterListener a listener object that receives the response

destroyFavoriteAsync

public final void destroyFavoriteAsync(int id)
Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.

Parameters:
id - the ID or screen name of the user for whom to request a list of un-favorite statuses.

followAsync

public final void followAsync(java.lang.String id,
                              TwitterListener listener)
                       throws TwitterException
Enables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response
Throws:
TwitterException - when Twitter service or network is unavailable

followAsync

public final void followAsync(java.lang.String id)
                       throws TwitterException
Enables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.

Parameters:
id - String
Throws:
TwitterException - when Twitter service or network is unavailable

leaveAsync

public final void leaveAsync(java.lang.String id,
                             TwitterListener listener)
                      throws TwitterException
Disables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.

Parameters:
id - String
listener - TwitterListener a listener object that receives the response
Throws:
TwitterException - when Twitter service or network is unavailable

leaveAsync

public final void leaveAsync(java.lang.String id)
                      throws TwitterException
Disables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.

Parameters:
id - String
Throws:
TwitterException - when Twitter service or network is unavailable

blockAsync

public final void blockAsync(java.lang.String id)
                      throws TwitterException
Blocks the user specified in the ID parameter as the authenticating user. Returns the blocked user in the requested format when successful.

Parameters:
id - the ID or screen_name of the user to block
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4

unblockAsync

public final void unblockAsync(java.lang.String id)
                        throws TwitterException
Un-blocks the user specified in the ID parameter as the authenticating user. Returns the un-blocked user in the requested format when successful.

Parameters:
id - the ID or screen_name of the user to block
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4

testAsync

public final void testAsync()
                     throws TwitterException
Returns the string "ok" in the requested format with a 200 OK HTTP status code.

Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4

getDowntimeScheduleAsync

public final void getDowntimeScheduleAsync()
                                    throws TwitterException
Returns the same text displayed on http://twitter.com/home when a maintenance window is scheduled, in the requested format.

Throws:
TwitterException - when Twitter service or network is unavailable
Since:
twitter4j 1.0.4