twitter4j.api
Interface ListSubscribersMethods

All Known Subinterfaces:
Twitter

public interface ListSubscribersMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 UserList createUserListSubscription(int listId)
          Make the authenticated user follow the specified list.
 UserList destroyUserListSubscription(int listId)
          Unsubscribes the authenticated user form the specified list.
 PagableResponseList<User> getUserListSubscribers(int listId, long cursor)
          Returns the subscribers of the specified list.
 User showUserListSubscription(int listId, long userId)
          Check if the specified user is a subscriber of the specified list.
 

Method Detail

getUserListSubscribers

PagableResponseList<User> getUserListSubscribers(int listId,
                                                 long cursor)
                                                 throws TwitterException
Returns the subscribers of the specified list.
This method calls http://api.twitter.com/1/lists/subscribers.json

Parameters:
listId - The id of the list
cursor - Breaks the results into pages. A single page contains 20 lists. 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.
Returns:
the members of the specified list.
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
GET lists/subscribers | Twitter Developers

createUserListSubscription

UserList createUserListSubscription(int listId)
                                    throws TwitterException
Make the authenticated user follow the specified list.
This method calls http://api.twitter.com/1/list/subscribers/create.json

Parameters:
listId - The id of the list.
Returns:
the updated list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
POST lists/subscribers/create | Twitter Developers

destroyUserListSubscription

UserList destroyUserListSubscription(int listId)
                                     throws TwitterException
Unsubscribes the authenticated user form the specified list.
This method calls http://api.twitter.com/1/subscribers/destroy.json

Parameters:
listId - The id of the list.
Returns:
the updated list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
POST lists/subscribers/destroy | Twitter Developers

showUserListSubscription

User showUserListSubscription(int listId,
                              long userId)
                              throws TwitterException
Check if the specified user is a subscriber of the specified list.
This method calls http://api.twitter.com/1/lists/subscribers/show.json

Parameters:
listId - The id of the list.
userId - The id of the user who you want to know is a member or not of the specified list.
Returns:
the updated list
Throws:
TwitterException - when Twitter service or network is unavailable , or the user is not a member of the specified list(TwitterException.getStatusCode() returns 404 in that case.)
Since:
Twitter4J 2.2.3
See Also:
GET lists/subscribers/show | Twitter Developers


Copyright © 2012. All Rights Reserved.