Package com.google.wave.extensions.tweety.model

Examples of com.google.wave.extensions.tweety.model.Tweet


    if (!Util.isEmpty(inReplyToTweetId)) {
      queryParameters.put("in_reply_to_status_id", inReplyToTweetId);
    }

    // Send the tweet to Twitter.
    Tweet tweet = parseTweet(new JSONObject(fetchUrl(UPDATE_URL, queryParameters, true)), false);

    // Keep track of tweet that was originated from Wave.
    new WaveSubmittedTweetsCache().add(waveId, tweet.getId());

    return tweet;
  }
View Full Code Here


    // Parse the tweets.
    WaveSubmittedTweetsCache cache = new WaveSubmittedTweetsCache();
    for (int i = 0; i < tweetsAsJson.length(); ++i) {
      if (!tweetsAsJson.isNull(i)) {
        // Parse a single tweet.
        Tweet tweet = parseTweet(tweetsAsJson.getJSONObject(i), isSearch);

        // Add the tweet to the result list if it wasn't submitted from Google
        // Wave.
        if (!cache.contains(waveId, tweet.getId())) {
          tweets.add(tweet);
        }
      }
    }
    return tweets;
View Full Code Here

    String author =
        isSearch ? tweetAsJson.getString(SEARCH_TWEET_RESPONSE_AUTHOR) : tweetAsJson.getJSONObject(
            TWEET_RESPONSE_USER).getString(TWEET_RESPONSE_AUTHOR);
    long createdAt =
        convertTwitterDateTimeIntoLong(tweetAsJson.getString(TWEET_RESPONSE_CREATED_AT), isSearch);
    return new Tweet(id, text, author, createdAt);
  }
View Full Code Here

TOP

Related Classes of com.google.wave.extensions.tweety.model.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.