Created
January 10, 2015 19:56
-
-
Save moski/21d830d0b0bd9e44a9ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twitter_client.filter(track: hashtags.join(",")) do |tweet| | |
# Only Fetch tweets objects and ignore all retweets | |
if tweet.is_a?(Twitter::Tweet) && !tweet.retweet? | |
# only fetch tweets with images. | |
if tweet.media? | |
tweet_respresenter = Storage::Tweet.new.extend(TweetRepresenter).from_json(tweet.to_json) | |
tweet_respresenter.save!($redis) | |
print '.' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment