twitter4j.api
Interface BlockMethods

All Known Implementing Classes:
Twitter

public interface BlockMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 User createBlock(int userId)
          Blocks the user specified in the ID parameter as the authenticating user.
 User createBlock(java.lang.String screenName)
          Blocks the user specified in the ID parameter as the authenticating user.
 User destroyBlock(int userId)
          Un-blocks the user specified in the ID parameter as the authenticating user.
 User destroyBlock(java.lang.String screen_name)
          Un-blocks the user specified in the ID parameter as the authenticating user.
 boolean existsBlock(int userId)
          Tests if a friendship exists between two users.
 boolean existsBlock(java.lang.String screenName)
          Tests if a friendship exists between two users.
 ResponseList<User> getBlockingUsers()
          Returns a list of user objects that the authenticating user is blocking.
 ResponseList<User> getBlockingUsers(int page)
          Returns a list of user objects that the authenticating user is blocking.
 IDs getBlockingUsersIDs()
          Returns an array of numeric user ids the authenticating user is blocking.
 

Method Detail

createBlock

User createBlock(java.lang.String screenName)
                 throws TwitterException
Blocks the user specified in the ID parameter as the authenticating user. Returns the blocked user in the requested format when successful.
This method calls http://api.twitter.com/1/blocks/create/[id].json

Parameters:
screenName - the screen_name of the user to block
Returns:
the blocked user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: blocks create

createBlock

User createBlock(int userId)
                 throws TwitterException
Blocks the user specified in the ID parameter as the authenticating user. Returns the blocked user in the requested format when successful.
This method calls http://api.twitter.com/1/blocks/create/[id].json

Parameters:
userId - the ID of the user to block
Returns:
the blocked user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: blocks create

destroyBlock

User destroyBlock(java.lang.String screen_name)
                  throws TwitterException
Un-blocks the user specified in the ID parameter as the authenticating user. Returns the un-blocked user in the requested format when successful.
This method calls http://api.twitter.com/1/blocks/destroy/[id].json

Parameters:
screen_name - the screen_name of the user to block
Returns:
the unblocked user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: blocks destroy

destroyBlock

User destroyBlock(int userId)
                  throws TwitterException
Un-blocks the user specified in the ID parameter as the authenticating user. Returns the un-blocked user in the requested format when successful.
This method calls http://api.twitter.com/1/blocks/destroy/[id].json

Parameters:
userId - the ID of the user to block
Returns:
the unblocked user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: blocks destroy

existsBlock

boolean existsBlock(java.lang.String screenName)
                    throws TwitterException
Tests if a friendship exists between two users.
This method calls http://api.twitter.com/1/blocks/exists/[id].json

Parameters:
screenName - The screen_name of the potentially blocked user.
Returns:
if the authenticating user is blocking a target user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.4
See Also:
Twitter API Wiki / Twitter REST API Method: blocks exists

existsBlock

boolean existsBlock(int userId)
                    throws TwitterException
Tests if a friendship exists between two users.
This method calls http://api.twitter.com/1/blocks/exists/[id].json

Parameters:
userId - The ID of the potentially blocked user.
Returns:
if the authenticating user is blocking a target user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
Twitter API Wiki / Twitter REST API Method: blocks exists

getBlockingUsers

ResponseList<User> getBlockingUsers()
                                    throws TwitterException
Returns a list of user objects that the authenticating user is blocking.
This method calls http://api.twitter.com/1/blocks/blocking.json

Returns:
a list of user objects that the authenticating user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.4
See Also:
Twitter API Wiki / Twitter REST API Method: blocks blocking

getBlockingUsers

ResponseList<User> getBlockingUsers(int page)
                                    throws TwitterException
Returns a list of user objects that the authenticating user is blocking.
This method calls http://api.twitter.com/1/blocks/blocking.json

Parameters:
page - the number of page
Returns:
a list of user objects that the authenticating user
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.4
See Also:
Twitter API Wiki / Twitter REST API Method: blocks blocking

getBlockingUsersIDs

IDs getBlockingUsersIDs()
                        throws TwitterException
Returns an array of numeric user ids the authenticating user is blocking.
This method calls http://api.twitter.com/1/blocks/blocking/ids

Returns:
Returns an array of numeric user ids the authenticating user is blocking.
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.4
See Also:
Twitter API Wiki / Twitter REST API Method: blocks blocking ids