twitter4j.api
Interface FavoriteMethods

All Known Implementing Classes:
Twitter

public interface FavoriteMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 Status createFavorite(long id)
          Favorites the status specified in the ID parameter as the authenticating user.
 Status destroyFavorite(long id)
          Un-favorites the status specified in the ID parameter as the authenticating user.
 ResponseList<Status> getFavorites()
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 ResponseList<Status> getFavorites(int page)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 ResponseList<Status> getFavorites(java.lang.String id)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 ResponseList<Status> getFavorites(java.lang.String id, int page)
          Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
 

Method Detail

getFavorites

ResponseList<Status> getFavorites()
                                  throws TwitterException
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
This method calls http://api.twitter.com/1/favorites.json

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

getFavorites

ResponseList<Status> getFavorites(int page)
                                  throws TwitterException
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
This method calls http://api.twitter.com/1/favorites.json

Parameters:
page - the number of page
Returns:
ResponseList
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: favorites

getFavorites

ResponseList<Status> getFavorites(java.lang.String id)
                                  throws TwitterException
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

Parameters:
id - the ID or screen name of the user for whom to request a list of favorite statuses
Returns:
ResponseList
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: favorites

getFavorites

ResponseList<Status> getFavorites(java.lang.String id,
                                  int page)
                                  throws TwitterException
Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
This method calls http://api.twitter.com/1/favorites/[id].json

Parameters:
id - the ID or screen name of the user for whom to request a list of favorite statuses
page - the number of page
Returns:
ResponseList
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: favorites

createFavorite

Status createFavorite(long id)
                      throws TwitterException
Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.
This method calls http://api.twitter.com/1/favorites/create/[id].json

Parameters:
id - the ID of the status to favorite
Returns:
Status
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
Twitter API Wiki / Twitter REST API Method: favorites create

destroyFavorite

Status destroyFavorite(long id)
                       throws TwitterException
Un-favorites the status specified in the ID parameter as the authenticating user. Returns the un-favorited status in the requested format when successful.
This method calls http://api.twitter.com/1/favorites/destroy/[id].json

Parameters:
id - the ID of the status to un-favorite
Returns:
Status
Throws:
TwitterException - when Twitter service or network is unavailable
See Also:
Twitter API Wiki / Twitter REST API Method: favorites destroy