twitter4j.api

## Interface FriendsFollowersResourcesAsync

All Known Subinterfaces:
  AsyncTwitter

    public interface FriendsFollowersResourcesAsync

Author:
  Joern Huxhorn - jhuxhorn at googlemail.com

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `createFriendship(long userId)` Allows the authenticating users to follow the user specified in the ID parameter. Returns the befriended user in the requested format when successful.
`void` `createFriendship(long userId, boolean follow)` Allows the authenticating users to follow the user specified in the ID parameter. Returns the befriended user in the requested format when successful.
`void` `createFriendship(String screenName)` Allows the authenticating users to follow the user specified in the ID parameter. Returns the befriended user in the requested format when successful.
`void` `createFriendship(String screenName, boolean follow)` Allows the authenticating users to follow the user specified in the ID parameter. Returns the befriended user in the requested format when successful.
`void` `destroyFriendship(long userId)` Allows the authenticating users to unfollow the user specified in the ID parameter. Returns the unfollowed user in the requested format when successful.
`void` `destroyFriendship(String screenName)` Allows the authenticating users to unfollow the user specified in the ID parameter. Returns the unfollowed user in the requested format when successful.
`void` `getFollowersIDs(long cursor)` Returns an array of numeric IDs for every user the specified user is followed by.
`void` `getFollowersIDs(long userId, long cursor)` Returns an array of numeric IDs for every user the specified user is followed by.
`void` `getFollowersIDs(String screenName, long cursor)` Returns an array of numeric IDs for every user the specified user is followed by.
`void` `getFollowersList(long userId, long cursor)` Returns a cursored collection of user objects for users following the specified user. At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues.
`void` `getFollowersList(String screenName, long cursor)` Returns a cursored collection of user objects for users following the specified user. At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues.
`void` `getFriendsIDs(long cursor)` Returns an array of numeric IDs for every user the authenticating user is following.
`void` `getFriendsIDs(long userId, long cursor)` Returns an array of numeric IDs for every user the specified user is following.
`void` `getFriendsIDs(String screenName, long cursor)` Returns an array of numeric IDs for every user the specified user is following.
`void` `getFriendsList(long userId, long cursor)` Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends"). At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues.
`void` `getFriendsList(String screenName, long cursor)` Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends"). At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues.
`void` `getIncomingFriendships(long cursor)` Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
`void` `getOutgoingFriendships(long cursor)` Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
`void` `lookupFriendships(long... ids)` Returns the relationship of the authenticating user to the specified users.
`void` `lookupFriendships(String... screenNames)` Returns the relationship of the authenticating user to the specified users.
`void` `showFriendship(long sourceId, long targetId)` Returns detailed information about the relationship between two users.
`void` `showFriendship(String sourceScreenName, String targetScreenName)` Returns detailed information about the relationship between two users.
`void` `updateFriendship(long userId, boolean enableDeviceNotification, boolean retweets)` Allows you to enable or disable retweets and device notifications from the specified user.
`void` `updateFriendship(String screenName, boolean enableDeviceNotification, boolean retweets)` Allows you to enable or disable retweets and device notifications from the specified user.

### Method Detail

#### getFriendsIDs

    void getFriendsIDs(long cursor)

Returns an array of numeric IDs for every user the authenticating user is following.
This method calls https://api.twitter.com/1.1/friends/ids.json

Parameters:
  `cursor` - Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.
Since:
  Twitter4J 2.0.10
See Also:
  GET friends/ids | Twitter Developers

#### getFriendsIDs

    void getFriendsIDs(long userId,
                       long cursor)

Returns an array of numeric IDs for every user the specified user is following.
This method calls https://api.twitter.com/1.1/friends/ids.json

Parameters:
  `userId` - Specifies the ID of the user for whom to return the friends list.
  `cursor` - Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.
Since:
  Twitter4J 2.0.10
See Also:
  GET friends/ids | Twitter Developers

#### getFriendsIDs

    void getFriendsIDs(String screenName,
                       long cursor)

Returns an array of numeric IDs for every user the specified user is following.
This method calls https://api.twitter.com/1.1/friends/ids.json

Parameters:
  `screenName` - Specifies the screen name of the user for whom to return the friends list.
  `cursor` - Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.
Since:
  Twitter4J 2.0.10
See Also:
  GET friends/ids | Twitter Developers

#### getFollowersIDs

    void getFollowersIDs(long cursor)

Returns an array of numeric IDs for every user the specified user is followed by.
This method calls https://api.twitter.com/1.1/followers/ids.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.
Since:
  Twitter4J 2.0.10
See Also:
  GET followers/ids | Twitter Developers

#### getFollowersIDs

    void getFollowersIDs(long userId,
                         long cursor)

Returns an array of numeric IDs for every user the specified user is followed by.
This method calls https://api.twitter.com/1.1/followers/ids.json

Parameters:
  `userId` - Specifies the ID of the user for whom to return the followers list.
  `cursor` - Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.
Since:
  Twitter4J 2.0.10
See Also:
  GET followers/ids | Twitter Developers

#### getFollowersIDs

    void getFollowersIDs(String screenName,
                         long cursor)

Returns an array of numeric IDs for every user the specified user is followed by.
This method calls https://api.twitter.com/1.1/followers/ids.json

Parameters:
  `screenName` - Specifies the screen name of the user for whom to return the followers list.
  `cursor` - Specifies the page number of the results beginning at 1. A single page contains 5000 ids. This is recommended for users with large ID lists. If not provided all ids are returned.
Since:
  Twitter4J 2.0.10
See Also:
  GET followers/ids | Twitter Developers

#### lookupFriendships

    void lookupFriendships(long... ids)

Returns the relationship of the authenticating user to the specified users.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls https://api.twitter.com/1.1/friendships/lookup.json

Parameters:
  `ids` - array of the ids to lookup
Since:
  Twitter4J 2.1.9
See Also:
  #newtwitter and the API - Twitter API Announcements | Google Group

#### lookupFriendships

    void lookupFriendships(String... screenNames)

Returns the relationship of the authenticating user to the specified users.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls https://api.twitter.com/1.1/friendships/lookup.json

Parameters:
  `screenNames` - array of the screen names to lookup
Since:
  Twitter4J 2.1.9
See Also:
  #newtwitter and the API - Twitter API Announcements | Google Group

#### getIncomingFriendships

    void getIncomingFriendships(long cursor)

Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
This method calls https://api.twitter.com/1.1/friendships/incoming.json

Parameters:
  `cursor` - Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.
Since:
  Twitter4J 2.1.2
See Also:
  GET friendships/incoming | Twitter Developers

#### getOutgoingFriendships

    void getOutgoingFriendships(long cursor)

Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
This method calls https://api.twitter.com/1.1/friendships/outgoing.json

Parameters:
  `cursor` - Breaks the results into pages. A single page contains 5000 identifiers. Provide a value of -1 to begin paging.
Since:
  Twitter4J 2.1.2
See Also:
  GET friendships/outgoing | Twitter Developers

#### createFriendship

    void createFriendship(long userId)

Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. If you are already friends with the user an HTTP 403 will be returned.
This method calls https://api.twitter.com/1.1/friendships/create

Parameters:
  `userId` - the ID of the user to be befriended
Since:
  Twitter4J 2.1.0
See Also:
  POST friendships/create | Twitter Developers

#### createFriendship

    void createFriendship(String screenName)

Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. If you are already friends with the user an HTTP 403 will be returned.
This method calls https://api.twitter.com/1.1/friendships/create

Parameters:
  `screenName` - the screen name of the user to be befriended
Since:
  Twitter4J 2.0.1
See Also:
  POST friendships/create | Twitter Developers

#### createFriendship

    void createFriendship(long userId,
                          boolean follow)

Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. If you are already friends with the user an HTTP 403 will be returned.
This method calls https://api.twitter.com/1.1/friendships/create

Parameters:
  `userId` - the ID of the user to be befriended
  `follow` - Enable notifications for the target user in addition to becoming friends.
Since:
  Twitter4J 2.1.0
See Also:
  POST friendships/create | Twitter Developers

#### createFriendship

    void createFriendship(String screenName,
                          boolean follow)

Allows the authenticating users to follow the user specified in the ID parameter.
Returns the befriended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful. If you are already friends with the user an HTTP 403 will be returned.
This method calls https://api.twitter.com/1.1/friendships/create

Parameters:
  `screenName` - the screen name of the user to be befriended
  `follow` - Enable notifications for the target user in addition to becoming friends.
Since:
  Twitter4J 2.0.1
See Also:
  POST friendships/create | Twitter Developers

#### destroyFriendship

    void destroyFriendship(long userId)

Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. Returns a string describing the failure condition when unsuccessful.
This method calls https://api.twitter.com/1.1/friendships/destroy

Parameters:
  `userId` - the screen name of the user to be befriended
Since:
  Twitter4J 2.1.0
See Also:
  POST friendships/destroy | Twitter Developers

#### destroyFriendship

    void destroyFriendship(String screenName)

Allows the authenticating users to unfollow the user specified in the ID parameter.
Returns the unfollowed user in the requested format when successful. Returns a string describing the failure condition when unsuccessful.
This method calls https://api.twitter.com/1.1/friendships/destroy

Parameters:
  `screenName` - the screen name of the user to be befriended
Since:
  Twitter4J 2.0.1
See Also:
  POST friendships/destroy | Twitter Developers

#### updateFriendship

    void updateFriendship(long userId,
                          boolean enableDeviceNotification,
                          boolean retweets)

Allows you to enable or disable retweets and device notifications from the specified user.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls https://api.twitter.com/1.1/friendships/update.json

Parameters:
  `userId` - user id to update
  `enableDeviceNotification` - set true to enable device notification
  `retweets` - set true to enable retweets
Since:
  Twitter4J 2.1.9
See Also:
  #newtwitter and the API - Twitter API Announcements | Google Group

#### updateFriendship

    void updateFriendship(String screenName,
                          boolean enableDeviceNotification,
                          boolean retweets)

Allows you to enable or disable retweets and device notifications from the specified user.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls https://api.twitter.com/1.1/friendships/update.json

Parameters:
  `screenName` - screen name to update
  `enableDeviceNotification` - set true to enable device notification
  `retweets` - set true to enable retweets
Since:
  Twitter4J 2.1.9
See Also:
  #newtwitter and the API - Twitter API Announcements | Google Group

#### showFriendship

    void showFriendship(long sourceId,
                        long targetId)

Returns detailed information about the relationship between two users.
This method calls https://api.twitter.com/1.1/friendships/show.json

Parameters:
  `sourceId` - the ID of the source user
  `targetId` - the ID of the target user
Since:
  Twitter4J 2.1.0
See Also:
  GET friendships/show | Twitter Developers

#### showFriendship

    void showFriendship(String sourceScreenName,
                        String targetScreenName)

Returns detailed information about the relationship between two users.
This method calls https://api.twitter.com/1.1/friendships/show.json

Parameters:
  `sourceScreenName` - the screen name of the source user
  `targetScreenName` - the screen name of the target user
Since:
  Twitter4J 2.1.0
See Also:
  GET friendships/show | Twitter Developers

#### getFriendsList

    void getFriendsList(long userId,
                        long cursor)

Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
This method calls https://api.twitter.com/1.1/friends/list.json

Parameters:
  `userId` - The ID of the user for whom to return results for.
  `cursor` - Causes the results to be broken into pages of no more than 20 records at a time.
Since:
  Twitter4J 3.0.2
See Also:
  GET friends/list | Twitter Developers

#### getFriendsList

    void getFriendsList(String screenName,
                        long cursor)

Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
This method calls https://api.twitter.com/1.1/friends/list.json

Parameters:
  `screenName` - The screen name of the user for whom to return results for.
  `cursor` - Causes the results to be broken into pages of no more than 20 records at a time.
Since:
  Twitter4J 3.0.2
See Also:
  GET friends/list | Twitter Developers

#### getFollowersList

    void getFollowersList(long userId,
                          long cursor)

Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
This method calls https://api.twitter.com/1.1/followers/list.json

Parameters:
  `userId` - The ID of the user for whom to return results for.
  `cursor` - Causes the results to be broken into pages of no more than 20 records at a time.
Since:
  Twitter4J 3.0.2
See Also:
  GET followers/list | Twitter Developers

#### getFollowersList

    void getFollowersList(String screenName,
                          long cursor)

Returns a cursored collection of user objects for users following the specified user.
At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
This method calls https://api.twitter.com/1.1/followers/list.json

Parameters:
  `screenName` - The screen name of the user for whom to return results for.
  `cursor` - Causes the results to be broken into pages of no more than 20 records at a time.
Since:
  Twitter4J 3.0.2
See Also:
  GET followers/list | Twitter Developers