Package twitter4j

Examples of twitter4j.UserList


            int size = list.length();
            PagableResponseList<UserList> users =
                    new PagableResponseListImpl<UserList>(size, json, res);
            for (int i = 0; i < size; i++) {
                JSONObject userListJson = list.getJSONObject(i);
                UserList userList = new UserListJSONImpl(userListJson);
                users.add(userList);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(userList, userListJson);
                }
            }
View Full Code Here


            int size = list.length();
            ResponseList<UserList> users =
                    new ResponseListImpl<UserList>(size, res);
            for (int i = 0; i < size; i++) {
                JSONObject userListJson = list.getJSONObject(i);
                UserList userList = new UserListJSONImpl(userListJson);
                users.add(userList);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(userList, userListJson);
                }
            }
View Full Code Here

        // TODO: this is inefficient
        Map<String, UserList> lists = new HashMap<String, UserList>();
        for (UserList l : getUserLists(user)) {
            lists.put(l.getName(), l);
        }
        final UserList list = lists.get(listId);
        if (null == list) {
            throw new TwitterClientException("no such list: " + listId + " owned by user " + user);
        }

        List<User> result = new LinkedList<User>();
        for (twitter4j.User u : asList(new ListGenerator<twitter4j.User>() {
            public PagableResponseList getList(long cursor) throws TwitterException {
                return twitter.getUserListMembers(list.getId(), cursor);
            }
        })) {
            result.add(new User(u));
        }
View Full Code Here

            System.out.println("Usage: java twitter4j.examples.list.ShowUserList [list id]");
            System.exit(-1);
        }
        try {
            Twitter twitter = new TwitterFactory().getInstance();
            UserList list = twitter.showUserList(Integer.parseInt(args[0]));
            System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:"
                    + list.getDescription() + ", slug:" + list.getSlug() + "");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to show the list: " + te.getMessage());
            System.exit(-1);
View Full Code Here

            System.out.println("Usage: java twitter4j.examples.list.DestroyUserList [list id]");
            System.exit(-1);
        }
        try {
            Twitter twitter = new TwitterFactory().getInstance();
            UserList list = twitter.destroyUserList(Integer.parseInt(args[0]));
            System.out.println("Successfully deleted the list (id:" + list.getId() + ", slug:" + list.getSlug() + ").");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to delete a list: " + te.getMessage());
            System.exit(-1);
View Full Code Here

            Twitter twitter = new TwitterFactory().getInstance();
            String description = null;
            if (args.length >= 2) {
                description = args[1];
            }
            UserList list = twitter.createUserList(args[0], true, description);
            System.out.println("Successfully created a list (id:" + list.getId() + ", slug:" + list.getSlug() + ").");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to create a list: " + te.getMessage());
            System.exit(-1);
View Full Code Here

TOP

Related Classes of twitter4j.UserList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.