Created
July 27, 2013 01:10
-
-
Save mizoR/6093238 to your computer and use it in GitHub Desktop.
mizoR/macaroni と sferik/twitter を組み合わせて、Twitter の検索結果を取得する
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
# -*- coding: utf-8-*- | |
# exec: macaroni --recipe path/to/macaroni_with_twitter.rb --target tweet_search | |
# gem dependency: `mizoR/macaroni`, `sferik/twitter` | |
require 'twitter' | |
include Macaroni::Plugin | |
pipe :tweet_search, :data => Twitter do | |
plug Filter::Configure do |config| | |
config.consumer_key = 'XXXXXXXXXX' | |
config.consumer_secret = 'YYYYYYYYYY' | |
end | |
plug Filter::Search, 'to:justinbieber marry me', :count => 3, :result_type => 'recent' | |
plug Filter::Collection | |
plug Filter::Map do |tweet| | |
tweet.text | |
end | |
plug Output::Stdout | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment