Advertisement
Guest User

Untitled

a guest
Apr 12th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. user = DataSift::User.new('my_username', 'my_api_key')
  2. consumer = user.getConsumer(DataSift::StreamConsumer::TYPE_HTTP, 'my_stream' )
  3. consumer.consume( true ) do |interaction|
  4. puts interaction['interaction']['content']
  5. end
  6.  
  7. Kernel.at_exit do
  8. consumer.disconnect
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement