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 the specified user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(int userId)
          Returns the specified user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(int userId, long cursor)
          Returns the specified user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(long cursor)
          Returns the user's friends, each with current status inline.

This method calls http://api.twitter.com/1/statuses/friends
 PagableResponseList<User> getFriendsStatuses(java.lang.String screenName)
          Returns the specified user's friends, each with current status inline.
 PagableResponseList<User> getFriendsStatuses(java.lang.String screenName, long cursor)
          Returns the specified user's friends, each with current status inline.
 ResponseList<User> searchUsers(java.lang.String query, int page)
          Run a search for users similar to Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API (about being listed in the People Search).
 User showUser(int userId)
          Returns extended information of a given user, specified by ID.
 User showUser(java.lang.String screenName)
          Returns extended information of a given user, specified by screen name as per the required id parameter below.
 

Method Detail

showUser

User showUser(java.lang.String screenName)
              throws TwitterException
Returns extended information of a given user, specified by screen name as per the required id parameter below. This information includes design settings, so third party developers can theme their widgets according to a given user's preferences.
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:
Twitter API Wiki / Twitter REST API Method: users show

showUser

User showUser(int userId)
              throws TwitterException
Returns extended information of a given user, specified by ID. This information includes design settings, so third party developers can theme their widgets according to a given user's preferences.
This method calls http://api.twitter.com/1/users/show

Parameters:
userId - the ID of the user for whom to request the detail
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: users show

searchUsers

ResponseList<User> searchUsers(java.lang.String query,
                               int page)
                               throws TwitterException
Run a search for users similar to Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API (about being listed in the People Search). 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:
Twitter API Wiki / Twitter REST API Method: users search

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses()
                                             throws TwitterException
Returns the specified user's friends, each with current status inline.
This method calls http://api.twitter.com/1/statuses/friends

Returns:
the list of friends
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
Twitter API Wiki / Twitter REST API Method: statuses friends

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(long cursor)
                                             throws TwitterException
Returns the user's friends, each with current status inline.

This method calls http://api.twitter.com/1/statuses/friends

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:
Twitter API Wiki / Twitter REST API Method: statuses friends

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(java.lang.String screenName)
                                             throws TwitterException
Returns the specified user's friends, each with current status inline. This method automatically provides a value of cursor=-1 to begin paging.
This method calls http://api.twitter.com/1/statuses/friends

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:
Twitter API Wiki / Twitter REST API Method: statuses friends

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(int userId)
                                             throws TwitterException
Returns the specified user's friends, each with current status inline. This method automatically provides a value of cursor=-1 to begin paging.
This method calls http://api.twitter.com/1/statuses/friends

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:
Twitter API Wiki / Twitter REST API Method: statuses friends

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(java.lang.String screenName,
                                             long cursor)
                                             throws TwitterException
Returns the specified user's friends, each with current status inline.
This method calls http://api.twitter.com/1/statuses/friends

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:
Twitter API Wiki / Twitter REST API Method: statuses friends

getFriendsStatuses

PagableResponseList<User> getFriendsStatuses(int userId,
                                             long cursor)
                                             throws TwitterException
Returns the specified user's friends, each with current status inline.
This method calls http://api.twitter.com/1/statuses/friends

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:
Twitter API Wiki / Twitter REST API Method: statuses friends

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

Returns:
List
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.9
See Also:
Twitter API Wiki / Twitter REST API Method: statuses followers

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

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:
Twitter API Wiki / Twitter REST API Method: statuses followers

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

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:
Twitter API Wiki / Twitter REST API Method: statuses followers

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

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:
Twitter API Wiki / Twitter REST API Method: statuses followers

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

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:
Twitter API Wiki / Twitter REST API Method: statuses followers

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

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:
Twitter API Wiki / Twitter REST API Method: statuses followers