Package twitter4j.v1
Interface FavoritesResources
public interface FavoritesResources
-
Method Summary
Modifier and TypeMethodDescriptioncreateFavorite
(long id) Favorites the status specified in the ID parameter as the authenticating user.destroyFavorite
(long id) Un-favorites the status specified in the ID parameter as the authenticating user.Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.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.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.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.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.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.
-
Method Details
-
getFavorites
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:
-
getFavorites
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:
-
getFavorites
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:
-
getFavorites
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:
-
getFavorites
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 statusespaging
- 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:
-
getFavorites
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 statusespaging
- 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:
-
createFavorite
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:
-
destroyFavorite
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:
-