twitter4j.api
Interface UserMethods

All Known Implementing Classes:
Twitter

public interface UserMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 PagableResponseList<User> getFollowersStatuses()
          Returns the authenticating user's followers, each with current status inline.
 PagableResponseList<User> getFollowersStatuses(int userId)
          Returns the specified user's followers, each with current status inline.
 PagableResponseList<User> getFollowersStatuses(int userId, long cursor)
          Returns the specified user's followers, each with current status inline.
 PagableResponseList<User> getFollowersStatuses(long cursor)
          Returns the authenticating user's followers, each with current status inline.
 PagableResponseList<User> getFollowersStatuses(java.lang.String screenName)
          Returns the specified user's followers, each with current status inline.
 PagableResponseList<User> getFollowersStatuses(java.lang.String screenName, long cursor)
          Returns the specified user's followers, each with current status inline.
 PagableResponseList<User> getFriendsStatuses()
          Returns a user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(int userId)
          Returns a user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(int userId, long cursor)
          Returns a user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(long cursor)
          Returns a user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(java.lang.String screenName)
          Returns a user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(java.lang.String screenName, long cursor)
          Returns a user's friends, each with current status inline.
 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(int[] 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(int 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.
 

Method Detail

showUser

User showUser(java.lang.String screenName)
              throws TwitterException
Returns extended information of a given user, specified by ID or screen name as per the required id parameter. The author's most recent status will be returned inline.
This method calls http://api.twitter.com/1/users/show.json

Parameters:
screenName - the screen name of the user for whom to request the detail
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
GET users/show | dev.twitter.com

showUser

User showUser(int userId)
              throws TwitterException
Returns extended information of a given user, specified by ID or screen name as per the required id parameter. The author's most recent status will be returned inline.
This method calls http://api.twitter.com/1/users/show.json

Parameters:
userId - the ID of the user for whom to request the detail
Returns:
users
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET users/show | dev.twitter.com

lookupUsers

ResponseList<User> lookupUsers(java.lang.String[] screenNames)
                               throws TwitterException
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two. The author's most recent status (if the authenticating user has permission) will be returned inline.
This method calls http://api.twitter.com/1/users/lookup.json

Parameters:
screenNames - Specifies the screen names of the users to return.
Returns:
users
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET users/lookup | dev.twitter.com

lookupUsers

ResponseList<User> lookupUsers(int[] ids)
                               throws TwitterException
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two. The author's most recent status (if the authenticating user has permission) will be returned inline.
This method calls http://api.twitter.com/1/users/lookup.json

Parameters:
ids - Specifies the screen names of the users to return.
Returns:
users
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET users/lookup | dev.twitter.com

searchUsers

ResponseList<User> searchUsers(java.lang.String query,
                               int page)
                               throws TwitterException
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.
This method calls http://api.twitter.com/1/users/search.json

Parameters:
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.
Returns:
the list of Users matches the provided
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
GET users/search | dev.twitter.com

getSuggestedUserCategories

ResponseList<Category> getSuggestedUserCategories()
                                                  throws TwitterException
Access to Twitter's suggested user list. This returns the list of suggested user categories. The category can be used in the users/suggestions/category endpoint to get the users in that category.
This method calls http://api.twitter.com/1/users/suggestions.json

Returns:
list of suggested user categories.
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET users/suggestions | dev.twitter.com

getUserSuggestions

ResponseList<User> getUserSuggestions(java.lang.String categorySlug)
                                      throws TwitterException
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.
This method calls http://api.twitter.com/1/users/suggestions/:slug.json

Parameters:
categorySlug - slug
Returns:
list of suggested users
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET users/suggestions/slug | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses()
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.)
This method calls http://api.twitter.com/1/statuses/friends.json

Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
GET statuses/friends | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(long cursor)
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.)
This method calls http://api.twitter.com/1/statuses/friends.json

Parameters:
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.
Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/friends | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(java.lang.String screenName)
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.) This method automatically provides a value of cursor=-1 to begin paging.
This method calls http://api.twitter.com/1/statuses/friends.json

Parameters:
screenName - the screen name of the user for whom to request a list of friends
Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/friends | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(int userId)
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.) This method automatically provides a value of cursor=-1 to begin paging.
This method calls http://api.twitter.com/1/statuses/friends.json

Parameters:
userId - the ID of the user for whom to request a list of friends
Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET statuses/friends | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(java.lang.String screenName,
                                             long cursor)
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.)
This method calls http://api.twitter.com/1/statuses/friends.json

Parameters:
screenName - the screen name of the user for whom to request a list of friends
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.
Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/friends | dev.twitter.com

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(int userId,
                                             long cursor)
                                             throws TwitterException
Returns a user's friends, each with current status inline. They are ordered by the order in which the user followed them, most recently followed first, 100 at a time. (Please note that the result set isn't guaranteed to be 100 every time as suspended users will be filtered out.)
This method calls http://api.twitter.com/1/statuses/friends.json

Parameters:
userId - the ID of the user for whom to request a list of friends
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.
Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET statuses/friends | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses()
                                               throws TwitterException
Returns the authenticating user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method automatically provides a value of cursor=-1 to begin paging.
This method calls http://api.twitter.com/1/statuses/followers.json

Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/followers | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses(long cursor)
                                               throws TwitterException
Returns the authenticating user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method calls http://api.twitter.com/1/statuses/followers.json

Parameters:
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.
Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/followers | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses(java.lang.String screenName)
                                               throws TwitterException
Returns the specified user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method calls http://api.twitter.com/1/statuses/followers.json

Parameters:
screenName - The screen name of the user for whom to request a list of followers.
Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/followers | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses(int userId)
                                               throws TwitterException
Returns the specified user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method calls http://api.twitter.com/1/statuses/followers.json

Parameters:
userId - The ID of the user for whom to request a list of followers.
Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET statuses/followers | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses(java.lang.String screenName,
                                               long cursor)
                                               throws TwitterException
Returns the specified user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method calls http://api.twitter.com/1/statuses/followers.json

Parameters:
screenName - 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.
Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
GET statuses/followers | dev.twitter.com

getFollowersStatuses

PagableResponseList<User> getFollowersStatuses(int userId,
                                               long cursor)
                                               throws TwitterException
Returns the specified user's followers, each with current status inline. They are ordered by the order in which they joined Twitter (this is going to be changed).
This method calls http://api.twitter.com/1/statuses/followers.json

Parameters:
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.
Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET statuses/followers | dev.twitter.com