class TwitterImpl extends TwitterBaseImpl implements Twitter
HelpMethods.Language
Modifier and Type | Field and Description |
---|---|
private twitter4j.internal.http.HttpParameter |
INCLUDE_ENTITIES |
private twitter4j.internal.http.HttpParameter |
INCLUDE_MY_RETWEET |
private twitter4j.internal.http.HttpParameter |
INCLUDE_RTS |
private static long |
serialVersionUID |
auth, conf, factory, http, id, screenName
Constructor and Description |
---|
TwitterImpl(Configuration conf,
Authorization auth) |
Modifier and Type | Method and Description |
---|---|
private void |
addParameterToList(java.util.List<twitter4j.internal.http.HttpParameter> colors,
java.lang.String paramName,
java.lang.String color) |
UserList |
addUserListMember(int listId,
long userId)
Adds a member to a list.
|
UserList |
addUserListMembers(int listId,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
addUserListMembers(int listId,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
private void |
checkFileValidity(java.io.File image)
Check the existence, and the type of the specified file.
|
User |
createBlock(long userId)
Blocks the user specified in the ID parameter as the authenticating user.
|
User |
createBlock(java.lang.String screenName)
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(long userId)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
User |
createFriendship(long userId,
boolean follow)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
User |
createFriendship(java.lang.String screenName)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
User |
createFriendship(java.lang.String screenName,
boolean follow)
Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. |
Place |
createPlace(java.lang.String name,
java.lang.String containedWithin,
java.lang.String token,
GeoLocation location,
java.lang.String streetAddress)
Creates a new place at the given latitude and longitude.
|
SavedSearch |
createSavedSearch(java.lang.String query)
Creates a saved search for the authenticated user.
|
UserList |
createUserList(java.lang.String listName,
boolean isPublicList,
java.lang.String description)
Creates a new list for the authenticated user.
|
UserList |
createUserListSubscription(int listId)
Make the authenticated user follow the specified list.
|
private twitter4j.internal.http.HttpResponse |
delete(java.lang.String url) |
UserList |
deleteUserListMember(int listId,
long userId)
Removes the specified member from the list.
|
User |
destroyBlock(long userId)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
User |
destroyBlock(java.lang.String screen_name)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
DirectMessage |
destroyDirectMessage(long 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(long userId)
Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. |
User |
destroyFriendship(java.lang.String screenName)
Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. |
SavedSearch |
destroySavedSearch(int id)
Destroys a saved search for the authenticated user.
|
Status |
destroyStatus(long statusId)
Destroys the status specified by the required ID parameter.
Usage note: The authenticating user must be the author of the specified status. |
UserList |
destroyUserList(int listId)
Deletes the specified list.
|
UserList |
destroyUserListSubscription(int listId)
Unsubscribes the authenticated user form the specified list.
|
User |
disableNotification(long userId)
Disables notifications for updates from the specified user to the authenticating user.
|
User |
disableNotification(java.lang.String screenName)
Disables notifications for updates from the specified user to the authenticating user.
|
User |
enableNotification(long userId)
Enables notifications for updates from the specified user to the authenticating user.
|
User |
enableNotification(java.lang.String screenName)
Enables notifications for updates from the specified user to the authenticating user.
|
boolean |
equals(java.lang.Object o) |
boolean |
existsBlock(long userId)
Returns if the authenticating user is blocking a target user.
|
boolean |
existsBlock(java.lang.String screenName)
Returns if the authenticating user is blocking a target user.
|
boolean |
existsFriendship(java.lang.String userA,
java.lang.String userB)
Tests for the existence of friendship between two users.
|
private twitter4j.internal.http.HttpResponse |
get(java.lang.String url) |
private twitter4j.internal.http.HttpResponse |
get(java.lang.String url,
twitter4j.internal.http.HttpParameter[] parameters) |
AccountSettings |
getAccountSettings()
Returns the current trend, geo, language, timezone and sleep time information for the authenticating user.
|
AccountTotals |
getAccountTotals()
Returns the current count of friends, followers, updates (statuses) and favorites of the authenticating user.
|
ResponseList<UserList> |
getAllUserLists(long userId)
Returns all lists the authenticating or specified user subscribes to, including their own.
|
ResponseList<UserList> |
getAllUserLists(java.lang.String screenName)
Returns all lists the authenticating or specified user subscribes to, including their own.
|
TwitterAPIConfiguration |
getAPIConfiguration()
Returns the current configuration used by Twitter including twitter.com slugs which are not usernames, maximum photo resolutions, and t.co URL lengths.
It is recommended applications request this endpoint when they are loaded, but no more than once a day.
|
ResponseList<Location> |
getAvailableTrends()
Returns the locations that Twitter has trending topic information for.
|
ResponseList<Location> |
getAvailableTrends(GeoLocation location)
Returns the sorted locations that Twitter has trending topic information for.
|
ResponseList<User> |
getBlockingUsers()
Returns a list of user objects that the authenticating user is blocking.
|
ResponseList<User> |
getBlockingUsers(int page)
Returns a list of user objects that the authenticating user is blocking.
|
IDs |
getBlockingUsersIDs()
Returns an array of numeric user ids the authenticating user is blocking.
|
ResponseList<Trends> |
getDailyTrends()
Returns the top 20 trending topics for each hour in a given day.
|
ResponseList<Trends> |
getDailyTrends(java.util.Date date,
boolean excludeHashTags)
Returns the top 20 trending topics for each hour in a given day.
|
ResponseList<DirectMessage> |
getDirectMessages()
Returns a list of the direct messages sent to the authenticating user.
|
ResponseList<DirectMessage> |
getDirectMessages(Paging paging)
Returns a list of the direct messages sent to the authenticating user.
|
ResponseList<Status> |
getFavorites()
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
ResponseList<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.
|
ResponseList<Status> |
getFavorites(Paging paging)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
ResponseList<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.
|
ResponseList<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.
|
ResponseList<Status> |
getFavorites(java.lang.String id,
Paging paging)
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
|
IDs |
getFollowersIDs(long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
IDs |
getFollowersIDs(long userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
IDs |
getFollowersIDs(java.lang.String screenName,
long cursor)
Returns an array of numeric IDs for every user the specified user is followed by.
|
IDs |
getFriendsIDs(long cursor)
Returns an array of numeric IDs for every user the authenticating user is following.
|
IDs |
getFriendsIDs(long userId,
long cursor)
Returns an array of numeric IDs for every user the specified user is following.
|
IDs |
getFriendsIDs(java.lang.String screenName,
long cursor)
Returns an array of numeric IDs for every user the specified user is following.
|
Place |
getGeoDetails(java.lang.String id)
Find out more details of a place that was returned from the
GeoMethods.reverseGeoCode(twitter4j.GeoQuery) method. |
ResponseList<Status> |
getHomeTimeline()
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
|
ResponseList<Status> |
getHomeTimeline(Paging paging)
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
|
IDs |
getIncomingFriendships(long cursor)
Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
|
ResponseList<HelpMethods.Language> |
getLanguages()
Returns the list of languages supported by Twitter along with their ISO 639-1 code.
|
Trends |
getLocationTrends(int woeid)
Returns the top 10 trending topics for a specific location Twitter has trending topic information for.
|
ResponseList<User> |
getMemberSuggestions(java.lang.String categorySlug)
Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.
|
ResponseList<Status> |
getMentions()
Returns the 20 most recent mentions (status containing @username) for the authenticating user.
|
ResponseList<Status> |
getMentions(Paging paging)
Returns the 20 most recent mentions (status containing @username) for the authenticating user.
|
IDs |
getNoRetweetIds()
Returns the list of user_ids for which the authenticating user has said they do not want to receive retweets from when successful.
|
IDs |
getOutgoingFriendships(long cursor)
Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
|
java.lang.String |
getPrivacyPolicy()
Returns Twitter's Privacy Policy.
|
ProfileImage |
getProfileImage(java.lang.String screenName,
ProfileImage.ImageSize size)
Access the profile image in various sizes for the user with the indicated screen_name.
|
RateLimitStatus |
getRateLimitStatus()
Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
|
RelatedResults |
getRelatedResults(long statusId)
If available, returns an array of replies and mentions related to the specified Tweet.
|
ResponseList<User> |
getRetweetedBy(long statusId)
Show user objects of up to 100 members who retweeted the status.
|
ResponseList<User> |
getRetweetedBy(long statusId,
Paging paging)
Show user objects of up to 100 members who retweeted the status.
|
IDs |
getRetweetedByIDs(long statusId)
Show user ids of up to 100 users who retweeted the status represented by id
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format |
IDs |
getRetweetedByIDs(long statusId,
Paging paging)
Show user ids of up to 100 users who retweeted the status represented by id
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format |
ResponseList<Status> |
getRetweetedByMe()
Returns the 20 most recent retweets posted by the authenticating user.
|
ResponseList<Status> |
getRetweetedByMe(Paging paging)
Returns the 20 most recent retweets posted by the authenticating user.
|
ResponseList<Status> |
getRetweetedByUser(long userId,
Paging paging)
Returns the 20 most recent retweets posted by the specified user.
|
ResponseList<Status> |
getRetweetedByUser(java.lang.String screenName,
Paging paging)
Returns the 20 most recent retweets posted by the specified user.
|
ResponseList<Status> |
getRetweetedToMe()
Returns the 20 most recent retweets posted by the authenticating user's friends.
|
ResponseList<Status> |
getRetweetedToMe(Paging paging)
Returns the 20 most recent retweets posted by the authenticating user's friends.
|
ResponseList<Status> |
getRetweetedToUser(long userId,
Paging paging)
Returns the 20 most recent retweets posted by users the specified user follows.
|
ResponseList<Status> |
getRetweetedToUser(java.lang.String screenName,
Paging paging)
Returns the 20 most recent retweets posted by users the specified user follows.
|
ResponseList<Status> |
getRetweets(long statusId)
Returns up to 100 of the first retweets of a given tweet.
|
ResponseList<Status> |
getRetweetsOfMe()
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
ResponseList<Status> |
getRetweetsOfMe(Paging paging)
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
ResponseList<SavedSearch> |
getSavedSearches()
Returns the authenticated user's saved search queries.
|
ResponseList<DirectMessage> |
getSentDirectMessages()
Returns a list of the direct messages sent by the authenticating user.
|
ResponseList<DirectMessage> |
getSentDirectMessages(Paging paging)
Returns a list of the direct messages sent by the authenticating user.
|
SimilarPlaces |
getSimilarPlaces(GeoLocation location,
java.lang.String name,
java.lang.String containedWithin,
java.lang.String streetAddress)
Locates places near the given coordinates which are similar in name.
|
ResponseList<Category> |
getSuggestedUserCategories()
Access to Twitter's suggested user list.
|
java.lang.String |
getTermsOfService()
Returns Twitter's' Terms of Service.
|
PagableResponseList<User> |
getUserListMembers(int listId,
long cursor)
Returns the members of the specified list.
|
PagableResponseList<UserList> |
getUserListMemberships(long cursor)
List the lists the authenticating user has been added to.
|
PagableResponseList<UserList> |
getUserListMemberships(long listMemberId,
long cursor)
List the lists the specified user has been added to.
|
PagableResponseList<UserList> |
getUserListMemberships(long listMemberId,
long cursor,
boolean filterToOwnedLists)
List the lists the specified user has been added to.
|
PagableResponseList<UserList> |
getUserListMemberships(java.lang.String listMemberScreenName,
long cursor)
List the lists the specified user has been added to.
|
PagableResponseList<UserList> |
getUserListMemberships(java.lang.String listMemberScreenName,
long cursor,
boolean filterToOwnedLists)
List the lists the specified user has been added to.
|
PagableResponseList<UserList> |
getUserLists(long listOwnerUserId,
long cursor)
List the lists of the specified user.
|
PagableResponseList<UserList> |
getUserLists(java.lang.String listOwnerScreenName,
long cursor)
List the lists of the specified user.
|
ResponseList<Status> |
getUserListStatuses(int listId,
Paging paging)
Show tweet timeline for members of the specified list.
|
PagableResponseList<User> |
getUserListSubscribers(int listId,
long cursor)
Returns the subscribers of the specified list.
|
PagableResponseList<UserList> |
getUserListSubscriptions(java.lang.String listOwnerScreenName,
long cursor)
List the lists the specified user follows.
|
ResponseList<User> |
getUserSuggestions(java.lang.String categorySlug)
Access the users in a given category of the Twitter suggested user list.
It is recommended that end clients cache this data for no more than one hour. |
ResponseList<Status> |
getUserTimeline()
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Status> |
getUserTimeline(long userId)
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Status> |
getUserTimeline(long userId,
Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Status> |
getUserTimeline(Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Status> |
getUserTimeline(java.lang.String screenName)
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Status> |
getUserTimeline(java.lang.String screenName,
Paging paging)
Returns the 20 most recent statuses posted from the authenticating user.
|
ResponseList<Trends> |
getWeeklyTrends()
Returns the top 30 trending topics for each day in a given week.
|
ResponseList<Trends> |
getWeeklyTrends(java.util.Date date,
boolean excludeHashTags)
Returns the top 30 trending topics for each day in a given week.
|
int |
hashCode() |
private boolean |
isOk(twitter4j.internal.http.HttpResponse response) |
ResponseList<Friendship> |
lookupFriendships(long[] ids)
Returns the relationship of the authenticating user to the specified users.
|
ResponseList<Friendship> |
lookupFriendships(java.lang.String[] screenNames)
Returns the relationship of the authenticating user to the specified users.
|
ResponseList<User> |
lookupUsers(long[] ids)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
ResponseList<User> |
lookupUsers(java.lang.String[] screenNames)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
private twitter4j.internal.http.HttpParameter[] |
mergeParameters(twitter4j.internal.http.HttpParameter[] params1,
twitter4j.internal.http.HttpParameter params2) |
private twitter4j.internal.http.HttpParameter[] |
mergeParameters(twitter4j.internal.http.HttpParameter[] params1,
twitter4j.internal.http.HttpParameter[] params2) |
private twitter4j.internal.http.HttpResponse |
post(java.lang.String url) |
private twitter4j.internal.http.HttpResponse |
post(java.lang.String url,
twitter4j.internal.http.HttpParameter[] parameters) |
User |
reportSpam(long userId)
The user specified in the id is blocked by the authenticated user and reported as a spammer.
|
User |
reportSpam(java.lang.String screenName)
The user specified in the id is blocked by the authenticated user and reported as a spammer.
|
Status |
retweetStatus(long statusId)
Retweets a tweet.
|
ResponseList<Place> |
reverseGeoCode(GeoQuery query)
Search for places (cities and neighborhoods) that can be attached to a statuses/update.
|
QueryResult |
search(Query query)
Returns tweets that match a specified query.
|
ResponseList<Place> |
searchPlaces(GeoQuery query)
Search for places that can be attached to a statuses/update.
|
ResponseList<User> |
searchUsers(java.lang.String query,
int page)
Run a search for users similar to the Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API.
Usage note: It is only possible to retrieve the first 1000 matches from this API. |
DirectMessage |
sendDirectMessage(long userId,
java.lang.String text)
Sends a new direct message to the specified user from the authenticating user.
|
DirectMessage |
sendDirectMessage(java.lang.String screenName,
java.lang.String text)
Sends a new direct message to the specified user from the authenticating user.
|
DirectMessage |
showDirectMessage(long id)
Returns a single direct message, specified by an id parameter.
|
Relationship |
showFriendship(long sourceId,
long targetId)
Returns detailed information about the relationship between two users.
|
Relationship |
showFriendship(java.lang.String sourceScreenName,
java.lang.String targetScreenName)
Returns detailed information about the relationship between two users.
|
SavedSearch |
showSavedSearch(int id)
Retrieve the data for a saved search owned by the authenticating user specified by the given id.
|
Status |
showStatus(long id)
Returns a single status, specified by the id parameter below.
|
User |
showUser(long userId)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
User |
showUser(java.lang.String screenName)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
UserList |
showUserList(int listId)
Show the specified list.
|
User |
showUserListMembership(int listId,
long userId)
Check if a user is a member of the specified list.
This method calls http://api.twitter.com/1/lists/members/show.json |
User |
showUserListSubscription(int listId,
long userId)
Check if the specified user is a subscriber of the specified list.
|
boolean |
test()
Returns the string "ok" in the requested format with a 200 OK HTTP status code.
|
private java.lang.String |
toDateStr(java.util.Date date) |
java.lang.String |
toString() |
AccountSettings |
updateAccountSettings(java.lang.Integer trend_locationWoeid,
java.lang.Boolean sleep_timeEnabled,
java.lang.String start_sleepTime,
java.lang.String end_sleepTime,
java.lang.String time_zone,
java.lang.String lang)
Updates the current trend, geo, language, timezone and sleep time information for the authenticating user.
|
Relationship |
updateFriendship(long userId,
boolean enableDeviceNotification,
boolean retweets)
Allows you to enable or disable retweets and device notifications from the specified user.
|
Relationship |
updateFriendship(java.lang.String screenName,
boolean enableDeviceNotification,
boolean retweets)
Allows you to enable or disable retweets and device notifications from the specified user.
|
User |
updateProfile(java.lang.String name,
java.lang.String url,
java.lang.String location,
java.lang.String description)
Sets values that users are able to set under the "Account" tab of their settings page.
|
User |
updateProfileBackgroundImage(java.io.File image,
boolean tile)
Updates the authenticating user's profile background image.
|
User |
updateProfileBackgroundImage(java.io.InputStream image,
boolean tile)
Updates the authenticating user's profile background image.
|
User |
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.
|
User |
updateProfileImage(java.io.File image)
Updates the authenticating user's profile image.
|
User |
updateProfileImage(java.io.InputStream image)
Updates the authenticating user's profile image.
|
Status |
updateStatus(StatusUpdate status)
Updates the authenticating user's status.
|
Status |
updateStatus(java.lang.String status)
Updates the authenticating user's status.
|
UserList |
updateUserList(int listId,
java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription)
Updates the specified list.
|
User |
verifyCredentials()
Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.
|
addRateLimitStatusListener, ensureAuthorizationEnabled, ensureOAuthEnabled, fillInIDAndScreenName, getAuthorization, getConfiguration, getId, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthRequestToken, getOAuthRequestToken, getOAuthRequestToken, getScreenName, httpResponseReceived, setFactory, setOAuthAccessToken, setOAuthConsumer, shutdown
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthRequestToken, getOAuthRequestToken, getOAuthRequestToken, setOAuthAccessToken, setOAuthConsumer
addRateLimitStatusListener, getAuthorization, getConfiguration, getId, getScreenName, shutdown
private static final long serialVersionUID
private final twitter4j.internal.http.HttpParameter INCLUDE_ENTITIES
private final twitter4j.internal.http.HttpParameter INCLUDE_RTS
private final twitter4j.internal.http.HttpParameter INCLUDE_MY_RETWEET
TwitterImpl(Configuration conf, Authorization auth)
private twitter4j.internal.http.HttpParameter[] mergeParameters(twitter4j.internal.http.HttpParameter[] params1, twitter4j.internal.http.HttpParameter[] params2)
private twitter4j.internal.http.HttpParameter[] mergeParameters(twitter4j.internal.http.HttpParameter[] params1, twitter4j.internal.http.HttpParameter params2)
public QueryResult search(Query query) throws TwitterException
search
in interface SearchMethods
query
- - the search conditionTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Trends> getDailyTrends() throws TwitterException
getDailyTrends
in interface TrendsMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Trends> getDailyTrends(java.util.Date date, boolean excludeHashTags) throws TwitterException
getDailyTrends
in interface TrendsMethods
date
- Permits specifying a start date for the report.excludeHashTags
- Setting this to true will remove all hashtags from the trends list.TwitterException
- when Twitter service or network is unavailableprivate java.lang.String toDateStr(java.util.Date date)
public ResponseList<Trends> getWeeklyTrends() throws TwitterException
getWeeklyTrends
in interface TrendsMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Trends> getWeeklyTrends(java.util.Date date, boolean excludeHashTags) throws TwitterException
getWeeklyTrends
in interface TrendsMethods
date
- Permits specifying a start date for the report.excludeHashTags
- Setting this to true will remove all hashtags from the trends list.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getHomeTimeline() throws TwitterException
getHomeTimeline
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getHomeTimeline(Paging paging) throws TwitterException
getHomeTimeline
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(java.lang.String screenName, Paging paging) throws TwitterException
getUserTimeline
in interface TimelineMethods
screenName
- specifies the screen name of the user for whom to return the user_timelinepaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(long userId, Paging paging) throws TwitterException
getUserTimeline
in interface TimelineMethods
userId
- specifies the ID of the user for whom to return the user_timelinepaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(java.lang.String screenName) throws TwitterException
getUserTimeline
in interface TimelineMethods
screenName
- specifies the screen name of the user for whom to return the user_timelineTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(long userId) throws TwitterException
getUserTimeline
in interface TimelineMethods
userId
- specifies the ID of the user for whom to return the user_timelineTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline() throws TwitterException
getUserTimeline
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(Paging paging) throws TwitterException
getUserTimeline
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getMentions() throws TwitterException
getMentions
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getMentions(Paging paging) throws TwitterException
getMentions
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedByMe() throws TwitterException
getRetweetedByMe
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedByMe(Paging paging) throws TwitterException
getRetweetedByMe
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedToMe() throws TwitterException
getRetweetedToMe
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedToMe(Paging paging) throws TwitterException
getRetweetedToMe
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetsOfMe() throws TwitterException
getRetweetsOfMe
in interface TimelineMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetsOfMe(Paging paging) throws TwitterException
getRetweetsOfMe
in interface TimelineMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedToUser(java.lang.String screenName, Paging paging) throws TwitterException
getRetweetedToUser
in interface TimelineMethods
screenName
- the user to viewpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedToUser(long userId, Paging paging) throws TwitterException
getRetweetedToUser
in interface TimelineMethods
userId
- the user to viewpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedByUser(java.lang.String screenName, Paging paging) throws TwitterException
getRetweetedByUser
in interface TimelineMethods
screenName
- the user to viewpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetedByUser(long userId, Paging paging) throws TwitterException
getRetweetedByUser
in interface TimelineMethods
userId
- the user to viewpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getRetweetedBy(long statusId) throws TwitterException
getRetweetedBy
in interface StatusMethods
statusId
- The ID of the status you want to get retweeters ofTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getRetweetedBy(long statusId, Paging paging) throws TwitterException
getRetweetedBy
in interface StatusMethods
statusId
- The ID of the status you want to get retweeters ofpaging
- controls pagination. Supports count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic IDs getRetweetedByIDs(long statusId) throws TwitterException
getRetweetedByIDs
in interface StatusMethods
statusId
- The ID of the status you want to get retweeters ofTwitterException
- when Twitter service or network is unavailablepublic IDs getRetweetedByIDs(long statusId, Paging paging) throws TwitterException
getRetweetedByIDs
in interface StatusMethods
statusId
- The ID of the status you want to get retweeters ofpaging
- controls pagination. Supports count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic Status showStatus(long id) throws TwitterException
showStatus
in interface StatusMethods
id
- the numerical ID of the status you're trying to retrieveTwitterException
- when Twitter service or network is unavailablepublic Status updateStatus(java.lang.String status) throws TwitterException
updateStatus
in interface StatusMethods
status
- the text of your status updateTwitterException
- when Twitter service or network is unavailablepublic Status updateStatus(StatusUpdate status) throws TwitterException
updateStatus
in interface StatusMethods
status
- the latest status to be updated.TwitterException
- when Twitter service or network is unavailablepublic Status destroyStatus(long statusId) throws TwitterException
destroyStatus
in interface StatusMethods
statusId
- The ID of the status to destroy.TwitterException
- when Twitter service or network is unavailablepublic Status retweetStatus(long statusId) throws TwitterException
retweetStatus
in interface StatusMethods
statusId
- The ID of the status to retweet.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweets(long statusId) throws TwitterException
getRetweets
in interface StatusMethods
statusId
- The numerical ID of the tweet you want the retweets of.TwitterException
- when Twitter service or network is unavailablepublic User showUser(java.lang.String screenName) throws TwitterException
showUser
in interface UserMethods
screenName
- the screen name of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailablepublic User showUser(long userId) throws TwitterException
showUser
in interface UserMethods
userId
- the ID of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> lookupUsers(java.lang.String[] screenNames) throws TwitterException
lookupUsers
in interface UserMethods
screenNames
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> lookupUsers(long[] ids) throws TwitterException
lookupUsers
in interface UserMethods
ids
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> searchUsers(java.lang.String query, int page) throws TwitterException
searchUsers
in interface UserMethods
query
- The query to run against people search.page
- Specifies the page of results to retrieve. Number of statuses per page is fixed to 20.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Category> getSuggestedUserCategories() throws TwitterException
getSuggestedUserCategories
in interface UserMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getUserSuggestions(java.lang.String categorySlug) throws TwitterException
getUserSuggestions
in interface UserMethods
categorySlug
- slugTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getMemberSuggestions(java.lang.String categorySlug) throws TwitterException
getMemberSuggestions
in interface UserMethods
categorySlug
- slugTwitterException
- when Twitter service or network is unavailablepublic ProfileImage getProfileImage(java.lang.String screenName, ProfileImage.ImageSize size) throws TwitterException
getProfileImage
in interface UserMethods
screenName
- The screen name of the user for whom to return results for.size
- Specifies the size of image to fetch. Not specifying a size will give the default, normal size of 48px by 48px. Valid options include: BIGGER - 73px by 73px NORMAL - 48px by 48px MINI - 24px by 24pxTwitterException
- when Twitter service or network is unavailablepublic UserList createUserList(java.lang.String listName, boolean isPublicList, java.lang.String description) throws TwitterException
createUserList
in interface ListMethods
listName
- The name of the list you are creating. Required.isPublicList
- set true if you wish to make a public listdescription
- The description of the list you are creating. Optional.TwitterException
- when Twitter service or network is unavailable, or the authenticated user already has 20 lists(TwitterException.getStatusCode() == 403).public UserList updateUserList(int listId, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription) throws TwitterException
updateUserList
in interface ListMethods
listId
- The id of the list to update.newListName
- What you'd like to change the list's name to.isPublicList
- Whether your list is public or private. Optional. Values can be public or private. Lists are public by default if no mode is specified.newDescription
- What you'd like to change the list description to.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserLists(java.lang.String listOwnerScreenName, long cursor) throws TwitterException
getUserLists
in interface ListMethods
listOwnerScreenName
- The screen name of the list ownercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserLists(long listOwnerUserId, long cursor) throws TwitterException
getUserLists
in interface ListMethods
listOwnerUserId
- The id of the list ownercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic UserList showUserList(int listId) throws TwitterException
showUserList
in interface ListMethods
listId
- The id of the list to showTwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserList(int listId) throws TwitterException
destroyUserList
in interface ListMethods
listId
- The id of the list to deleteTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserListStatuses(int listId, Paging paging) throws TwitterException
getUserListStatuses
in interface ListMethods
listId
- The id of the listpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(long cursor) throws TwitterException
getUserListMemberships
in interface ListMethods
cursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(java.lang.String listMemberScreenName, long cursor) throws TwitterException
getUserListMemberships
in interface ListMethods
listMemberScreenName
- The screen name of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor) throws TwitterException
getUserListMemberships
in interface ListMethods
listMemberId
- The id of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor, boolean filterToOwnedLists) throws TwitterException
getUserListMemberships
in interface ListMethods
listMemberId
- The id of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.filterToOwnedLists
- Whether to return just lists the authenticating user owns, and the user represented by listMemberId is a member of.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(java.lang.String listMemberScreenName, long cursor, boolean filterToOwnedLists) throws TwitterException
getUserListMemberships
in interface ListMethods
listMemberScreenName
- The screen name of the list membercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.filterToOwnedLists
- Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListSubscriptions(java.lang.String listOwnerScreenName, long cursor) throws TwitterException
getUserListSubscriptions
in interface ListMethods
listOwnerScreenName
- The screen name of the list ownercursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<UserList> getAllUserLists(java.lang.String screenName) throws TwitterException
getAllUserLists
in interface ListMethods
screenName
- screen name to look upTwitterException
- when Twitter service or network is unavailablepublic ResponseList<UserList> getAllUserLists(long userId) throws TwitterException
getAllUserLists
in interface ListMethods
userId
- user id to look upTwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getUserListMembers(int listId, long cursor) throws TwitterException
getUserListMembers
in interface ListMembersMethods
listId
- The id of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic UserList addUserListMember(int listId, long userId) throws TwitterException
addUserListMember
in interface ListMembersMethods
listId
- The id of the list.userId
- The id of the user to add as a member of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList addUserListMembers(int listId, long[] userIds) throws TwitterException
addUserListMembers
in interface ListMembersMethods
listId
- The id of the list.userIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.TwitterException
public UserList addUserListMembers(int listId, java.lang.String[] screenNames) throws TwitterException
addUserListMembers
in interface ListMembersMethods
listId
- The id of the list.screenNames
- The array of screen names of the user to add as member of the list. up to 100 are allowed in a single request.TwitterException
public UserList deleteUserListMember(int listId, long userId) throws TwitterException
deleteUserListMember
in interface ListMembersMethods
listId
- The id of the list.userId
- The screen name of the member you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic User showUserListMembership(int listId, long userId) throws TwitterException
showUserListMembership
in interface ListMembersMethods
listId
- The id of the list.userId
- The id of the user who you want to know is a member or not of the specified list.TwitterException
- when Twitter service or network is unavailable
, or the user is not a member of the specified list(TwitterException.getStatusCode() returns 404 in that case.)public PagableResponseList<User> getUserListSubscribers(int listId, long cursor) throws TwitterException
getUserListSubscribers
in interface ListSubscribersMethods
listId
- The id of the listcursor
- Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.TwitterException
- when Twitter service or network is unavailablepublic UserList createUserListSubscription(int listId) throws TwitterException
createUserListSubscription
in interface ListSubscribersMethods
listId
- The id of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListSubscription(int listId) throws TwitterException
destroyUserListSubscription
in interface ListSubscribersMethods
listId
- The id of the list.TwitterException
- when Twitter service or network is unavailablepublic User showUserListSubscription(int listId, long userId) throws TwitterException
showUserListSubscription
in interface ListSubscribersMethods
listId
- The id of the list.userId
- The id of the user who you want to know is a member or not of the specified list.TwitterException
- when Twitter service or network is unavailable
, or the user is not a member of the specified list(TwitterException.getStatusCode() returns 404 in that case.)public ResponseList<DirectMessage> getDirectMessages() throws TwitterException
getDirectMessages
in interface DirectMessageMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getDirectMessages(Paging paging) throws TwitterException
getDirectMessages
in interface DirectMessageMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getSentDirectMessages() throws TwitterException
getSentDirectMessages
in interface DirectMessageMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getSentDirectMessages(Paging paging) throws TwitterException
getSentDirectMessages
in interface DirectMessageMethods
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic DirectMessage sendDirectMessage(java.lang.String screenName, java.lang.String text) throws TwitterException
sendDirectMessage
in interface DirectMessageMethods
screenName
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.TwitterException
- when Twitter service or network is unavailablepublic DirectMessage sendDirectMessage(long userId, java.lang.String text) throws TwitterException
sendDirectMessage
in interface DirectMessageMethods
userId
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.TwitterException
- when Twitter service or network is unavailablepublic DirectMessage destroyDirectMessage(long id) throws TwitterException
destroyDirectMessage
in interface DirectMessageMethods
id
- the ID of the direct message to destroyTwitterException
- when Twitter service or network is unavailablepublic DirectMessage showDirectMessage(long id) throws TwitterException
showDirectMessage
in interface DirectMessageMethods
id
- message idTwitterException
- when Twitter service or network is unavailablepublic User createFriendship(java.lang.String screenName) throws TwitterException
createFriendship
in interface FriendshipMethods
screenName
- the screen name of the user to be befriendedTwitterException
- when Twitter service or network is unavailablepublic User createFriendship(long userId) throws TwitterException
createFriendship
in interface FriendshipMethods
userId
- the ID of the user to be befriendedTwitterException
- when Twitter service or network is unavailablepublic User createFriendship(java.lang.String screenName, boolean follow) throws TwitterException
createFriendship
in interface FriendshipMethods
screenName
- the 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 unavailablepublic User createFriendship(long userId, boolean follow) throws TwitterException
createFriendship
in interface FriendshipMethods
userId
- the ID of the user to be befriendedfollow
- Enable notifications for the target user in addition to becoming friends.TwitterException
- when Twitter service or network is unavailablepublic User destroyFriendship(java.lang.String screenName) throws TwitterException
destroyFriendship
in interface FriendshipMethods
screenName
- the screen name of the user for whom to request a list of friendsTwitterException
- when Twitter service or network is unavailablepublic User destroyFriendship(long userId) throws TwitterException
destroyFriendship
in interface FriendshipMethods
userId
- the ID of the user for whom to request a list of friendsTwitterException
- when Twitter service or network is unavailablepublic boolean existsFriendship(java.lang.String userA, java.lang.String userB) throws TwitterException
existsFriendship
in interface FriendshipMethods
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 unavailablepublic Relationship showFriendship(java.lang.String sourceScreenName, java.lang.String targetScreenName) throws TwitterException
showFriendship
in interface FriendshipMethods
sourceScreenName
- the screen name of the source usertargetScreenName
- the screen name of the target userTwitterException
- when Twitter service or network is unavailablepublic Relationship showFriendship(long sourceId, long targetId) throws TwitterException
showFriendship
in interface FriendshipMethods
sourceId
- the ID of the source usertargetId
- the ID of the target userTwitterException
- when Twitter service or network is unavailablepublic IDs getIncomingFriendships(long cursor) throws TwitterException
getIncomingFriendships
in interface FriendshipMethods
cursor
- Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.TwitterException
- when Twitter service or network is unavailablepublic IDs getOutgoingFriendships(long cursor) throws TwitterException
getOutgoingFriendships
in interface FriendshipMethods
cursor
- Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Friendship> lookupFriendships(java.lang.String[] screenNames) throws TwitterException
lookupFriendships
in interface FriendshipMethods
screenNames
- array of the screen names to lookupTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Friendship> lookupFriendships(long[] ids) throws TwitterException
lookupFriendships
in interface FriendshipMethods
ids
- array of the ids to lookupTwitterException
- when Twitter service or network is unavailablepublic Relationship updateFriendship(java.lang.String screenName, boolean enableDeviceNotification, boolean retweets) throws TwitterException
updateFriendship
in interface FriendshipMethods
screenName
- screen name to updateenableDeviceNotification
- set true to enable device notificationretweets
- set true to enable retweetsTwitterException
- when Twitter service or network is unavailablepublic Relationship updateFriendship(long userId, boolean enableDeviceNotification, boolean retweets) throws TwitterException
updateFriendship
in interface FriendshipMethods
userId
- user id to updateenableDeviceNotification
- set true to enable device notificationretweets
- set true to enable retweetsTwitterException
- when Twitter service or network is unavailablepublic IDs getNoRetweetIds() throws TwitterException
getNoRetweetIds
in interface FriendshipMethods
TwitterException
- when Twitter service or network is unavailablepublic IDs getFriendsIDs(long cursor) throws TwitterException
getFriendsIDs
in interface FriendsFollowersMethods
cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic IDs getFriendsIDs(long userId, long cursor) throws TwitterException
getFriendsIDs
in interface FriendsFollowersMethods
userId
- Specifies the ID of the user for whom to return the friends list.cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic IDs getFriendsIDs(java.lang.String screenName, long cursor) throws TwitterException
getFriendsIDs
in interface FriendsFollowersMethods
screenName
- Specifies the screen name of the user for whom to return the friends list.cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic IDs getFollowersIDs(long cursor) throws TwitterException
getFollowersIDs
in interface FriendsFollowersMethods
cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic IDs getFollowersIDs(long userId, long cursor) throws TwitterException
getFollowersIDs
in interface FriendsFollowersMethods
userId
- Specifies the ID of the user for whom to return the followers list.cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic IDs getFollowersIDs(java.lang.String screenName, long cursor) throws TwitterException
getFollowersIDs
in interface FriendsFollowersMethods
screenName
- Specifies the screen name of the user for whom to return the followers list.cursor
- Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filterd out after connections are queried. TwitterException
- when Twitter service or network is unavailablepublic User verifyCredentials() throws TwitterException
verifyCredentials
in interface AccountMethods
TwitterException
- when Twitter service or network is unavailable, or if supplied credential is wrong (TwitterException.getStatusCode() == 401)public RateLimitStatus getRateLimitStatus() throws TwitterException
getRateLimitStatus
in interface AccountMethods
TwitterException
- when Twitter service or network is unavailablepublic User updateProfile(java.lang.String name, java.lang.String url, java.lang.String location, java.lang.String description) throws TwitterException
updateProfile
in interface AccountMethods
name
- Optional. Maximum of 20 characters.url
- Optional. Maximum of 100 characters. Will be prepended with "http://" if not present.location
- Optional. Maximum of 30 characters. The contents are not normalized or geocoded in any way.description
- Optional. Maximum of 160 characters.TwitterException
- when Twitter service or network is unavailablepublic AccountTotals getAccountTotals() throws TwitterException
getAccountTotals
in interface AccountMethods
TwitterException
- when Twitter service or network is unavailablepublic AccountSettings getAccountSettings() throws TwitterException
getAccountSettings
in interface AccountMethods
TwitterException
- when Twitter service or network is unavailablepublic AccountSettings updateAccountSettings(java.lang.Integer trend_locationWoeid, java.lang.Boolean sleep_timeEnabled, java.lang.String start_sleepTime, java.lang.String end_sleepTime, java.lang.String time_zone, java.lang.String lang) throws TwitterException
updateAccountSettings
in interface AccountMethods
trend_locationWoeid
- Optional. The Yahoo! Where On Earth ID to use as the user's default trend location.sleep_timeEnabled
- Optional. Whether sleep time is enabled for the userstart_sleepTime
- Optional. The hour that sleep time should begin if it is enabled.end_sleepTime
- Optional. The hour that sleep time should end if it is enabled.time_zone
- Optional. The timezone dates and times should be displayed in for the user.lang
- Optional. The language which Twitter should render in for this user. (two letter ISO 639-1)TwitterException
- when Twitter service or network is unavailablepublic User updateProfileColors(java.lang.String profileBackgroundColor, java.lang.String profileTextColor, java.lang.String profileLinkColor, java.lang.String profileSidebarFillColor, java.lang.String profileSidebarBorderColor) throws TwitterException
updateProfileColors
in interface AccountMethods
profileBackgroundColor
- optional, can be nullprofileTextColor
- optional, can be nullprofileLinkColor
- optional, can be nullprofileSidebarFillColor
- optional, can be nullprofileSidebarBorderColor
- optional, can be nullTwitterException
- when Twitter service or network is unavailableprivate void addParameterToList(java.util.List<twitter4j.internal.http.HttpParameter> colors, java.lang.String paramName, java.lang.String color)
public User updateProfileImage(java.io.File image) throws TwitterException
updateProfileImage
in interface AccountMethods
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.TwitterException
- when Twitter service or network is unavailable,
or when the specified file is not found (FileNotFoundException will be nested),
or when the specified file object in not representing a file (IOException will be nested)public User updateProfileImage(java.io.InputStream image) throws TwitterException
updateProfileImage
in interface AccountMethods
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.TwitterException
- when Twitter service or network is unavailable,
or when the specified file is not found (FileNotFoundException will be nested),
or when the specified file object in not representing a file (IOException will be nested)public User updateProfileBackgroundImage(java.io.File image, boolean tile) throws TwitterException
updateProfileBackgroundImage
in interface AccountMethods
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forceably scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.TwitterException
- when Twitter service or network is unavailable,
or when the specified file is not found (FileNotFoundException will be nested),
or when the specified file object in not representing a file (IOException will be nested)public User updateProfileBackgroundImage(java.io.InputStream image, boolean tile) throws TwitterException
updateProfileBackgroundImage
in interface AccountMethods
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forceably scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.TwitterException
- when Twitter service or network is unavailable,
or when the specified file is not found (FileNotFoundException will be nested),
or when the specified file object in not representing a file (IOException will be nested)private void checkFileValidity(java.io.File image) throws TwitterException
image
- image to be uploadedTwitterException
- when the specified file is not found (FileNotFoundException will be nested)
, or when the specified file object is not representing a file(IOException will be nested).public ResponseList<Status> getFavorites() throws TwitterException
getFavorites
in interface FavoriteMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(int page) throws TwitterException
getFavorites
in interface FavoriteMethods
page
- the number of pageTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(java.lang.String id) throws TwitterException
getFavorites
in interface FavoriteMethods
id
- the ID or screen name of the user for whom to request a list of favorite statusesTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(java.lang.String id, int page) throws TwitterException
getFavorites
in interface FavoriteMethods
id
- the ID or screen name of the user for whom to request a list of favorite statusespage
- the number of pageTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(Paging paging) throws TwitterException
getFavorites
in interface FavoriteMethods
paging
- controls pagination. Supports sinceId and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(java.lang.String id, Paging paging) throws TwitterException
getFavorites
in interface FavoriteMethods
id
- the ID or screen name of the user for whom to request a list of favorite statusespaging
- controls pagination. Supports sinceId and page parameters.TwitterException
- when Twitter service or network is unavailablepublic Status createFavorite(long id) throws TwitterException
createFavorite
in interface FavoriteMethods
id
- the ID of the status to favoriteTwitterException
- when Twitter service or network is unavailablepublic Status destroyFavorite(long id) throws TwitterException
destroyFavorite
in interface FavoriteMethods
id
- the ID of the status to un-favoriteTwitterException
- when Twitter service or network is unavailablepublic User enableNotification(java.lang.String screenName) throws TwitterException
enableNotification
in interface NotificationMethods
screenName
- Specifies the screen name of the user to follow with device updates.TwitterException
- when Twitter service or network is unavailablepublic User enableNotification(long userId) throws TwitterException
enableNotification
in interface NotificationMethods
userId
- Specifies the ID of the user to follow with device updates.TwitterException
- when Twitter service or network is unavailablepublic User disableNotification(java.lang.String screenName) throws TwitterException
disableNotification
in interface NotificationMethods
screenName
- Specifies the screen name of the user to disable device notifications.TwitterException
- when Twitter service or network is unavailablepublic User disableNotification(long userId) throws TwitterException
disableNotification
in interface NotificationMethods
userId
- Specifies the ID of the user to disable device notifications.TwitterException
- when Twitter service or network is unavailablepublic User createBlock(java.lang.String screenName) throws TwitterException
createBlock
in interface BlockMethods
screenName
- the screen_name of the user to blockTwitterException
- when Twitter service or network is unavailablepublic User createBlock(long userId) throws TwitterException
createBlock
in interface BlockMethods
userId
- the ID of the user to blockTwitterException
- when Twitter service or network is unavailablepublic User destroyBlock(java.lang.String screen_name) throws TwitterException
destroyBlock
in interface BlockMethods
screen_name
- the screen_name of the user to blockTwitterException
- when Twitter service or network is unavailablepublic User destroyBlock(long userId) throws TwitterException
destroyBlock
in interface BlockMethods
userId
- the ID of the user to blockTwitterException
- when Twitter service or network is unavailablepublic boolean existsBlock(java.lang.String screenName) throws TwitterException
existsBlock
in interface BlockMethods
screenName
- The screen_name of the potentially blocked user.TwitterException
- when Twitter service or network is unavailablepublic boolean existsBlock(long userId) throws TwitterException
existsBlock
in interface BlockMethods
userId
- The ID of the potentially blocked user.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getBlockingUsers() throws TwitterException
getBlockingUsers
in interface BlockMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getBlockingUsers(int page) throws TwitterException
getBlockingUsers
in interface BlockMethods
page
- the number of pageTwitterException
- when Twitter service or network is unavailablepublic IDs getBlockingUsersIDs() throws TwitterException
getBlockingUsersIDs
in interface BlockMethods
TwitterException
- when Twitter service or network is unavailablepublic User reportSpam(long userId) throws TwitterException
reportSpam
in interface SpamReportingMethods
userId
- The ID of the user you want to report as a spammer.TwitterException
- when Twitter service or network is unavailablepublic User reportSpam(java.lang.String screenName) throws TwitterException
reportSpam
in interface SpamReportingMethods
screenName
- The screen name of the user you want to report as a spammer.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<SavedSearch> getSavedSearches() throws TwitterException
getSavedSearches
in interface SavedSearchesMethods
TwitterException
- when Twitter service or network is unavailablepublic SavedSearch showSavedSearch(int id) throws TwitterException
showSavedSearch
in interface SavedSearchesMethods
id
- The id of the saved search to be retrieved.TwitterException
- when Twitter service or network is unavailablepublic SavedSearch createSavedSearch(java.lang.String query) throws TwitterException
createSavedSearch
in interface SavedSearchesMethods
query
- the query stringTwitterException
- when Twitter service or network is unavailablepublic SavedSearch destroySavedSearch(int id) throws TwitterException
destroySavedSearch
in interface SavedSearchesMethods
id
- The id of the saved search to be deleted.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Location> getAvailableTrends() throws TwitterException
getAvailableTrends
in interface LocalTrendsMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Location> getAvailableTrends(GeoLocation location) throws TwitterException
getAvailableTrends
in interface LocalTrendsMethods
location
- the available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest.TwitterException
- when Twitter service or network is unavailablepublic Trends getLocationTrends(int woeid) throws TwitterException
getLocationTrends
in interface LocalTrendsMethods
woeid
- The WOEID of the location to be querying forTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Place> searchPlaces(GeoQuery query) throws TwitterException
searchPlaces
in interface GeoMethods
query
- search queryTwitterException
- when Twitter service or network is unavailablepublic SimilarPlaces getSimilarPlaces(GeoLocation location, java.lang.String name, java.lang.String containedWithin, java.lang.String streetAddress) throws TwitterException
getSimilarPlaces
in interface GeoMethods
location
- The latitude and longitude to search around.name
- The name a place is known as.containedWithin
- optional: the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found.streetAddress
- optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Place> reverseGeoCode(GeoQuery query) throws TwitterException
reverseGeoCode
in interface GeoMethods
query
- search queryTwitterException
- when Twitter service or network is unavailablepublic Place getGeoDetails(java.lang.String id) throws TwitterException
GeoMethods.reverseGeoCode(twitter4j.GeoQuery)
method.
getGeoDetails
in interface GeoMethods
id
- The ID of the location to query about.TwitterException
- when Twitter service or network is unavailablepublic Place createPlace(java.lang.String name, java.lang.String containedWithin, java.lang.String token, GeoLocation location, java.lang.String streetAddress) throws TwitterException
createPlace
in interface GeoMethods
name
- The name a place is known as.containedWithin
- The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id.token
- The token found in the response from geo/similar_places.location
- The latitude and longitude the place is located at.streetAddress
- optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes.TwitterException
- when Twitter service or network is unavailablepublic java.lang.String getTermsOfService() throws TwitterException
getTermsOfService
in interface LegalResources
TwitterException
- when Twitter service or network is unavailablepublic java.lang.String getPrivacyPolicy() throws TwitterException
getPrivacyPolicy
in interface LegalResources
TwitterException
- when Twitter service or network is unavailablepublic RelatedResults getRelatedResults(long statusId) throws TwitterException
getRelatedResults
in interface NewTwitterMethods
statusId
- the numerical ID of the status you're trying to retrieveTwitterException
- when Twitter service or network is unavailablepublic boolean test() throws TwitterException
test
in interface HelpMethods
TwitterException
- when Twitter service or network is unavailablepublic TwitterAPIConfiguration getAPIConfiguration() throws TwitterException
getAPIConfiguration
in interface HelpMethods
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<HelpMethods.Language> getLanguages() throws TwitterException
getLanguages
in interface HelpMethods
TwitterException
- when Twitter service or network is unavailablepublic boolean equals(java.lang.Object o)
equals
in class TwitterBaseImpl
private twitter4j.internal.http.HttpResponse get(java.lang.String url) throws TwitterException
TwitterException
private twitter4j.internal.http.HttpResponse get(java.lang.String url, twitter4j.internal.http.HttpParameter[] parameters) throws TwitterException
TwitterException
private twitter4j.internal.http.HttpResponse post(java.lang.String url) throws TwitterException
TwitterException
private twitter4j.internal.http.HttpResponse post(java.lang.String url, twitter4j.internal.http.HttpParameter[] parameters) throws TwitterException
TwitterException
private twitter4j.internal.http.HttpResponse delete(java.lang.String url) throws TwitterException
TwitterException
private boolean isOk(twitter4j.internal.http.HttpResponse response)
public int hashCode()
hashCode
in class TwitterBaseImpl
public java.lang.String toString()
toString
in class TwitterBaseImpl