class TwitterImpl extends TwitterBaseImpl implements Twitter
HelpResources.Language
Modifier and Type | Field and Description |
---|---|
private twitter4j.internal.http.HttpParameter[] |
IMPLICIT_PARAMS |
private java.lang.String |
IMPLICIT_PARAMS_STR |
private static java.util.Map<Configuration,twitter4j.internal.http.HttpParameter[]> |
implicitParamsMap |
private static java.util.Map<Configuration,java.lang.String> |
implicitParamsStrMap |
private twitter4j.internal.http.HttpParameter |
INCLUDE_MY_RETWEET |
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) |
UserList |
addUserListMember(long ownerId,
java.lang.String slug,
long userId) |
UserList |
addUserListMembers(int listId,
long[] userIds) |
UserList |
addUserListMembers(int listId,
java.lang.String[] screenNames) |
UserList |
addUserListMembers(long ownerId,
java.lang.String slug,
long[] userIds) |
UserList |
addUserListMembers(long ownerId,
java.lang.String slug,
java.lang.String[] screenNames) |
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 |
createUserListMember(int listId,
long userId)
Adds a member to a list.
|
UserList |
createUserListMember(long ownerId,
java.lang.String slug,
long userId)
Adds a member to a list.
|
UserList |
createUserListMember(java.lang.String ownerScreenName,
java.lang.String slug,
long userId)
Adds a member to a list.
|
UserList |
createUserListMembers(int listId,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListMembers(int listId,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListMembers(long ownerId,
java.lang.String slug,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListMembers(long ownerId,
java.lang.String slug,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListMembers(java.lang.String ownerScreenName,
java.lang.String slug,
long[] userIds)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListMembers(java.lang.String ownerScreenName,
java.lang.String slug,
java.lang.String[] screenNames)
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names.
|
UserList |
createUserListSubscription(int listId)
Make the authenticated user follow the specified list.
|
UserList |
createUserListSubscription(long ownerId,
java.lang.String slug)
Make the authenticated user follow the specified list.
|
UserList |
createUserListSubscription(java.lang.String ownerScreenName,
java.lang.String slug)
Make the authenticated user follow the specified list.
|
UserList |
deleteUserListMember(int listId,
long userId) |
UserList |
deleteUserListMember(long ownerId,
java.lang.String slug,
long userId) |
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 |
destroyUserList(long ownerId,
java.lang.String slug)
Deletes the specified list.
|
UserList |
destroyUserList(java.lang.String ownerScreenName,
java.lang.String slug)
Deletes the specified list.
|
UserList |
destroyUserListMember(int listId,
long userId)
Removes the specified member from the list.
|
UserList |
destroyUserListMember(int listId,
java.lang.String screenName)
Removes the specified members from the list.
|
UserList |
destroyUserListMember(long ownerId,
java.lang.String slug,
long userId)
Removes the specified member from the list.
|
UserList |
destroyUserListMember(java.lang.String ownerScreenName,
java.lang.String slug,
long userId)
Removes the specified member from the list.
|
UserList |
destroyUserListMembers(int listId,
long[] userIds)
Removes the specified members from the list.
|
UserList |
destroyUserListMembers(int listId,
java.lang.String[] screenNames)
Removes the specified members from the list.
|
UserList |
destroyUserListMembers(java.lang.String ownerScreenName,
java.lang.String slug,
long[] userIds)
Removes the specified members from the list.
|
UserList |
destroyUserListMembers(java.lang.String ownerScreenName,
java.lang.String slug,
java.lang.String[] screenNames)
Removes the specified members from the list.
|
UserList |
destroyUserListSubscription(int listId)
Unsubscribes the authenticated user form the specified list.
|
UserList |
destroyUserListSubscription(long ownerId,
java.lang.String slug)
Unsubscribes the authenticated user form the specified list.
|
UserList |
destroyUserListSubscription(java.lang.String ownerScreenName,
java.lang.String slug)
Unsubscribes the authenticated user form the specified list.
|
DirectMessagesResources |
directMessages() |
FavoritesResources |
favorites() |
FriendsFollowersResources |
friendsFollowers() |
private twitter4j.internal.http.HttpResponse |
get(java.lang.String url) |
private twitter4j.internal.http.HttpResponse |
get(java.lang.String url,
twitter4j.internal.http.HttpParameter[] params) |
AccountSettings |
getAccountSettings()
Returns the current trend, geo, language, timezone and sleep time information for the authenticating user.
|
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.
|
IDs |
getBlocksIDs()
Returns an array of numeric user ids the authenticating user is blocking.
|
IDs |
getBlocksIDs(long cursor)
Returns an array of numeric user ids the authenticating user is blocking.
|
PagableResponseList<User> |
getBlocksList()
Returns a list of user objects that the authenticating user is blocking.
|
PagableResponseList<User> |
getBlocksList(long cursor)
Returns a list of user objects that the authenticating user is blocking.
|
ResponseList<Location> |
getClosestTrends(GeoLocation location)
Returns the locations that Twitter has trending topic information for, closest to a specified location.
The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in. A WOEID is a Yahoo! Where On Earth ID. |
ResponseList<User> |
getContributees(long userId)
Returns an array of users that the specified user can contribute to.
|
ResponseList<User> |
getContributees(java.lang.String screenName)
Returns an array of users that the specified user can contribute to.
|
ResponseList<User> |
getContributors(long userId)
Returns an array of users who can contribute to the specified account.
|
ResponseList<User> |
getContributors(java.lang.String screenName)
Returns an array of users who can contribute to the specified account.
|
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.
|
java.io.InputStream |
getDMImageAsStream(java.lang.String url)
Returns a stream of the image included in direct messages.
|
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(long userId)
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(long userId,
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(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 screenName)
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 screenName,
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.
|
PagableResponseList<User> |
getFollowersList(long userId,
long cursor)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
PagableResponseList<User> |
getFollowersList(long userId,
long cursor,
int count)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
PagableResponseList<User> |
getFollowersList(java.lang.String screenName,
long cursor)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
PagableResponseList<User> |
getFollowersList(java.lang.String screenName,
long cursor,
int count)
Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
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.
|
PagableResponseList<User> |
getFriendsList(long userId,
long cursor)
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
PagableResponseList<User> |
getFriendsList(java.lang.String screenName,
long cursor)
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. |
Place |
getGeoDetails(java.lang.String placeId)
Find out more details of a place that was returned from the
PlacesGeoResources.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<HelpResources.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 WOEID, if trending information is available for it.
The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. This information is cached for 5 minutes. |
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.
|
ResponseList<Status> |
getMentionsTimeline()
Returns the 20 most recent mentions (tweets containing a users's @screen_name) for the authenticating user.
The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com. This method can only return up to 800 tweets. See Working with Timelines for instructions on traversing timelines. |
ResponseList<Status> |
getMentionsTimeline(Paging paging)
Returns the 20 most recent mentions (tweets containing a users's @screen_name) for the authenticating user.
The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com. This method can only return up to 800 tweets. See Working with Timelines for instructions on traversing timelines. |
OEmbed |
getOEmbed(OEmbedRequest req)
Returns information allowing the creation of an embedded representation of a Tweet on third party sites.
|
IDs |
getOutgoingFriendships(long cursor)
Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
|
Trends |
getPlaceTrends(int woeid)
Returns the top 10 trending topics for a specific WOEID, if trending information is available for it.
The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL. This information is cached for 5 minutes. |
java.lang.String |
getPrivacyPolicy()
Returns Twitter's Privacy Policy.
|
java.util.Map<java.lang.String,RateLimitStatus> |
getRateLimitStatus()
Returns the current rate limits for methods belonging to the specified resource families.
Each 1.1 API resource belongs to a "resource family" which is indicated in its method documentation. |
java.util.Map<java.lang.String,RateLimitStatus> |
getRateLimitStatus(java.lang.String... resources)
Returns the current rate limits for methods belonging to the specified resource families.
Each 1.1 API resource belongs to a "resource family" which is indicated in its method documentation. |
IDs |
getRetweeterIds(long statusId,
int count,
long cursor)
Returns a collection of up to
count user IDs belonging to users
who have retweeted the tweet specified by the id parameter. |
IDs |
getRetweeterIds(long statusId,
long cursor)
Returns a collection of up to 100 user IDs belonging to users who have
retweeted the tweet specified by the id parameter.
|
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<User> |
getUserListMembers(long ownerId,
java.lang.String slug,
long cursor)
Returns the members of the specified list.
|
PagableResponseList<User> |
getUserListMembers(java.lang.String ownerScreenName,
java.lang.String slug,
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.
|
ResponseList<UserList> |
getUserLists(long listOwnerUserId)
List the lists of the specified user.
|
ResponseList<UserList> |
getUserLists(java.lang.String listOwnerScreenName)
List the lists of the specified user.
|
ResponseList<Status> |
getUserListStatuses(int listId,
Paging paging)
Show tweet timeline for members of the specified list.
|
ResponseList<Status> |
getUserListStatuses(long ownerId,
java.lang.String slug,
Paging paging)
Show tweet timeline for members of the specified list.
|
ResponseList<Status> |
getUserListStatuses(java.lang.String ownerScreenName,
java.lang.String slug,
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<User> |
getUserListSubscribers(long ownerId,
java.lang.String slug,
long cursor)
Returns the subscribers of the specified list.
|
PagableResponseList<User> |
getUserListSubscribers(java.lang.String ownerScreenName,
java.lang.String slug,
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.
|
HelpResources |
help() |
private boolean |
isOk(twitter4j.internal.http.HttpResponse response) |
ListsResources |
list() |
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[] |
mergeImplicitParams(twitter4j.internal.http.HttpParameter[] params) |
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) |
PlacesGeoResources |
placesGeo() |
private twitter4j.internal.http.HttpResponse |
post(java.lang.String url) |
private twitter4j.internal.http.HttpResponse |
post(java.lang.String url,
twitter4j.internal.http.HttpParameter[] params) |
void |
removeProfileBanner()
Removes the uploaded profile banner for the authenticating user.
|
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.
|
SavedSearchesResources |
savedSearches() |
SearchResource |
search() |
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.
|
UserList |
showUserList(long ownerId,
java.lang.String slug)
Show the specified list.
|
UserList |
showUserList(java.lang.String ownerScreenName,
java.lang.String slug)
Show the specified list.
|
User |
showUserListMembership(int listId,
long userId)
Check if a user is a member of the specified list.
This method calls https://api.twitter.com/1.1/lists/members/show.json |
User |
showUserListMembership(long ownerId,
java.lang.String slug,
long userId)
Check if a user is a member of the specified list.
This method calls https://api.twitter.com/1.1/lists/members/show.json |
User |
showUserListMembership(java.lang.String ownerScreenName,
java.lang.String slug,
long userId)
Check if a user is a member of the specified list.
This method calls https://api.twitter.com/1.1/lists/members/show.json |
User |
showUserListSubscription(int listId,
long userId)
Check if the specified user is a subscriber of the specified list.
|
User |
showUserListSubscription(long ownerId,
java.lang.String slug,
long userId)
Check if the specified user is a subscriber of the specified list.
|
User |
showUserListSubscription(java.lang.String ownerScreenName,
java.lang.String slug,
long userId)
Check if the specified user is a subscriber of the specified list.
|
SpamReportingResource |
spamReporting() |
SuggestedUsersResources |
suggestedUsers() |
TimelinesResources |
timelines() |
java.lang.String |
toString() |
TrendsResources |
trends() |
TweetsResources |
tweets() |
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.
|
void |
updateProfileBanner(java.io.File image)
Uploads a profile banner on behalf of the authenticating user.
|
void |
updateProfileBanner(java.io.InputStream image)
Uploads a profile banner on behalf of the authenticating user.
|
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.
|
UserList |
updateUserList(long ownerId,
java.lang.String slug,
java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription)
Updates the specified list.
|
private UserList |
updateUserList(java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription,
twitter4j.internal.http.HttpParameter... params) |
UserList |
updateUserList(java.lang.String ownerScreenName,
java.lang.String slug,
java.lang.String newListName,
boolean isPublicList,
java.lang.String newDescription)
Updates the specified list.
|
UsersResources |
users() |
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, equals, fillInIDAndScreenName, getAuthorization, getConfiguration, getId, getOAuth2Token, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthRequestToken, getOAuthRequestToken, getOAuthRequestToken, getScreenName, hashCode, httpResponseReceived, invalidateOAuth2Token, setFactory, setOAuth2Token, setOAuthAccessToken, setOAuthConsumer, shutdown
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthAccessToken, getOAuthRequestToken, getOAuthRequestToken, getOAuthRequestToken, setOAuthAccessToken, setOAuthConsumer
getOAuth2Token, invalidateOAuth2Token, setOAuth2Token, setOAuthConsumer
addRateLimitStatusListener, getAuthorization, getConfiguration, getId, getScreenName, shutdown
private static final long serialVersionUID
private final java.lang.String IMPLICIT_PARAMS_STR
private final twitter4j.internal.http.HttpParameter[] IMPLICIT_PARAMS
private final twitter4j.internal.http.HttpParameter INCLUDE_MY_RETWEET
private static final java.util.Map<Configuration,twitter4j.internal.http.HttpParameter[]> implicitParamsMap
private static final java.util.Map<Configuration,java.lang.String> implicitParamsStrMap
TwitterImpl(Configuration conf, Authorization auth)
public ResponseList<Status> getMentions() throws TwitterException
getMentions
in interface TimelinesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getMentionsTimeline() throws TwitterException
getMentionsTimeline
in interface TimelinesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getMentions(Paging paging) throws TwitterException
getMentions
in interface TimelinesResources
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getMentionsTimeline(Paging paging) throws TwitterException
getMentionsTimeline
in interface TimelinesResources
paging
- controls pagination. Supports since_id, max_id, zcount parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getHomeTimeline() throws TwitterException
getHomeTimeline
in interface TimelinesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getHomeTimeline(Paging paging) throws TwitterException
getHomeTimeline
in interface TimelinesResources
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 TimelinesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweetsOfMe(Paging paging) throws TwitterException
getRetweetsOfMe
in interface TimelinesResources
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 TimelinesResources
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 TimelinesResources
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 TimelinesResources
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 TimelinesResources
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 TimelinesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserTimeline(Paging paging) throws TwitterException
getUserTimeline
in interface TimelinesResources
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getRetweets(long statusId) throws TwitterException
getRetweets
in interface TweetsResources
statusId
- The numerical ID of the tweet you want the retweets of.TwitterException
- when Twitter service or network is unavailablepublic IDs getRetweeterIds(long statusId, long cursor) throws TwitterException
getRetweeterIds
in interface TweetsResources
statusId
- The numerical ID of the tweet you want the retweeters of.cursor
- The cursor of the page to fetch. Use -1 to start.TwitterException
- when Twitter service or network is unavailablepublic IDs getRetweeterIds(long statusId, int count, long cursor) throws TwitterException
count
user IDs belonging to users
who have retweeted the tweet specified by the id parameter.
getRetweeterIds
in interface TweetsResources
statusId
- The numerical ID of the tweet you want the retweeters of.count
- The maximum number of retweeter IDs to retrieve. Must be
between 1 and 200, inclusive.cursor
- The cursor of the page to fetch. Use -1 to start.TwitterException
- when Twitter service or network is unavailablepublic Status showStatus(long id) throws TwitterException
showStatus
in interface TweetsResources
id
- the numerical ID of the status you're trying to retrieveTwitterException
- when Twitter service or network is unavailablepublic Status destroyStatus(long statusId) throws TwitterException
destroyStatus
in interface TweetsResources
statusId
- The ID of the status to destroy.TwitterException
- when Twitter service or network is unavailablepublic Status updateStatus(java.lang.String status) throws TwitterException
updateStatus
in interface TweetsResources
status
- the text of your status updateTwitterException
- when Twitter service or network is unavailablepublic Status updateStatus(StatusUpdate status) throws TwitterException
updateStatus
in interface TweetsResources
status
- the latest status to be updated.TwitterException
- when Twitter service or network is unavailablepublic Status retweetStatus(long statusId) throws TwitterException
retweetStatus
in interface TweetsResources
statusId
- The ID of the status to retweet.TwitterException
- when Twitter service or network is unavailablepublic OEmbed getOEmbed(OEmbedRequest req) throws TwitterException
getOEmbed
in interface TweetsResources
req
- requestTwitterException
- when Twitter service or network is unavailablepublic QueryResult search(Query query) throws TwitterException
search
in interface SearchResource
query
- - the search conditionTwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getDirectMessages() throws TwitterException
getDirectMessages
in interface DirectMessagesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getDirectMessages(Paging paging) throws TwitterException
getDirectMessages
in interface DirectMessagesResources
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 DirectMessagesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<DirectMessage> getSentDirectMessages(Paging paging) throws TwitterException
getSentDirectMessages
in interface DirectMessagesResources
paging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic DirectMessage showDirectMessage(long id) throws TwitterException
showDirectMessage
in interface DirectMessagesResources
id
- message idTwitterException
- when Twitter service or network is unavailablepublic DirectMessage destroyDirectMessage(long id) throws TwitterException
destroyDirectMessage
in interface DirectMessagesResources
id
- the ID of the direct message to destroyTwitterException
- when Twitter service or network is unavailablepublic DirectMessage sendDirectMessage(long userId, java.lang.String text) throws TwitterException
sendDirectMessage
in interface DirectMessagesResources
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 sendDirectMessage(java.lang.String screenName, java.lang.String text) throws TwitterException
sendDirectMessage
in interface DirectMessagesResources
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 java.io.InputStream getDMImageAsStream(java.lang.String url) throws TwitterException
getDMImageAsStream
in interface DirectMessagesResources
TwitterException
- when Twitter service or network is unavailablepublic IDs getFriendsIDs(long cursor) throws TwitterException
getFriendsIDs
in interface FriendsFollowersResources
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 FriendsFollowersResources
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 FriendsFollowersResources
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 FriendsFollowersResources
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 FriendsFollowersResources
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 FriendsFollowersResources
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 ResponseList<Friendship> lookupFriendships(long[] ids) throws TwitterException
lookupFriendships
in interface FriendsFollowersResources
ids
- array of the ids to lookupTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Friendship> lookupFriendships(java.lang.String[] screenNames) throws TwitterException
lookupFriendships
in interface FriendsFollowersResources
screenNames
- array of the screen names to lookupTwitterException
- when Twitter service or network is unavailablepublic IDs getIncomingFriendships(long cursor) throws TwitterException
getIncomingFriendships
in interface FriendsFollowersResources
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 FriendsFollowersResources
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 User createFriendship(long userId) throws TwitterException
createFriendship
in interface FriendsFollowersResources
userId
- the ID of the user to be befriendedTwitterException
- when Twitter service or network is unavailablepublic User createFriendship(java.lang.String screenName) throws TwitterException
createFriendship
in interface FriendsFollowersResources
screenName
- the screen name of the user to be befriendedTwitterException
- when Twitter service or network is unavailablepublic User createFriendship(long userId, boolean follow) throws TwitterException
createFriendship
in interface FriendsFollowersResources
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 createFriendship(java.lang.String screenName, boolean follow) throws TwitterException
createFriendship
in interface FriendsFollowersResources
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 destroyFriendship(long userId) throws TwitterException
destroyFriendship
in interface FriendsFollowersResources
userId
- the ID of the user for whom to request a list of friendsTwitterException
- when Twitter service or network is unavailablepublic User destroyFriendship(java.lang.String screenName) throws TwitterException
destroyFriendship
in interface FriendsFollowersResources
screenName
- the screen name of the user for whom to request a list of friendsTwitterException
- when Twitter service or network is unavailablepublic Relationship updateFriendship(long userId, boolean enableDeviceNotification, boolean retweets) throws TwitterException
updateFriendship
in interface FriendsFollowersResources
userId
- user id to updateenableDeviceNotification
- set true to enable device notificationretweets
- set true to enable retweetsTwitterException
- when Twitter service or network is unavailablepublic Relationship updateFriendship(java.lang.String screenName, boolean enableDeviceNotification, boolean retweets) throws TwitterException
updateFriendship
in interface FriendsFollowersResources
screenName
- screen name to updateenableDeviceNotification
- set true to enable device notificationretweets
- set true to enable retweetsTwitterException
- when Twitter service or network is unavailablepublic Relationship showFriendship(long sourceId, long targetId) throws TwitterException
showFriendship
in interface FriendsFollowersResources
sourceId
- the ID of the source usertargetId
- the ID of the target userTwitterException
- when Twitter service or network is unavailablepublic Relationship showFriendship(java.lang.String sourceScreenName, java.lang.String targetScreenName) throws TwitterException
showFriendship
in interface FriendsFollowersResources
sourceScreenName
- the screen name of the source usertargetScreenName
- the screen name of the target userTwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFriendsList(long userId, long cursor) throws TwitterException
getFriendsList
in interface FriendsFollowersResources
userId
- The ID of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFriendsList(java.lang.String screenName, long cursor) throws TwitterException
getFriendsList
in interface FriendsFollowersResources
screenName
- The screen name of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFollowersList(long userId, long cursor) throws TwitterException
getFollowersList
in interface FriendsFollowersResources
userId
- The ID of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFollowersList(java.lang.String screenName, long cursor) throws TwitterException
getFollowersList
in interface FriendsFollowersResources
screenName
- The screen name of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFollowersList(long userId, long cursor, int count) throws TwitterException
getFollowersList
in interface FriendsFollowersResources
userId
- The ID of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.count
- The number of users to return per page, up to a maximum of 200. Defaults to 20.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getFollowersList(java.lang.String screenName, long cursor, int count) throws TwitterException
getFollowersList
in interface FriendsFollowersResources
screenName
- The screen name of the user for whom to return results for.cursor
- Causes the results to be broken into pages of no more than 20 records at a time.count
- The number of users to return per page, up to a maximum of 200. Defaults to 20.TwitterException
- when Twitter service or network is unavailablepublic AccountSettings getAccountSettings() throws TwitterException
getAccountSettings
in interface UsersResources
TwitterException
- when Twitter service or network is unavailablepublic User verifyCredentials() throws TwitterException
verifyCredentials
in interface UsersResources
TwitterException
- when Twitter service or network is unavailable, or if supplied credential is wrong (TwitterException.getStatusCode() == 401)public 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 UsersResources
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 updateProfile(java.lang.String name, java.lang.String url, java.lang.String location, java.lang.String description) throws TwitterException
updateProfile
in interface UsersResources
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 User updateProfileBackgroundImage(java.io.File image, boolean tile) throws TwitterException
updateProfileBackgroundImage
in interface UsersResources
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 UsersResources
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 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 UsersResources
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 UsersResources
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 UsersResources
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)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 PagableResponseList<User> getBlocksList() throws TwitterException
getBlocksList
in interface UsersResources
TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<User> getBlocksList(long cursor) throws TwitterException
getBlocksList
in interface UsersResources
cursor
- Causes the list of blocked users 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 filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."TwitterException
- when Twitter service or network is unavailablepublic IDs getBlocksIDs() throws TwitterException
getBlocksIDs
in interface UsersResources
TwitterException
- when Twitter service or network is unavailablepublic IDs getBlocksIDs(long cursor) throws TwitterException
getBlocksIDs
in interface UsersResources
TwitterException
- when Twitter service or network is unavailablepublic User createBlock(long userId) throws TwitterException
createBlock
in interface UsersResources
userId
- the ID of the user to blockTwitterException
- when Twitter service or network is unavailablepublic User createBlock(java.lang.String screenName) throws TwitterException
createBlock
in interface UsersResources
screenName
- the screen_name of the user to blockTwitterException
- when Twitter service or network is unavailablepublic User destroyBlock(long userId) throws TwitterException
destroyBlock
in interface UsersResources
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 UsersResources
screen_name
- the screen_name of the user to blockTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> lookupUsers(long[] ids) throws TwitterException
lookupUsers
in interface UsersResources
ids
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> lookupUsers(java.lang.String[] screenNames) throws TwitterException
lookupUsers
in interface UsersResources
screenNames
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailablepublic User showUser(long userId) throws TwitterException
showUser
in interface UsersResources
userId
- the ID of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailablepublic User showUser(java.lang.String screenName) throws TwitterException
showUser
in interface UsersResources
screenName
- the screen name of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> searchUsers(java.lang.String query, int page) throws TwitterException
searchUsers
in interface UsersResources
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<User> getContributees(long userId) throws TwitterException
getContributees
in interface UsersResources
userId
- The user id of the user for whom to return results forTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getContributees(java.lang.String screenName) throws TwitterException
getContributees
in interface UsersResources
screenName
- The screen name of the user for whom to return results forTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getContributors(long userId) throws TwitterException
getContributors
in interface UsersResources
userId
- The user id of the user for whom to return results forTwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getContributors(java.lang.String screenName) throws TwitterException
getContributors
in interface UsersResources
screenName
- The screen name of the user for whom to return results forTwitterException
- when Twitter service or network is unavailablepublic void removeProfileBanner() throws TwitterException
removeProfileBanner
in interface UsersResources
TwitterException
public void updateProfileBanner(java.io.File image) throws TwitterException
updateProfileBanner
in interface UsersResources
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.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 void updateProfileBanner(java.io.InputStream image) throws TwitterException
updateProfileBanner
in interface UsersResources
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.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 ResponseList<User> getUserSuggestions(java.lang.String categorySlug) throws TwitterException
getUserSuggestions
in interface SuggestedUsersResources
categorySlug
- slugTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Category> getSuggestedUserCategories() throws TwitterException
getSuggestedUserCategories
in interface SuggestedUsersResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<User> getMemberSuggestions(java.lang.String categorySlug) throws TwitterException
getMemberSuggestions
in interface SuggestedUsersResources
categorySlug
- slugTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites() throws TwitterException
getFavorites
in interface FavoritesResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(long userId) throws TwitterException
getFavorites
in interface FavoritesResources
userId
- the id 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 screenName) throws TwitterException
getFavorites
in interface FavoritesResources
screenName
- the screen name of the user for whom to request a list of favorite statusesTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(Paging paging) throws TwitterException
getFavorites
in interface FavoritesResources
paging
- controls pagination. Supports sinceId and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getFavorites(long userId, Paging paging) throws TwitterException
getFavorites
in interface FavoritesResources
userId
- the id 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 ResponseList<Status> getFavorites(java.lang.String screenName, Paging paging) throws TwitterException
getFavorites
in interface FavoritesResources
screenName
- the 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 destroyFavorite(long id) throws TwitterException
destroyFavorite
in interface FavoritesResources
id
- the ID of the status to un-favoriteTwitterException
- when Twitter service or network is unavailablepublic Status createFavorite(long id) throws TwitterException
createFavorite
in interface FavoritesResources
id
- the ID of the status to favoriteTwitterException
- when Twitter service or network is unavailablepublic ResponseList<UserList> getUserLists(java.lang.String listOwnerScreenName) throws TwitterException
getUserLists
in interface ListsResources
listOwnerScreenName
- The screen name of the list owner
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> getUserLists(long listOwnerUserId) throws TwitterException
getUserLists
in interface ListsResources
listOwnerUserId
- The id of the list ownerTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserListStatuses(int listId, Paging paging) throws TwitterException
getUserListStatuses
in interface ListsResources
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 ResponseList<Status> getUserListStatuses(long ownerId, java.lang.String slug, Paging paging) throws TwitterException
getUserListStatuses
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Status> getUserListStatuses(java.lang.String ownerScreenName, java.lang.String slug, Paging paging) throws TwitterException
getUserListStatuses
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListMember(int listId, long userId) throws TwitterException
destroyUserListMember
in interface ListsResources
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 UserList deleteUserListMember(int listId, long userId) throws TwitterException
deleteUserListMember
in interface ListsResources
TwitterException
public UserList destroyUserListMember(long ownerId, java.lang.String slug, long userId) throws TwitterException
destroyUserListMember
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The screen name of the member you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListMember(int listId, java.lang.String screenName) throws TwitterException
destroyUserListMember
in interface ListsResources
listId
- The id of the list.screenName
- The screen name of the member you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListMember(java.lang.String ownerScreenName, java.lang.String slug, long userId) throws TwitterException
destroyUserListMember
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The screen name of the member you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic UserList deleteUserListMember(long ownerId, java.lang.String slug, long userId) throws TwitterException
deleteUserListMember
in interface ListsResources
TwitterException
public UserList destroyUserListMembers(int listId, java.lang.String[] screenNames) throws TwitterException
destroyUserListMembers
in interface ListsResources
listId
- The id of the list.screenNames
- The screen names of the members you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListMembers(int listId, long[] userIds) throws TwitterException
destroyUserListMembers
in interface ListsResources
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
- when Twitter service or network is unavailablepublic UserList destroyUserListMembers(java.lang.String ownerScreenName, java.lang.String slug, java.lang.String[] screenNames) throws TwitterException
destroyUserListMembers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listscreenNames
- The screen names of the members you wish to remove from the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListMembers(java.lang.String ownerScreenName, java.lang.String slug, long[] userIds) throws TwitterException
destroyUserListMembers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listuserIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.TwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListMemberships(long cursor) throws TwitterException
getUserListMemberships
in interface ListsResources
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 ListsResources
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 ListsResources
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 ListsResources
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 ListsResources
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<User> getUserListSubscribers(int listId, long cursor) throws TwitterException
getUserListSubscribers
in interface ListsResources
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 PagableResponseList<User> getUserListSubscribers(long ownerId, java.lang.String slug, long cursor) throws TwitterException
getUserListSubscribers
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug 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 PagableResponseList<User> getUserListSubscribers(java.lang.String ownerScreenName, java.lang.String slug, long cursor) throws TwitterException
getUserListSubscribers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug 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 ListsResources
listId
- The id of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList createUserListSubscription(long ownerId, java.lang.String slug) throws TwitterException
createUserListSubscription
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList createUserListSubscription(java.lang.String ownerScreenName, java.lang.String slug) throws TwitterException
createUserListSubscription
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic User showUserListSubscription(int listId, long userId) throws TwitterException
showUserListSubscription
in interface ListsResources
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 User showUserListSubscription(long ownerId, java.lang.String slug, long userId) throws TwitterException
showUserListSubscription
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- 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 User showUserListSubscription(java.lang.String ownerScreenName, java.lang.String slug, long userId) throws TwitterException
showUserListSubscription
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- 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 UserList destroyUserListSubscription(int listId) throws TwitterException
destroyUserListSubscription
in interface ListsResources
listId
- The id of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListSubscription(long ownerId, java.lang.String slug) throws TwitterException
destroyUserListSubscription
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserListSubscription(java.lang.String ownerScreenName, java.lang.String slug) throws TwitterException
destroyUserListSubscription
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList createUserListMembers(int listId, long[] userIds) throws TwitterException
createUserListMembers
in interface ListsResources
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
- when Twitter service or network is unavailablepublic UserList addUserListMembers(int listId, long[] userIds) throws TwitterException
addUserListMembers
in interface ListsResources
TwitterException
public UserList createUserListMembers(long ownerId, java.lang.String slug, long[] userIds) throws TwitterException
createUserListMembers
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.TwitterException
- when Twitter service or network is unavailablepublic UserList createUserListMembers(java.lang.String ownerScreenName, java.lang.String slug, long[] userIds) throws TwitterException
createUserListMembers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listuserIds
- The array of ids of the user to add as member of the list. up to 100 are allowed in a single request.TwitterException
- when Twitter service or network is unavailablepublic UserList addUserListMembers(long ownerId, java.lang.String slug, long[] userIds) throws TwitterException
addUserListMembers
in interface ListsResources
TwitterException
public UserList createUserListMembers(int listId, java.lang.String[] screenNames) throws TwitterException
createUserListMembers
in interface ListsResources
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 addUserListMembers(int listId, java.lang.String[] screenNames) throws TwitterException
addUserListMembers
in interface ListsResources
TwitterException
public UserList createUserListMembers(long ownerId, java.lang.String slug, java.lang.String[] screenNames) throws TwitterException
createUserListMembers
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listscreenNames
- 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 createUserListMembers(java.lang.String ownerScreenName, java.lang.String slug, java.lang.String[] screenNames) throws TwitterException
createUserListMembers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listscreenNames
- 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 addUserListMembers(long ownerId, java.lang.String slug, java.lang.String[] screenNames) throws TwitterException
addUserListMembers
in interface ListsResources
TwitterException
public User showUserListMembership(int listId, long userId) throws TwitterException
showUserListMembership
in interface ListsResources
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 User showUserListMembership(long ownerId, java.lang.String slug, long userId) throws TwitterException
showUserListMembership
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- 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 User showUserListMembership(java.lang.String ownerScreenName, java.lang.String slug, long userId) throws TwitterException
showUserListMembership
in interface ListsResources
ownerScreenName
- Id The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- 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> getUserListMembers(int listId, long cursor) throws TwitterException
getUserListMembers
in interface ListsResources
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 PagableResponseList<User> getUserListMembers(long ownerId, java.lang.String slug, long cursor) throws TwitterException
getUserListMembers
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug 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 PagableResponseList<User> getUserListMembers(java.lang.String ownerScreenName, java.lang.String slug, long cursor) throws TwitterException
getUserListMembers
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug 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 createUserListMember(int listId, long userId) throws TwitterException
createUserListMember
in interface ListsResources
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 addUserListMember(int listId, long userId) throws TwitterException
addUserListMember
in interface ListsResources
TwitterException
public UserList createUserListMember(long ownerId, java.lang.String slug, long userId) throws TwitterException
createUserListMember
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The id of the user to add as a member of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList createUserListMember(java.lang.String ownerScreenName, java.lang.String slug, long userId) throws TwitterException
createUserListMember
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listuserId
- The id of the user to add as a member of the list.TwitterException
- when Twitter service or network is unavailablepublic UserList addUserListMember(long ownerId, java.lang.String slug, long userId) throws TwitterException
addUserListMember
in interface ListsResources
TwitterException
public UserList destroyUserList(int listId) throws TwitterException
destroyUserList
in interface ListsResources
listId
- The id of the list to deleteTwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserList(long ownerId, java.lang.String slug) throws TwitterException
destroyUserList
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList destroyUserList(java.lang.String ownerScreenName, java.lang.String slug) throws TwitterException
destroyUserList
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList updateUserList(int listId, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription) throws TwitterException
updateUserList
in interface ListsResources
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 UserList updateUserList(long ownerId, java.lang.String slug, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription) throws TwitterException
updateUserList
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listnewListName
- 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 UserList updateUserList(java.lang.String ownerScreenName, java.lang.String slug, java.lang.String newListName, boolean isPublicList, java.lang.String newDescription) throws TwitterException
updateUserList
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listnewListName
- 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 unavailableprivate UserList updateUserList(java.lang.String newListName, boolean isPublicList, java.lang.String newDescription, twitter4j.internal.http.HttpParameter... params) throws TwitterException
TwitterException
public UserList createUserList(java.lang.String listName, boolean isPublicList, java.lang.String description) throws TwitterException
createUserList
in interface ListsResources
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 showUserList(int listId) throws TwitterException
showUserList
in interface ListsResources
listId
- The id of the list to showTwitterException
- when Twitter service or network is unavailablepublic UserList showUserList(long ownerId, java.lang.String slug) throws TwitterException
showUserList
in interface ListsResources
ownerId
- The user ID of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic UserList showUserList(java.lang.String ownerScreenName, java.lang.String slug) throws TwitterException
showUserList
in interface ListsResources
ownerScreenName
- The screen name of the user who owns the list being requested by a slug.slug
- slug of the listTwitterException
- when Twitter service or network is unavailablepublic PagableResponseList<UserList> getUserListSubscriptions(java.lang.String listOwnerScreenName, long cursor) throws TwitterException
getUserListSubscriptions
in interface ListsResources
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<SavedSearch> getSavedSearches() throws TwitterException
getSavedSearches
in interface SavedSearchesResources
TwitterException
- when Twitter service or network is unavailablepublic SavedSearch showSavedSearch(int id) throws TwitterException
showSavedSearch
in interface SavedSearchesResources
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 SavedSearchesResources
query
- the query stringTwitterException
- when Twitter service or network is unavailablepublic SavedSearch destroySavedSearch(int id) throws TwitterException
destroySavedSearch
in interface SavedSearchesResources
id
- The id of the saved search to be deleted.TwitterException
- when Twitter service or network is unavailablepublic Place getGeoDetails(java.lang.String placeId) throws TwitterException
PlacesGeoResources.reverseGeoCode(twitter4j.GeoQuery)
method.
getGeoDetails
in interface PlacesGeoResources
placeId
- The ID of the location to query about.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Place> reverseGeoCode(GeoQuery query) throws TwitterException
reverseGeoCode
in interface PlacesGeoResources
query
- search queryTwitterException
- when Twitter service or network is unavailablepublic ResponseList<Place> searchPlaces(GeoQuery query) throws TwitterException
searchPlaces
in interface PlacesGeoResources
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 PlacesGeoResources
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 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 PlacesGeoResources
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 Trends getLocationTrends(int woeid) throws TwitterException
getLocationTrends
in interface TrendsResources
woeid
- The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.TwitterException
- when Twitter service or network is unavailablepublic Trends getPlaceTrends(int woeid) throws TwitterException
getPlaceTrends
in interface TrendsResources
woeid
- The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Location> getAvailableTrends() throws TwitterException
getAvailableTrends
in interface TrendsResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<Location> getAvailableTrends(GeoLocation location) throws TwitterException
getAvailableTrends
in interface TrendsResources
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 ResponseList<Location> getClosestTrends(GeoLocation location) throws TwitterException
getClosestTrends
in interface TrendsResources
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 User reportSpam(long userId) throws TwitterException
reportSpam
in interface SpamReportingResource
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 SpamReportingResource
screenName
- The screen name of the user you want to report as a spammer.TwitterException
- when Twitter service or network is unavailablepublic TwitterAPIConfiguration getAPIConfiguration() throws TwitterException
getAPIConfiguration
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic ResponseList<HelpResources.Language> getLanguages() throws TwitterException
getLanguages
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic java.lang.String getPrivacyPolicy() throws TwitterException
getPrivacyPolicy
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic java.lang.String getTermsOfService() throws TwitterException
getTermsOfService
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic java.util.Map<java.lang.String,RateLimitStatus> getRateLimitStatus() throws TwitterException
getRateLimitStatus
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic java.util.Map<java.lang.String,RateLimitStatus> getRateLimitStatus(java.lang.String... resources) throws TwitterException
HelpResources
getRateLimitStatus
in interface HelpResources
TwitterException
- when Twitter service or network is unavailablepublic TimelinesResources timelines()
public TweetsResources tweets()
public SearchResource search()
public DirectMessagesResources directMessages()
directMessages
in interface Twitter
public FriendsFollowersResources friendsFollowers()
friendsFollowers
in interface Twitter
public UsersResources users()
public SuggestedUsersResources suggestedUsers()
suggestedUsers
in interface Twitter
public FavoritesResources favorites()
public ListsResources list()
public SavedSearchesResources savedSearches()
savedSearches
in interface Twitter
public PlacesGeoResources placesGeo()
public TrendsResources trends()
public SpamReportingResource spamReporting()
spamReporting
in interface Twitter
public HelpResources help()
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[] params) 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[] params) throws TwitterException
TwitterException
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.HttpParameter[] mergeImplicitParams(twitter4j.internal.http.HttpParameter[] params)
private boolean isOk(twitter4j.internal.http.HttpResponse response)
public java.lang.String toString()
toString
in class TwitterBaseImpl