|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.Twitter
public class Twitter
A java reporesentation of the Twitter API
| Field Summary | |
|---|---|
protected HttpClient |
http
|
static twitter4j.Twitter.Device |
IM
|
static twitter4j.Twitter.Device |
NONE
|
static twitter4j.Twitter.Device |
SMS
|
| Constructor Summary | |
|---|---|
Twitter()
|
|
Twitter(java.lang.String baseURL)
|
|
Twitter(java.lang.String id,
java.lang.String password)
|
|
Twitter(java.lang.String id,
java.lang.String password,
java.lang.String baseURL)
|
|
| Method Summary | |
|---|---|
User |
block(java.lang.String id)
Deprecated. use createBlock(String id) instead |
User |
create(java.lang.String id)
Deprecated. use createFriendship(String id) instead |
User |
createBlock(java.lang.String id)
Blocks the user specified in the ID parameter as the authenticating user. |
Status |
createFavorite(long id)
Favorites the status specified in the ID parameter as the authenticating user. |
User |
createFriendship(java.lang.String id)
Befriends the user specified in the ID parameter as the authenticating user. |
User |
createFriendship(java.lang.String id,
boolean follow)
Befriends the user specified in the ID parameter as the authenticating user. |
DirectMessage |
deleteDirectMessage(int id)
Deprecated. use destroyDirectMessage(int id) instead |
User |
destroy(java.lang.String id)
Deprecated. use destroyFriendship(String id) instead |
User |
destroyBlock(java.lang.String id)
Un-blocks the user specified in the ID parameter as the authenticating user. |
DirectMessage |
destroyDirectMessage(int id)
Destroys the direct message specified in the required ID parameter. |
Status |
destroyFavorite(long id)
Un-favorites the status specified in the ID parameter as the authenticating user. |
User |
destroyFriendship(java.lang.String id)
Discontinues friendship with the user specified in the ID parameter as the authenticating user. |
Status |
destroyStatus(long statusId)
Destroys the status specified by the required ID parameter. |
User |
disableNotification(java.lang.String id)
Disables notifications for updates from the specified user to the authenticating user. |
User |
enableNotification(java.lang.String id)
Enables notifications for updates from the specified user to the authenticating user. |
boolean |
equals(java.lang.Object o)
|
boolean |
exists(java.lang.String userA,
java.lang.String userB)
Deprecated. use friendshipExists(String userA, String userB) |
boolean |
existsFriendship(java.lang.String userA,
java.lang.String userB)
Tests if a friendship exists between two users. |
java.util.List<Status> |
favorites()
Deprecated. use getFavorited() instead |
java.util.List<Status> |
favorites(int page)
Deprecated. use getFavorites(int page) instead |
java.util.List<Status> |
favorites(java.lang.String id)
Deprecated. use getFavorites(String id) instead |
java.util.List<Status> |
favorites(java.lang.String id,
int page)
Deprecated. use getFavorites(String id, int page) instead |
User |
follow(java.lang.String id)
Deprecated. use enableNotification(String id) instead |
void |
forceUsePost(boolean forceUsePost)
Deprecated. some methods don't accept POST method anymore |
protected Response |
get(java.lang.String url,
PostParameter[] params,
boolean authenticate)
issues an HTTP GET request. |
protected Response |
get(java.lang.String url,
PostParameter[] params,
Paging paging,
boolean authenticate)
issues an HTTP GET request. |
protected Response |
get(java.lang.String url,
java.lang.String name1,
java.lang.String value1,
boolean authenticate)
issues an HTTP GET request. |
protected Response |
get(java.lang.String url,
java.lang.String name1,
java.lang.String value1,
java.lang.String name2,
java.lang.String value2,
boolean authenticate)
issues an HTTP GET request. |
ExtendedUser |
getAuthenticatedUser()
Deprecated. since Twitter4J 2.0.0 use verifyCredentials() instead |
java.lang.String |
getBaseURL()
Returns the base URL |
java.lang.String |
getClientURL()
|
java.lang.String |
getClientVersion()
|
java.util.List<DirectMessage> |
getDirectMessages()
Returns a list of the direct messages sent to the authenticating user. |
java.util.List<DirectMessage> |
getDirectMessages(java.util.Date since)
Deprecated. use getDirectMessages(Paging paging) instead |
java.util.List<DirectMessage> |
getDirectMessages(int sinceId)
Deprecated. use getDirectMessages(Paging paging) instead |
java.util.List<DirectMessage> |
getDirectMessages(int page,
int sinceId)
Deprecated. use getDirectMessages(Paging paging) instead |
java.util.List<DirectMessage> |
getDirectMessages(Paging paging)
Returns a list of the direct messages sent to the authenticating user. |
java.util.List<DirectMessage> |
getDirectMessagesByPage(int page)
Deprecated. use getDirectMessages(Paging paging) instead |
java.lang.String |
getDowntimeSchedule()
Returns the same text displayed on http://twitter.com/home when a maintenance window is scheduled, in the requested format. |
java.util.List<Status> |
getFavorites()
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format. |
java.util.List<Status> |
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. |
java.util.List<Status> |
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. |
java.util.List<Status> |
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. |
java.util.List<User> |
getFeatured()
Returns a list of the users currently featured on the site with their current statuses inline. |
java.util.List<User> |
getFollowers()
Returns the authenticating user's followers, each with current status inline. |
java.util.List<User> |
getFollowers(int page)
Deprecated. use getFollowers(Paging paging) instead |
java.util.List<User> |
getFollowers(Paging paging)
Returns the authenticating user's followers, each with current status inline. |
java.util.List<User> |
getFollowers(java.lang.String id)
Returns the authenticating user's followers, each with current status inline. |
java.util.List<User> |
getFollowers(java.lang.String id,
int page)
Deprecated. use getFollowers(String id, Paging paging) instead |
java.util.List<User> |
getFollowers(java.lang.String id,
Paging paging)
Returns the authenticating user's followers, each with current status inline. |
IDs |
getFollowersIDs()
Returns an array of numeric IDs for every user the specified user is followed by. |
IDs |
getFollowersIDs(int userId)
Returns an array of numeric IDs for every user the specified user is followed by. |
IDs |
getFollowersIDs(int userId,
Paging paging)
Returns an array of numeric IDs for every user the specified user is followed by. |
IDs |
getFollowersIDs(Paging paging)
Returns an array of numeric IDs for every user the specified user is followed by. |
IDs |
getFollowersIDs(java.lang.String screenName)
Returns an array of numeric IDs for every user the specified user is followed by. |
IDs |
getFollowersIDs(java.lang.String screenName,
Paging paging)
Returns an array of numeric IDs for every user the specified user is followed by. |
java.util.List<User> |
getFriends()
Returns the specified user's friends, each with current status inline. |
java.util.List<User> |
getFriends(int page)
Deprecated. use getFriends(Paging paging) instead |
java.util.List<User> |
getFriends(Paging paging)
Returns the specified user's friends, each with current status inline. |
java.util.List<User> |
getFriends(java.lang.String id)
Returns the user's friends, each with current status inline. |
java.util.List<User> |
getFriends(java.lang.String id,
int page)
Deprecated. use getFriends(String id, Paging paging) instead |
java.util.List<User> |
getFriends(java.lang.String id,
Paging paging)
Returns the user's friends, each with current status inline. |
IDs |
getFriendsIDs()
Returns an array of numeric IDs for every user the authenticating user is following. |
IDs |
getFriendsIDs(int userId)
Returns an array of numeric IDs for every user the specified user is following. |
IDs |
getFriendsIDs(int userId,
Paging paging)
Returns an array of numeric IDs for every user the specified user is following. |
IDs |
getFriendsIDs(Paging paging)
Returns an array of numeric IDs for every user the authenticating user is following. |
IDs |
getFriendsIDs(java.lang.String screenName)
Returns an array of numeric IDs for every user the specified user is following. |
IDs |
getFriendsIDs(java.lang.String screenName,
Paging paging)
Returns an array of numeric IDs for every user the specified user is following. |
java.util.List<Status> |
getFriendsTimeline()
Returns the 20 most recent statuses posted in the last 24 hours from the authenticating1 user and that user's friends. |
java.util.List<Status> |
getFriendsTimeline(java.util.Date since)
Deprecated. use getFriendsTimeline(Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(int page)
Deprecated. use getFriendsTimeline(Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(long sinceId)
Deprecated. use getFriendsTimeline(Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(long sinceId,
int page)
Deprecated. use getFriendsTimeline(Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(long sinceId,
java.lang.String id,
int page)
Deprecated. use getFriendsTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(Paging paging)
Returns the 20 most recent statuses posted in the last 24 hours from the specified userid. |
java.util.List<Status> |
getFriendsTimeline(java.lang.String id)
Returns the 20 most recent statuses posted in the last 24 hours from the specified userid. |
java.util.List<Status> |
getFriendsTimeline(java.lang.String id,
java.util.Date since)
Deprecated. use getFriendsTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(java.lang.String id,
int page)
Deprecated. use getFriendsTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(java.lang.String id,
long sinceId)
Deprecated. use getFriendsTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getFriendsTimeline(java.lang.String id,
Paging paging)
Returns the 20 most recent statuses posted in the last 24 hours from the specified userid. |
java.util.List<Status> |
getFriendsTimelineByPage(int page)
Deprecated. use getFriendsTimeline(Paging paging) instead |
java.util.List<Status> |
getFriendsTimelineByPage(java.lang.String id,
int page)
Deprecated. use getFriendsTimeline(String id, int page) instead |
java.util.List<Status> |
getMentions()
Returns the 20 most recent mentions (status containing @username) for the authenticating user. |
java.util.List<Status> |
getMentions(Paging paging)
Returns the 20 most recent mentions (status containing @username) for the authenticating user. |
AccessToken |
getOAuthAccessToken(RequestToken requestToken)
retrieves an access token assosiated with the supplied request token. |
AccessToken |
getOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret)
retrieves an access token assosiated with the supplied request token. |
RequestToken |
getOAuthRequestToken()
retrieves a request token |
java.lang.String |
getPassword()
Returns authenticating password |
java.util.List<Status> |
getPublicTimeline()
Returns the 20 most recent statuses from non-protected users who have set a custom user icon. |
java.util.List<Status> |
getPublicTimeline(int sinceID)
Returns only public statuses with an ID greater than (that is, more recent than) the specified ID. |
java.util.List<Status> |
getReplies()
Deprecated. use getMentions() instead |
java.util.List<Status> |
getReplies(int page)
Deprecated. use getMentions(Paging paging) instead |
java.util.List<Status> |
getReplies(long sinceId)
Deprecated. use getMentions(Paging paging) instead |
java.util.List<Status> |
getReplies(long sinceId,
int page)
Deprecated. use getMentions(Paging paging) instead |
java.util.List<Status> |
getRepliesByPage(int page)
Deprecated. use getMentions(Paging paging) instead |
java.lang.String |
getSearchBaseURL()
returns the search base url |
java.util.List<DirectMessage> |
getSentDirectMessages()
Returns a list of the direct messages sent by the authenticating user. |
java.util.List<DirectMessage> |
getSentDirectMessages(java.util.Date since)
Deprecated. using long sinceId is suggested. |
java.util.List<DirectMessage> |
getSentDirectMessages(int sinceId)
Deprecated. use getSentDirectMessages(Paging paging) instead |
java.util.List<DirectMessage> |
getSentDirectMessages(int page,
int sinceId)
Deprecated. use getSentDirectMessages(Paging paging) instead |
java.util.List<DirectMessage> |
getSentDirectMessages(Paging paging)
Returns a list of the direct messages sent by the authenticating user. |
java.lang.String |
getSource()
Returns the source |
java.lang.String |
getUserAgent()
|
ExtendedUser |
getUserDetail(java.lang.String id)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter below. |
java.lang.String |
getUserId()
Returns authenticating userid |
java.util.List<Status> |
getUserTimeline()
Returns the most recent statuses posted in the last 24 hours from the authenticating user. |
java.util.List<Status> |
getUserTimeline(int count,
java.util.Date since)
Deprecated. using long sinceId is suggested. |
java.util.List<Status> |
getUserTimeline(int count,
long sinceId)
Deprecated. use getUserTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getUserTimeline(long sinceId)
Deprecated. use getUserTimeline(Paging paging) instead |
java.util.List<Status> |
getUserTimeline(Paging paging)
Returns the most recent statuses posted in the last 24 hours from the authenticating user. |
java.util.List<Status> |
getUserTimeline(java.lang.String id)
Returns the most recent statuses posted in the last 24 hours from the specified userid. |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
java.util.Date since)
Deprecated. use getUserTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
int count)
Deprecated. use getUserTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
int count,
java.util.Date since)
Deprecated. using long sinceId is suggested. |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
int count,
long sinceId)
Returns the most recent statuses posted in the last 24 hours from the specified userid. |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
long sinceId)
Deprecated. use getUserTimeline(String id, Paging paging) instead |
java.util.List<Status> |
getUserTimeline(java.lang.String id,
Paging paging)
Returns the most recent statuses posted in the last 24 hours from the specified userid. |
int |
hashCode()
|
boolean |
isUsePostForced()
|
User |
leave(java.lang.String id)
Deprecated. use disableNotification(String id) instead |
RateLimitStatus |
rateLimitStatus()
Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour. |
QueryResult |
search(Query query)
calls http://search.twitter.com/search |
DirectMessage |
sendDirectMessage(java.lang.String id,
java.lang.String text)
Sends a new direct message to the specified user from the authenticating user. |
void |
setBaseURL(java.lang.String baseURL)
Sets the base URL |
void |
setClientURL(java.lang.String clientURL)
sets the X-Twitter-Client-URL header. |
void |
setClientVersion(java.lang.String version)
sets the X-Twitter-Client-Version header. |
void |
setHttpConnectionTimeout(int connectionTimeout)
Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the Twitter API. |
void |
setHttpProxy(java.lang.String proxyHost,
int proxyPort)
Enables use of HTTP proxy |
void |
setHttpProxyAuth(java.lang.String proxyUser,
java.lang.String proxyPass)
Adds authentication on HTTP proxy |
void |
setHttpReadTimeout(int readTimeout)
Sets the read timeout to a specified timeout, in milliseconds. |
void |
setOAuthAccessToken(AccessToken accessToken)
sets the access token |
void |
setOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret)
sets the access token |
void |
setOAuthConsumer(java.lang.String consumerKey,
java.lang.String consumerSecret)
|
void |
setPassword(java.lang.String password)
Sets the password |
void |
setRequestHeader(java.lang.String name,
java.lang.String value)
sets the request header name/value combination see Twitter Fan Wiki for detail. |
void |
setRetryCount(int retryCount)
|
void |
setRetryIntervalSecs(int retryIntervalSecs)
|
void |
setSearchBaseURL(java.lang.String searchBaseURL)
Sets the search base URL |
void |
setSource(java.lang.String source)
Sets X-Twitter-Client http header and the source parameter that will be passed by updating methods. |
void |
setUserAgent(java.lang.String userAgent)
sets the User-Agent header. |
void |
setUserId(java.lang.String userId)
Sets the userid |
Status |
show(int id)
Deprecated. Use showStatus(long id) instead. |
Status |
show(long id)
Deprecated. Use showStatus(long id) instead. |
Status |
showStatus(long id)
Returns a single status, specified by the id parameter. |
boolean |
test()
Returns the string "ok" in the requested format with a 200 OK HTTP status code. |
java.lang.String |
toString()
|
User |
unblock(java.lang.String id)
Deprecated. use destroyBlock(String id) instead |
Status |
update(java.lang.String status)
Deprecated. use updateStatus(String status) instead |
Status |
update(java.lang.String status,
long inReplyToStatusId)
Deprecated. use updateStatus(String status, long inReplyToStatusId) instead |
User |
updateDeliverlyDevice(twitter4j.Twitter.Device device)
Sets which device Twitter delivers updates to for the authenticating user. |
User |
updateLocation(java.lang.String location)
Update the location |
ExtendedUser |
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. |
Status |
updateStatus(java.lang.String status)
Updates the user's status. |
Status |
updateStatus(java.lang.String status,
long inReplyToStatusId)
Updates the user's status. |
ExtendedUser |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected HttpClient http
public static final twitter4j.Twitter.Device IM
public static final twitter4j.Twitter.Device SMS
public static final twitter4j.Twitter.Device NONE
| Constructor Detail |
|---|
public Twitter()
public Twitter(java.lang.String baseURL)
public Twitter(java.lang.String id,
java.lang.String password)
public Twitter(java.lang.String id,
java.lang.String password,
java.lang.String baseURL)
| Method Detail |
|---|
public void setUserAgent(java.lang.String userAgent)
userAgent - UserAgentpublic java.lang.String getUserAgent()
public void setClientVersion(java.lang.String version)
version - client versionpublic java.lang.String getClientVersion()
public void setClientURL(java.lang.String clientURL)
clientURL - client URLpublic java.lang.String getClientURL()
public void setBaseURL(java.lang.String baseURL)
baseURL - String the base URLpublic java.lang.String getBaseURL()
public void setSearchBaseURL(java.lang.String searchBaseURL)
searchBaseURL - the search base URLpublic java.lang.String getSearchBaseURL()
public void setUserId(java.lang.String userId)
userId - new useridpublic java.lang.String getUserId()
public void setPassword(java.lang.String password)
password - new passwordpublic java.lang.String getPassword()
public void setOAuthConsumer(java.lang.String consumerKey,
java.lang.String consumerSecret)
consumerKey - OAuth consumer keyconsumerSecret - OAuth consumer secret
public RequestToken getOAuthRequestToken()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public AccessToken getOAuthAccessToken(RequestToken requestToken)
throws TwitterException
requestToken - the request token
TwitterException - when Twitter service or network is unavailable, or the user has not authorized
public AccessToken getOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret)
throws TwitterException
token - request tokentokenSecret - request token secret
TwitterException - when Twitter service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
accessToken - accessToken
public void setOAuthAccessToken(java.lang.String token,
java.lang.String tokenSecret)
token - tokentokenSecret - token secret
public void setHttpProxy(java.lang.String proxyHost,
int proxyPort)
proxyHost - proxy host, can be overridden system property -Dtwitter4j.http.proxyHost , -Dhttp.proxyHostproxyPort - proxy port, can be overridden system property -Dtwitter4j.http.proxyPort , -Dhttp.proxyPort
public void setHttpProxyAuth(java.lang.String proxyUser,
java.lang.String proxyPass)
proxyUser - proxy user, can be overridden system property -Dtwitter4j.http.proxyUserproxyPass - proxy password, can be overridden system property -Dtwitter4j.http.proxyPasswordpublic void setHttpConnectionTimeout(int connectionTimeout)
connectionTimeout - an int that specifies the connect timeout value in millisecondspublic void setHttpReadTimeout(int readTimeout)
readTimeout - an int that specifies the timeout value to be used in millisecondspublic void setSource(java.lang.String source)
source - the new sourcepublic java.lang.String getSource()
public void setRequestHeader(java.lang.String name,
java.lang.String value)
name - the name of the request headervalue - the value of the request headerpublic void forceUsePost(boolean forceUsePost)
forceUsePost - if true POST method will be used forciblypublic boolean isUsePostForced()
protected Response get(java.lang.String url,
java.lang.String name1,
java.lang.String value1,
boolean authenticate)
throws TwitterException
url - the request urlauthenticate - if true, the request will be sent with BASIC authentication headername1 - the name of the first parametervalue1 - the value of the first parameter
TwitterException - when Twitter service or network is unavailable
protected Response get(java.lang.String url,
java.lang.String name1,
java.lang.String value1,
java.lang.String name2,
java.lang.String value2,
boolean authenticate)
throws TwitterException
url - the request urlname1 - the name of the first parametervalue1 - the value of the first parametername2 - the name of the second parametervalue2 - the value of the second parameterauthenticate - if true, the request will be sent with BASIC authentication header
TwitterException - when Twitter service or network is unavailable
protected Response get(java.lang.String url,
PostParameter[] params,
boolean authenticate)
throws TwitterException
url - the request urlparams - the request parametersauthenticate - if true, the request will be sent with BASIC authentication header
TwitterException - when Twitter service or network is unavailable
protected Response get(java.lang.String url,
PostParameter[] params,
Paging paging,
boolean authenticate)
throws TwitterException
url - the request urlparams - the request parameterspaging - controls paginationauthenticate - if true, the request will be sent with BASIC authentication header
TwitterException - when Twitter service or network is unavailable
public QueryResult search(Query query)
throws TwitterException
query - - the search condition
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getPublicTimeline()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getPublicTimeline(int sinceID)
throws TwitterException
sinceID - returns only public statuses with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimelineByPage(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(long sinceId,
int page)
throws TwitterException
sinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified IDpage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.lang.String id)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timeline
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimelineByPage(java.lang.String id,
int page)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timelinepage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.lang.String id,
int page)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timelinepage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(long sinceId,
java.lang.String id,
int page)
throws TwitterException
sinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified IDid - specifies the ID or screen name of the user for whom to return the friends_timelinepage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.lang.String id,
Paging paging)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timelinepaging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.util.Date since)
throws TwitterException
since - narrows the returned results to just those statuses created after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(long sinceId)
throws TwitterException
sinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.lang.String id,
java.util.Date since)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timelinesince - narrows the returned results to just those statuses created after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFriendsTimeline(java.lang.String id,
long sinceId)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the friends_timelinesinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
int count,
java.util.Date since)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinecount - specifies the number of statuses to retrieve. May not be greater than 200 for performance purposessince - narrows the returned results to just those statuses created after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
int count,
long sinceId)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinecount - specifies the number of statuses to retrieve. May not be greater than 200 for performance purposessinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
Paging paging)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinepaging - controls pagenation
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
java.util.Date since)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinesince - narrows the returned results to just those statuses created after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
int count)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinecount - specifies the number of statuses to retrieve. May not be greater than 200 for performance purposes
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(int count,
java.util.Date since)
throws TwitterException
count - specifies the number of statuses to retrieve. May not be greater than 200 for performance purposessince - narrows the returned results to just those statuses created after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(int count,
long sinceId)
throws TwitterException
count - specifies the number of statuses to retrieve. May not be greater than 200 for performance purposessinceId - returns only statuses with an ID greater than (that is, more recent than) the specified ID.
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timeline
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(java.lang.String id,
long sinceId)
throws TwitterException
id - specifies the ID or screen name of the user for whom to return the user_timelinesinceId - returns only statuses with an ID greater than (that is, more recent than) the specified ID.
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getUserTimeline(long sinceId)
throws TwitterException
sinceId - returns only statuses with an ID greater than (that is, more recent than) the specified ID.
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getReplies()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getReplies(long sinceId)
throws TwitterException
sinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getRepliesByPage(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getReplies(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getReplies(long sinceId,
int page)
throws TwitterException
sinceId - Returns only statuses with an ID greater than (that is, more recent than) the specified IDpage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getMentions()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getMentions(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public Status show(int id)
throws TwitterException
id - the numerical ID of the status you're trying to retrieve
TwitterException - when Twitter service or network is unavailable
public Status show(long id)
throws TwitterException
id - the numerical ID of the status you're trying to retrieve
TwitterException - when Twitter service or network is unavailable
public Status showStatus(long id)
throws TwitterException
id - the numerical ID of the status you're trying to retrieve
TwitterException - when Twitter service or network is unavailable
public Status update(java.lang.String status)
throws TwitterException
status - the text of your status update
TwitterException - when Twitter service or network is unavailable
public Status updateStatus(java.lang.String status)
throws TwitterException
status - the text of your status update
TwitterException - when Twitter service or network is unavailable
public Status update(java.lang.String status,
long inReplyToStatusId)
throws TwitterException
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.
TwitterException - when Twitter service or network is unavailable
public Status updateStatus(java.lang.String status,
long inReplyToStatusId)
throws TwitterException
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.
TwitterException - when Twitter service or network is unavailable
public Status destroyStatus(long statusId)
throws TwitterException
statusId - The ID of the status to destroy.
TwitterException - when Twitter service or network is unavailable
public ExtendedUser getUserDetail(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request the detail
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends(int page)
throws TwitterException
page - number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of friends
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends(java.lang.String id,
Paging paging)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of friendspaging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFriends(java.lang.String id,
int page)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of friendspage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers(int page)
throws TwitterException
page - Retrieves the next 100 followers.
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers(java.lang.String id)
throws TwitterException
id - The ID or screen name of the user for whom to request a list of followers.
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers(java.lang.String id,
Paging paging)
throws TwitterException
id - The ID or screen name of the user for whom to request a list of followers.paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFollowers(java.lang.String id,
int page)
throws TwitterException
id - The ID or screen name of the user for whom to request a list of followers.page - Retrieves the next 100 followers.
TwitterException - when Twitter service or network is unavailable
public java.util.List<User> getFeatured()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessages()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessages(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessagesByPage(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessages(int page,
int sinceId)
throws TwitterException
page - the number of pagesinceId - Returns only direct messages with an ID greater than (that is, more recent than) the specified ID.
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessages(int sinceId)
throws TwitterException
sinceId - Returns only direct messages with an ID greater than (that is, more recent than) the specified ID.
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getDirectMessages(java.util.Date since)
throws TwitterException
since - narrows the resulting list of direct messages to just those sent after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getSentDirectMessages()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getSentDirectMessages(Paging paging)
throws TwitterException
paging - controls pagination
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getSentDirectMessages(java.util.Date since)
throws TwitterException
since - narrows the resulting list of direct messages to just those sent after the specified HTTP-formatted date
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getSentDirectMessages(int sinceId)
throws TwitterException
sinceId - returns only sent direct messages with an ID greater than (that is, more recent than) the specified ID
TwitterException - when Twitter service or network is unavailable
public java.util.List<DirectMessage> getSentDirectMessages(int page,
int sinceId)
throws TwitterException
sinceId - returns only sent direct messages with an ID greater than (that is, more recent than) the specified IDpage - Retrieves the 20 next most recent direct messages.
TwitterException - when Twitter service or network is unavailable
public DirectMessage sendDirectMessage(java.lang.String id,
java.lang.String text)
throws TwitterException
id - the ID or screen name of the user to whom send the direct messagetext - String
TwitterException - when Twitter service or network is unavailable
public DirectMessage deleteDirectMessage(int id)
throws TwitterException
id - the ID of the direct message to destroy
TwitterException - when Twitter service or network is unavailable
public DirectMessage destroyDirectMessage(int id)
throws TwitterException
id - the ID of the direct message to destroy
TwitterException - when Twitter service or network is unavailable
public User create(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user to be befriended
TwitterException - when Twitter service or network is unavailable
public User createFriendship(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user to be befriended
TwitterException - when Twitter service or network is unavailable
public User createFriendship(java.lang.String id,
boolean follow)
throws TwitterException
id - the ID or screen name of the user to be befriendedfollow - Enable notifications for the target user in addition to becoming friends.
TwitterException - when Twitter service or network is unavailable
public User destroy(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of friends
TwitterException - when Twitter service or network is unavailable
public User destroyFriendship(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of friends
TwitterException - when Twitter service or network is unavailable
public boolean exists(java.lang.String userA,
java.lang.String userB)
throws TwitterException
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.
TwitterException - when Twitter service or network is unavailable
public boolean existsFriendship(java.lang.String userA,
java.lang.String userB)
throws TwitterException
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.
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs(Paging paging)
throws TwitterException
paging - 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.
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs(int userId)
throws TwitterException
userId - Specfies the ID of the user for whom to return the friends list.
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs(int userId,
Paging paging)
throws TwitterException
userId - Specfies the ID of the user for whom to return the friends list.paging - 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.
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs(java.lang.String screenName)
throws TwitterException
screenName - Specfies the screen name of the user for whom to return the friends list.
TwitterException - when Twitter service or network is unavailable
public IDs getFriendsIDs(java.lang.String screenName,
Paging paging)
throws TwitterException
screenName - Specfies the screen name of the user for whom to return the friends list.paging - 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.
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs(Paging paging)
throws TwitterException
paging - 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.
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs(int userId)
throws TwitterException
userId - Specfies the ID of the user for whom to return the followers list.
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs(int userId,
Paging paging)
throws TwitterException
userId - Specfies the ID of the user for whom to return the followers list.paging - 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.
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs(java.lang.String screenName)
throws TwitterException
screenName - Specfies the screen name of the user for whom to return the followers list.
TwitterException - when Twitter service or network is unavailable
public IDs getFollowersIDs(java.lang.String screenName,
Paging paging)
throws TwitterException
screenName - Specfies the screen name of the user for whom to return the followers list.paging - 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.
TwitterException - when Twitter service or network is unavailable
public ExtendedUser verifyCredentials()
throws TwitterException
TwitterException
public User updateLocation(java.lang.String location)
throws TwitterException
location - the current location of the user
TwitterException - when Twitter service or network is unavailable
public RateLimitStatus rateLimitStatus()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public User updateDeliverlyDevice(twitter4j.Twitter.Device device)
throws TwitterException
device - new Delivery device. Must be one of: IM, SMS, NONE.
TwitterException - when Twitter service or network is unavailable
public ExtendedUser updateProfileColors(java.lang.String profileBackgroundColor,
java.lang.String profileTextColor,
java.lang.String profileLinkColor,
java.lang.String profileSidebarFillColor,
java.lang.String profileSidebarBorderColor)
throws TwitterException
profileBackgroundColor - optional, can be nullprofileTextColor - optional, can be nullprofileLinkColor - optional, can be nullprofileSidebarFillColor - optional, can be nullprofileSidebarBorderColor - optional, can be null
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> favorites()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFavorites()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> favorites(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFavorites(int page)
throws TwitterException
page - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> favorites(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of favorite statuses
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFavorites(java.lang.String id)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of favorite statuses
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> favorites(java.lang.String id,
int page)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of favorite statusespage - the number of page
TwitterException - when Twitter service or network is unavailable
public java.util.List<Status> getFavorites(java.lang.String id,
int page)
throws TwitterException
id - the ID or screen name of the user for whom to request a list of favorite statusespage - the number of page
TwitterException - when Twitter service or network is unavailable
public Status createFavorite(long id)
throws TwitterException
id - the ID of the status to favorite
TwitterException - when Twitter service or network is unavailable
public Status destroyFavorite(long id)
throws TwitterException
id - the ID of the status to un-favorite
TwitterException - when Twitter service or network is unavailable
public User follow(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public User enableNotification(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public User leave(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public User disableNotification(java.lang.String id)
throws TwitterException
id - String
TwitterException - when Twitter service or network is unavailable
public User block(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 User createBlock(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 User unblock(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 User destroyBlock(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 boolean test()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public ExtendedUser getAuthenticatedUser()
throws TwitterException
TwitterException - when Twitter service or network is unavailable
public java.lang.String getDowntimeSchedule()
throws TwitterException
TwitterException - when Twitter service or network is unavailablepublic void setRetryCount(int retryCount)
public void setRetryIntervalSecs(int retryIntervalSecs)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||