Examples of Tweet


Examples of net.fortytwo.twitlogic.model.Tweet

                try {
                    JSONObject obj = (JSONObject) array.get(i);
                    if (!handler.isOpen()) {
                        break;
                    }
                    handler.handle(new Tweet(obj));
                } catch (Exception e) {
                    throw new TwitterClientException(e);
                }
            }
        }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

                stream.shutdown();
                return;
            }

            try {
                addHandler.handle(new Tweet(status));
            } catch (HandlerException e) {
                LOGGER.severe("exception in tweet handling: " + e.getMessage());
                e.printStackTrace(System.err);
            }
        }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

            if (!deleteHandler.isOpen()) {
                stream.shutdown();
                return;
            }

            Tweet d = new Tweet("" + notice.getStatusId());
            try {
                deleteHandler.handle(d);
            } catch (HandlerException e) {
                LOGGER.severe("exception in tweet deletion: " + e.getMessage());
                e.printStackTrace(System.err);
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

    private boolean handleDeleteStatusElement(final JSONObject el) throws TweetParseException, HandlerException {
        if (null == deleteHandler) {
            LOGGER.info("skipping 'delete' status element");
            return true;
        } else {
            Tweet status;
            try {
                status = new Tweet(el
                        .getJSONObject(TwitterAPI.Field.DELETE.toString())
                        .getJSONObject(TwitterAPI.Field.STATUS.toString())
                        .getString(TwitterAPI.Field.ID.toString()));
            } catch (JSONException e) {
                throw new TweetParseException(e);
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

        // an "interesting" status update (and discarding it if not)
        // before going on to parse all of its fields.
        boolean b = addHandler.isOpen();

        if (b) {
            addHandler.handle(new Tweet(el));
        }

        return b;
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

                "        \"statuses_count\":550,\n" +
                "        \"utc_offset\":-18000\n" +
                "    },\n" +
                "    \"id\":").append(tweetId).append("\n" +
                "}");
        return new Tweet(new JSONObject(sb.toString()));
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Tweet

    private static void stressTest(final Handler<Tweet> handler,
                                   final long chunkSize) throws JSONException, TweetParseException, HandlerException {
        while (true) {
            long before = new Date().getTime();
            for (long i = 0; i < chunkSize; i++) {
                Tweet t = randomTweet();
                if (!handler.isOpen()) {
                    return;
                }
                handler.handle(t);
            }
View Full Code Here

Examples of org.springframework.social.twitter.api.Tweet

public class DummyTwitter {

  private long id;

  public Tweet getTweet() {
    Tweet tweet = new Tweet(++this.id,
        "Spring Integration is the coolest Enterprise Integration project",
        new Date(),
        "SomeUser",
        "https://pbs.twimg.com/profile_images/378800000502646541/992d3596458fca87741b8e93e7df0860_normal.png",
        0L,
View Full Code Here

Examples of org.springframework.social.twitter.api.Tweet

     * @param tweets
     * @return tempo
     */
    private Tempo getTempo(List<Tweet> tweets, TimelineMusic meta) {
        long totalSpacingInMillis = 0;
        Tweet previousTweet = null;
        for (Tweet tweet : tweets) {
           if (previousTweet != null) {
               totalSpacingInMillis += Math.abs(previousTweet.getCreatedAt().getTime() - tweet.getCreatedAt().getTime());
           }
           previousTweet = tweet;
        }

        double averageSpacing = totalSpacingInMillis / (tweets.size() - 1);
View Full Code Here

Examples of slim3demo1.model.Tweet

    private TwitterService service = new TwitterService();
    private TweetMeta meta = TweetMeta.get();

    @Override
    public Navigation run() throws Exception {
        Tweet tweet = service.getTweet(asKey(meta.key), asLong(meta.version));
        BeanUtil.copy(tweet, request);
        return forward("edit.jsp");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.