public interface UserMethods
Modifier and Type | Method and Description |
---|---|
PagableResponseList<User> |
getFollowersStatuses(long cursor)
Deprecated.
use
FriendsFollowersMethods.getFollowersIDs(long) and lookupUsers(long[]) instead |
PagableResponseList<User> |
getFollowersStatuses(long userId,
long cursor)
Deprecated.
|
PagableResponseList<User> |
getFollowersStatuses(java.lang.String screenName,
long cursor)
Deprecated.
|
PagableResponseList<User> |
getFriendsStatuses(long cursor)
Deprecated.
use
FriendsFollowersMethods.getFriendsIDs(long) and lookupUsers(long[]) instead |
PagableResponseList<User> |
getFriendsStatuses(long userId,
long cursor)
Deprecated.
use
FriendsFollowersMethods.getFriendsIDs(long, long) and lookupUsers(long[]) instead |
PagableResponseList<User> |
getFriendsStatuses(java.lang.String screenName,
long cursor)
Deprecated.
|
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.
|
ProfileImage |
getProfileImage(java.lang.String screenName,
ProfileImage.ImageSize size)
Access the profile image in various sizes for the user with the indicated screen_name.
|
ResponseList<Category> |
getSuggestedUserCategories()
Access to Twitter's suggested user list.
|
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<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.
|
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. |
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.
|
User showUser(java.lang.String screenName) throws TwitterException
screenName
- the screen name of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailableUser showUser(long userId) throws TwitterException
userId
- the ID of the user for whom to request the detailTwitterException
- when Twitter service or network is unavailableResponseList<User> lookupUsers(java.lang.String[] screenNames) throws TwitterException
screenNames
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailableResponseList<User> lookupUsers(long[] ids) throws TwitterException
ids
- Specifies the screen names of the users to return.TwitterException
- when Twitter service or network is unavailableResponseList<User> searchUsers(java.lang.String query, int page) throws TwitterException
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 unavailableResponseList<Category> getSuggestedUserCategories() throws TwitterException
TwitterException
- when Twitter service or network is unavailableResponseList<User> getUserSuggestions(java.lang.String categorySlug) throws TwitterException
categorySlug
- slugTwitterException
- when Twitter service or network is unavailableResponseList<User> getMemberSuggestions(java.lang.String categorySlug) throws TwitterException
categorySlug
- slugTwitterException
- when Twitter service or network is unavailableProfileImage getProfileImage(java.lang.String screenName, ProfileImage.ImageSize size) throws TwitterException
screenName
- The screen name of the user for whom to return results for.size
- Specifies the size of image to fetch. Not specifying a size will give the default, normal size of 48px by 48px. Valid options include: BIGGER - 73px by 73px NORMAL - 48px by 48px MINI - 24px by 24pxTwitterException
- when Twitter service or network is unavailablePagableResponseList<User> getFriendsStatuses(long cursor) throws TwitterException
cursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailablePagableResponseList<User> getFriendsStatuses(java.lang.String screenName, long cursor) throws TwitterException
screenName
- the screen name of the user for whom to request a list of friendscursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailablePagableResponseList<User> getFriendsStatuses(long userId, long cursor) throws TwitterException
userId
- the ID of the user for whom to request a list of friendscursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailablePagableResponseList<User> getFollowersStatuses(long cursor) throws TwitterException
cursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailablePagableResponseList<User> getFollowersStatuses(java.lang.String screenName, long cursor) throws TwitterException
FriendsFollowersMethods.getFollowersIDs(String, long)
and lookupUsers(long[])
insteadscreenName
- The screen name of the user for whom to request a list of followers.cursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailablePagableResponseList<User> getFollowersStatuses(long userId, long cursor) throws TwitterException
userId
- The ID of the user for whom to request a list of followers.cursor
- Breaks the results into pages. A single page contains 100 users. This is recommended for users who are followed by many other users. 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 unavailable