|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttwitter4j.Twitter
twitter4j.AsyncTwitter
public class AsyncTwitter
Twitter API with a series of asynchronous APIs.
With this class, you can call TwitterAPI acynchronously.
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 java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PUBLIC_TIMELINE
public static final int FRIENDS_TIMELINE
public static final int USER_TIMELINE
public static final int SHOW
public static final int UPDATE
public static final int REPLIES
public static final int FRIENDS
public static final int FOLLOWERS
public static final int FEATURED
public static final int USER_DETAIL
public static final int DIRECT_MESSAGES
public static final int SEND_DIRECT_MESSAGE
public static final int CREATE
public static final int DESTORY
public static final int FOLLOW
public static final int LEAVE
public static final int ARCHIVE
public static final int FAVORITES
public static final int CREATE_FAVORITE
public static final int DESTROY_FAVORITE
public static final int UPDATE_LOCATION
public static final int UPDATE_DELIVERLY_DEVICE
public static final int BLOCK
public static final int UNBLOCK
public static final int TEST
public static final int GET_DOWNTIME_SCHEDULE
| Constructor Detail |
|---|
public AsyncTwitter(java.lang.String id,
java.lang.String password)
public AsyncTwitter(java.lang.String id,
java.lang.String password,
java.lang.String baseURL)
| Method Detail |
|---|
public void getPublicTimelineAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public void getPublicTimelineAsync(java.lang.String sinceID,
TwitterListener listener)
sinceID - Stringlistener - TwitterListener a listener object that receives the response
public void getPublicTimelineAsync(int sinceID,
TwitterListener listener)
sinceID - Stringlistener - TwitterListener a listener object that receives the responsepublic final void getFriendsTimelineAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getFriendsTimelineByPageAsync(int page,
TwitterListener listener)
page - intlistener - TwitterListener a listener object that receives the response
public final void getFriendsTimelineAsync(java.lang.String id,
TwitterListener listener)
id - String user IDlistener - TwitterListener a listener object that receives the response
public final void getFriendsTimelineByPageAsync(java.lang.String id,
int page,
TwitterListener listener)
id - String user IDpage - intlistener - TwitterListener a listener object that receives the response
public final void getFriendsTimelineAsync(java.util.Date since,
TwitterListener listener)
since - Datelistener - TwitterListener a listener object that receives the response
public final void getFriendsTimelineAsync(java.lang.String id,
java.util.Date since,
TwitterListener listener)
id - String user IDsince - Datelistener - TwitterListener a listener object that receives the response
public final void getUserTimelineAsync(java.lang.String id,
int count,
java.util.Date since,
TwitterListener listener)
id - Stringcount - intsince - Datelistener - TwitterListener a listener object that receives the response
public final void getUserTimelineAsync(java.lang.String id,
java.util.Date since,
TwitterListener listener)
id - Stringsince - Datelistener - TwitterListener a listener object that receives the response
public final void getUserTimelineAsync(java.lang.String id,
int count,
TwitterListener listener)
id - Stringcount - intlistener - TwitterListener a listener object that receives the response
public final void getUserTimelineAsync(int count,
java.util.Date since,
TwitterListener listener)
count - intsince - Datelistener - TwitterListener a listener object that receives the response
public final void getUserTimelineAsync(java.lang.String id,
TwitterListener listener)
id - Stringlistener - TwitterListener a listener object that receives the responsepublic final void getUserTimelineAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void showAsync(int id,
TwitterListener listener)
id - intlistener - TwitterListener a listener object that receives the response
public void updateAsync(java.lang.String status,
TwitterListener listener)
status - Stringlistener - TwitterListener a listener object that receives the responsepublic void updateAsync(java.lang.String status)
status - Stringpublic final void getRepliesAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getRepliesByPageAsync(int page,
TwitterListener listener)
page - intlistener - TwitterListener a listener object that receives the responsepublic final void getFriendsAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getFriendsAsync(int page,
TwitterListener listener)
page - number of the page to retrieve friendslistener - TwitterListener a listener object that receives the response
public final void getFriendsAsync(java.lang.String id,
TwitterListener listener)
id - Stringlistener - TwitterListener a listener object that receives the response
public final void getFriendsAsync(java.lang.String id,
int page,
TwitterListener listener)
id - Stringpage - intlistener - TwitterListener a listener object that receives the responsepublic final void getFollowersAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the responsepublic final void getFeaturedAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getUserDetailAsync(java.lang.String id,
TwitterListener listener)
id - Stringlistener - TwitterListener a listener object that receives the responsepublic final void getDirectMessagesAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getDirectMessagesByPageAsync(int page,
TwitterListener listener)
page - intlistener - TwitterListener a listener object that receives the response
public final void getDirectMessagesAsync(java.util.Date since,
TwitterListener listener)
since - Datelistener - TwitterListener a listener object that receives the response
public final void getDirectMessagesAsync(int sinceId,
TwitterListener listener)
sinceId - intlistener - TwitterListener a listener object that receives the responsepublic final void getSentDirectMessagesAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void getSentDirectMessagesAsync(java.util.Date since,
TwitterListener listener)
since - Datelistener - TwitterListener a listener object that receives the response
public final void getSentDirectMessagesAsync(int sinceId,
TwitterListener listener)
sinceId - Datelistener - TwitterListener a listener object that receives the response
public void sendDirectMessageAsync(java.lang.String id,
java.lang.String text,
TwitterListener listener)
id - Stringtext - Stringlistener - TwitterListener a listener object that receives the response
public void sendDirectMessageAsync(java.lang.String id,
java.lang.String text)
id - Stringtext - String
public final void deleteDirectMessageAsync(int id,
TwitterListener listener)
id - intlistener - TwitterListener a listener object that receives the response
public final void createAsync(java.lang.String id,
TwitterListener listener)
id - Stringlistener - TwitterListener a listener object that receives the responsepublic final void createAsync(java.lang.String id)
id - String
public final void destroyAsync(java.lang.String id,
TwitterListener listener)
id - Stringlistener - TwitterListener a listener object that receives the responsepublic final void destroyAsync(java.lang.String id)
id - Stringpublic final void archiveAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void archiveAsync(int page,
TwitterListener listener)
page - number of the page to retrieve archivelistener - a listener object that receives the response
public final void updateLocationAsync(java.lang.String location,
TwitterListener listener)
throws TwitterException
location - the current location of the userlistener - a listener object that receives the response
TwitterException - when Twitter service or network is unavailable
public final void updateDeliverlyDeviceAsync(twitter4j.Twitter.Device device,
TwitterListener listener)
throws TwitterException
device - new Delivery device. Must be one of: IM, SMS, NONE.listener - a listener object that receives the response
TwitterException - when Twitter service or network is unavailablepublic final void favoritesAsync(TwitterListener listener)
listener - TwitterListener a listener object that receives the response
public final void favoritesAsync(int page,
TwitterListener listener)
page - number of page to retrieve favoriteslistener - TwitterListener a listener object that receives the response
public final void favoritesAsync(java.lang.String id,
TwitterListener listener)
id - the ID or screen name of the user for whom to request a list of favorite statuseslistener - TwitterListener a listener object that receives the response
public final void favoritesAsync(java.lang.String id,
int page,
TwitterListener listener)
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
public final void createFavoriteAsync(int id,
TwitterListener listener)
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 responsepublic final void createFavoriteAsync(int id)
id - the ID or screen name of the user for whom to request a list of favorite statuses.
public final void destroyFavoriteAsync(int id,
TwitterListener listener)
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 responsepublic final void destroyFavoriteAsync(int id)
id - the ID or screen name of the user for whom to request a list of un-favorite statuses.
public final void followAsync(java.lang.String id,
TwitterListener listener)
throws TwitterException
id - Stringlistener - TwitterListener a listener object that receives the response
TwitterException - when Twitter service or network is unavailable
public final void followAsync(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public final void leaveAsync(java.lang.String id,
TwitterListener listener)
throws TwitterException
id - Stringlistener - TwitterListener a listener object that receives the response
TwitterException - when Twitter service or network is unavailable
public final void leaveAsync(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public final void blockAsync(java.lang.String id)
throws TwitterException
id - the ID or screen_name of the user to block
TwitterException - when Twitter service or network is unavailable
public final void unblockAsync(java.lang.String id)
throws TwitterException
id - the ID or screen_name of the user to block
TwitterException - when Twitter service or network is unavailable
public final void testAsync()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public final void getDowntimeScheduleAsync()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||