Example #1
0
        public TweetAnalytics UpdateAnalytics(TweetDetails tweetDetails)
        {
            TotalTweetsRecieved += 1;

            if (tweetDetails.HasPhoto)
            {
                NoOfTweetsWithPhotos += 1;
            }

            if (tweetDetails.HasHashTag)
            {
                NoOfTweetsWithHashTags += 1;
            }
            if (tweetDetails.HasUrl)
            {
                NoOfTweetsWithUrls += 1;
            }
            if (tweetDetails.HasEmoji)
            {
                NoOfTweetsWithEmojis += 1;
            }
            return(this);
        }
Example #2
0
 public TweetAnalytics(TweetDetails tweetDetails)
 {
     StreamStartTime = DateTime.UtcNow;
     UpdateAnalytics(tweetDetails);
 }