twitter4j.api

## Interface FavoritesResources

All Known Subinterfaces:
  Twitter

    public interface FavoritesResources

Author:
  Joern Huxhorn - jhuxhorn at googlemail.com

### Method Summary

All Methods Instance Methods Abstract Methods
`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(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(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(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.

### 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 https://api.twitter.com/1.1/favorites.json

Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 2.0.1
See Also:
  GET favorites | Twitter Developers

#### getFavorites

    ResponseList<Status> getFavorites(long userId)
                               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:
  `userId` - the id of the user for whom to request a list of favorite statuses
Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 3.0.0
See Also:
  GET favorites | Twitter Developers

#### getFavorites

    ResponseList<Status> getFavorites(String screenName)
                               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:
  `screenName` - the screen name of the user for whom to request a list of favorite statuses
Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 2.0.1
See Also:
  GET favorites | Twitter Developers

#### getFavorites

    ResponseList<Status> getFavorites(Paging paging)
                               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 https://api.twitter.com/1.1/favorites.json

Parameters:
  `paging` - controls pagination. Supports sinceId and page parameters.
Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 2.2.5
See Also:
  GET favorites | Twitter Developers

#### getFavorites

    ResponseList<Status> getFavorites(long userId,
                                      Paging paging)
                               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 https://api.twitter.com/1.1/favorites/[id].json

Parameters:
  `userId` - the id of the user for whom to request a list of favorite statuses
  `paging` - controls pagination. Supports sinceId and page parameters.
Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 3.0.0
See Also:
  GET favorites | Twitter Developers

#### getFavorites

    ResponseList<Status> getFavorites(String screenName,
                                      Paging paging)
                               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 https://api.twitter.com/1.1/favorites/[id].json

Parameters:
  `screenName` - the screen name of the user for whom to request a list of favorite statuses
  `paging` - controls pagination. Supports sinceId and page parameters.
Returns:
  favorite statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
Since:
  Twitter4J 2.2.5
See Also:
  GET favorites | Twitter Developers

#### 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 https://api.twitter.com/1.1/favorites/create/[id].json

Parameters:
  `id` - the ID of the status to favorite
Returns:
  created favorite status
Throws:
  `TwitterException` - when Twitter service or network is unavailable
See Also:
  POST favorites/create/:id | Twitter Developers

#### 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 https://api.twitter.com/1.1/favorites/destroy/[id].json

Parameters:
  `id` - the ID of the status to un-favorite
Returns:
  destroyed statuses
Throws:
  `TwitterException` - when Twitter service or network is unavailable
See Also:
  POST favorites/destroy/:id | Twitter Developers