twitter4j.api
Interface FriendshipMethodsAsync

All Known Implementing Classes:
AsyncTwitter

public interface FriendshipMethodsAsync

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 void createFriendship(int userId)
          Befriends the user specified in the ID parameter as the authenticating user.
 void createFriendship(int userId, boolean follow)
          Befriends the user specified in the ID parameter as the authenticating user.
 void createFriendship(java.lang.String screenName)
          Befriends the user specified in the ID parameter as the authenticating user.
 void createFriendship(java.lang.String screenName, boolean follow)
          Befriends the user specified in the ID parameter as the authenticating user.
 void destroyFriendship(int userId)
          Discontinues friendship with the specified in the ID parameter as the authenticating user.
 void destroyFriendship(java.lang.String screenName)
          Discontinues friendship with the specified in the ID parameter as the authenticating user.
 void existsFriendship(java.lang.String userA, java.lang.String userB)
          Tests if a friendship exists between two users.
 void showFriendship(int sourceId, int targetId)
          Gets the detailed relationship status between a source user and a target user
This method calls http://api.twitter.com/1/friendships/show.json
 void showFriendship(java.lang.String sourceScreenName, java.lang.String targetScreenName)
          Gets the detailed relationship status between a source user and a target user
This method calls http://api.twitter.com/1/friendships/show.json
 

Method Detail

createFriendship

void createFriendship(java.lang.String screenName)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.
This method calls http://api.twitter.com/1/friendships/create

Parameters:
screenName - the screen name of the user to be befriended
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0create

createFriendship

void createFriendship(int userId)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.
This method calls http://api.twitter.com/1/friendships/create

Parameters:
userId - the ID of the user to be befriended
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0create

createFriendship

void createFriendship(java.lang.String screenName,
                      boolean follow)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.
This method calls http://api.twitter.com/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:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0create

createFriendship

void createFriendship(int userId,
                      boolean follow)
Befriends the user specified in the ID parameter as the authenticating user. Returns the befriended user in the requested format when successful.
This method calls http://api.twitter.com/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:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0create

destroyFriendship

void destroyFriendship(java.lang.String screenName)
Discontinues friendship with the specified in the ID parameter as the authenticating user. Returns the un-friended user in the requested format when successful.
This method calls http://api.twitter.com/1/friendships/destroy

Parameters:
screenName - the screen name of the user to be befriended
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0destroy

destroyFriendship

void destroyFriendship(int userId)
Discontinues friendship with the specified in the ID parameter as the authenticating user. Returns the un-friended user in the requested format when successful.
This method calls http://api.twitter.com/1/friendships/destroy

Parameters:
userId - the screen name of the user to be befriended
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: friendships%C2%A0destroy

existsFriendship

void existsFriendship(java.lang.String userA,
                      java.lang.String userB)
Tests if a friendship exists between two users.
This method calls http://api.twitter.com/1/friendships/exists

Parameters:
userA - The ID or screen_name of the first user to test friendship for.
userB - The ID or screen_name of the second user to test friendship for.
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: friendships exists

showFriendship

void showFriendship(java.lang.String sourceScreenName,
                    java.lang.String targetScreenName)
Gets the detailed relationship status between a source user and a target user
This method calls http://api.twitter.com/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:
Twitter API Wiki / Twitter REST API Method: friendships show

showFriendship

void showFriendship(int sourceId,
                    int targetId)
Gets the detailed relationship status between a source user and a target user
This method calls http://api.twitter.com/1/friendships/show.json

Parameters:
sourceId - the screen ID of the source user
targetId - the screen ID of the target user
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: friendships show