Class | TweetStream::Daemon |
In: |
lib/tweetstream/daemon.rb
|
Parent: | TweetStream::Client |
A daemonized TweetStream client that will allow you to create backgroundable scripts for application specific processes. For instance, if you create a script called tracker.rb and fill it with this:
require 'rubygems' require 'tweetstream' TweetStream::Daemon.new('user','pass', 'tracker').track('intridea') do |status| # do something here end
And then you call this from the shell:
ruby tracker.rb start
A daemon process will spawn that will automatically run the code in the passed block whenever a new tweet matching your search term (‘intridea’ in this case) is posted.
Initialize a Daemon with the credentials of the Twitter account you wish to use. The daemon has an optional process name for use when querying running processes.