Package twitter4j

Examples of twitter4j.Tweet


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Tweet)) return false;

        Tweet tweet = (Tweet) o;

        if (id != tweet.getId()) return false;

        return true;
    }
View Full Code Here


            query.setRpp(hitsPerPage);
            QueryResult res = twitter.search(query);

            // is res.getTweets() sorted?
            for (Object o : res.getTweets()) {
                Tweet twe = (Tweet) o;
                // determine maxId in the first page
                if (page == 0 && maxId < twe.getId())
                    maxId = twe.getId();

                if (maxMillis < twe.getCreatedAt().getTime())
                    maxMillis = twe.getCreatedAt().getTime();

                if (twe.getCreatedAt().getTime() + 1000 < lastMaxCreateTime)
                    breakPaging = true;
                else {
                    String userName = twe.getFromUser().toLowerCase();
                    JUser user = userMap.get(userName);
                    if (user == null) {
                        user = new JUser(userName).init(twe);
                        userMap.put(userName, user);
                    }
View Full Code Here

            try {
                ResponseList rList = twitter.getUserTimeline(
                        user.getScreenName(), new Paging(currentPage + 1, tweets, 1));
                rateLimit--;
                for (Object st : rList) {
                    Tweet tw = toTweet((Status) st);
                    res.add(new JTweet(tw, user.init(tw)));
                }
                break;
            } catch (TwitterException ex) {
                logger.warn("Exception while getTweets. trial:" + trial + " page:" + currentPage + " - " + Helper.getMsg(ex));
View Full Code Here

                if (st.getId() < sinceId)
                    break END_PAGINATION;


                Tweet tw = toTweet(st);
                String userName = tw.getFromUser().toLowerCase();
                JUser user = userMap.get(userName);
                if (user == null) {
                    user = new JUser(st.getUser()).init(tw);
                    userMap.put(userName, user);
                }
View Full Code Here

TOP

Related Classes of twitter4j.Tweet

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.