twitter4j.api
Interface ListMethods

All Known Subinterfaces:
Twitter

public interface ListMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 UserList createUserList(String listName, boolean isPublicList, String description)
          Creates a new list for the authenticated user.
 UserList destroyUserList(int listId)
          Deletes the specified list.
 ResponseList<UserList> getAllUserLists(long userId)
          Returns all lists the authenticating or specified user subscribes to, including their own.
 ResponseList<UserList> getAllUserLists(String screenName)
          Returns all lists the authenticating or specified user subscribes to, including their own.
 PagableResponseList<UserList> getUserListMemberships(long cursor)
          List the lists the authenticating user has been added to.
 PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor)
          List the lists the specified user has been added to.
 PagableResponseList<UserList> getUserListMemberships(long listMemberId, long cursor, boolean filterToOwnedLists)
          List the lists the specified user has been added to.
 PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName, long cursor)
          List the lists the specified user has been added to.
 PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName, long cursor, boolean filterToOwnedLists)
          List the lists the specified user has been added to.
 PagableResponseList<UserList> getUserLists(long listOwnerUserId, long cursor)
          List the lists of the specified user.
 PagableResponseList<UserList> getUserLists(String listOwnerScreenName, long cursor)
          List the lists of the specified user.
 ResponseList<Status> getUserListStatuses(int listId, Paging paging)
          Show tweet timeline for members of the specified list.
 PagableResponseList<UserList> getUserListSubscriptions(String listOwnerScreenName, long cursor)
          List the lists the specified user follows.
 UserList showUserList(int listId)
          Show the specified list.
 UserList updateUserList(int listId, String newListName, boolean isPublicList, String newDescription)
          Updates the specified list.
 

Method Detail

createUserList

UserList createUserList(String listName,
                        boolean isPublicList,
                        String description)
                        throws TwitterException
Creates a new list for the authenticated user. Accounts are limited to 20 lists.
This method calls http://api.twitter.com/1/lists/create.json

Parameters:
listName - The name of the list you are creating. Required.
isPublicList - set true if you wish to make a public list
description - The description of the list you are creating. Optional.
Returns:
the list that was created
Throws:
TwitterException - when Twitter service or network is unavailable, or the authenticated user already has 20 lists(TwitterException.getStatusCode() == 403).
Since:
Twitter4J 2.1.0
See Also:
POST lists/create | Twitter Developers

updateUserList

UserList updateUserList(int listId,
                        String newListName,
                        boolean isPublicList,
                        String newDescription)
                        throws TwitterException
Updates the specified list.
This method calls http://api.twitter.com/1/lists/update.json

Parameters:
listId - The id of the list to update.
newListName - What you'd like to change the list's name to.
isPublicList - Whether your list is public or private. Optional. Values can be public or private. Lists are public by default if no mode is specified.
newDescription - What you'd like to change the list description to.
Returns:
the updated list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
POST lists/update | Twitter Developers

getUserLists

PagableResponseList<UserList> getUserLists(String listOwnerScreenName,
                                           long cursor)
                                           throws TwitterException
List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user whose lists are being returned.
This method calls http://api.twitter.com/1/lists.json

Parameters:
listOwnerScreenName - The screen name of the list owner
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET lists | Twitter Developers

getUserLists

PagableResponseList<UserList> getUserLists(long listOwnerUserId,
                                           long cursor)
                                           throws TwitterException
List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user whose lists are being returned.
This method calls http://api.twitter.com/1/lists.json

Parameters:
listOwnerUserId - The id of the list owner
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
GET lists | Twitter Developers

showUserList

UserList showUserList(int listId)
                      throws TwitterException
Show the specified list. Private lists will only be shown if the authenticated user owns the specified list.
This method calls http://api.twitter.com/1/lists/show.json

Parameters:
listId - The id of the list to show
Returns:
the specified list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
https://dev.twitter.com/docs/api/1/get/lists/show | Twitter Developers

destroyUserList

UserList destroyUserList(int listId)
                         throws TwitterException
Deletes the specified list. Must be owned by the authenticated user.
This method calls http://api.twitter.com/1/lists/destroy.json

Parameters:
listId - The id of the list to delete
Returns:
the deleted list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
POST lists/destroy | Twitter Developers

getUserListStatuses

ResponseList<Status> getUserListStatuses(int listId,
                                         Paging paging)
                                         throws TwitterException
Show tweet timeline for members of the specified list.
http://api.twitter.com/1/user/lists/list_id/statuses.json

Parameters:
listId - The id of the list
paging - controls pagination. Supports since_id, max_id, count and page parameters.
Returns:
list of statuses for members of the specified list
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.3
See Also:
GET lists/statuses | Twitter Developers

getUserListMemberships

PagableResponseList<UserList> getUserListMemberships(long cursor)
                                                     throws TwitterException
List the lists the authenticating user has been added to.
This method calls http://api.twitter.com/1/lists/memberships.json

Parameters:
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
IllegalStateException - when authorization is not enabled
Since:
Twitter4J 2.2.4
See Also:
GET lists/memberships | Twitter Developers

getUserListMemberships

PagableResponseList<UserList> getUserListMemberships(long listMemberId,
                                                     long cursor)
                                                     throws TwitterException
List the lists the specified user has been added to.
This method calls http://api.twitter.com/1/lists/memberships.json

Parameters:
listMemberId - The id of the list member
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.2.4
See Also:
GET lists/memberships | Twitter Developers

getUserListMemberships

PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName,
                                                     long cursor)
                                                     throws TwitterException
List the lists the specified user has been added to.
This method calls http://api.twitter.com/1/lists/memberships.json

Parameters:
listMemberScreenName - The screen name of the list member
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET lists/memberships | Twitter Developers

getUserListMemberships

PagableResponseList<UserList> getUserListMemberships(String listMemberScreenName,
                                                     long cursor,
                                                     boolean filterToOwnedLists)
                                                     throws TwitterException
List the lists the specified user has been added to.
This method calls http://api.twitter.com/1/lists/memberships.json

Parameters:
listMemberScreenName - The screen name of the list member
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.
filterToOwnedLists - Whether to return just lists the authenticating user owns, and the user represented by listMemberScreenName is a member of.
Returns:
the list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
IllegalStateException - when filerToOwnedLists is true but authorization is not enabled
Since:
Twitter4J 2.2.4
See Also:
GET lists/memberships | Twitter Developers

getUserListMemberships

PagableResponseList<UserList> getUserListMemberships(long listMemberId,
                                                     long cursor,
                                                     boolean filterToOwnedLists)
                                                     throws TwitterException
List the lists the specified user has been added to.
This method calls http://api.twitter.com/1/lists/memberships.json

Parameters:
listMemberId - The id of the list member
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.
filterToOwnedLists - Whether to return just lists the authenticating user owns, and the user represented by listMemberId is a member of.
Returns:
the list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
IllegalStateException - when filerToOwnedLists is true but authorization is not enabled
Since:
Twitter4J 2.2.4
See Also:
GET lists/memberships | Twitter Developers

getUserListSubscriptions

PagableResponseList<UserList> getUserListSubscriptions(String listOwnerScreenName,
                                                       long cursor)
                                                       throws TwitterException
List the lists the specified user follows.
This method calls http://api.twitter.com/1/lists/subscriptions.json

Parameters:
listOwnerScreenName - The screen name of the list owner
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 list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
GET lists/subscriptions | Twitter Developers

getAllUserLists

ResponseList<UserList> getAllUserLists(String screenName)
                                       throws TwitterException
Returns all lists the authenticating or specified user subscribes to, including their own.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/lists/all.json

Parameters:
screenName - screen name to look up
Returns:
list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.9

getAllUserLists

ResponseList<UserList> getAllUserLists(long userId)
                                       throws TwitterException
Returns all lists the authenticating or specified user subscribes to, including their own.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/lists/all.json

Parameters:
userId - user id to look up
Returns:
list of lists
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.9


Copyright © 2012. All Rights Reserved.