Package org.springframework.social.twitter.api

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


     * @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

TOP

Related Classes of org.springframework.social.twitter.api.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.