Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

rutan/mihatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mihatter

Mihatter is a simple Twitter crawler.

Installation

Add this line to your application's Gemfile:

gem 'mihatter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mihatter

Usage

require 'mihatter'

Mihatter.configuration do |config|
  config.consumer_key = '.....'
  config.consumer_secret = '.....'
  config.access_token = '.....'
  config.access_token_secret = '.....'

  config.keyword = 'sushi'
end

# use REST API
watcher = Mihatter::RestWatcher.new
watcher.run! do |tweet|
  puts tweet.text
end

# use Streaming API (only English, cannot use CJK)
watcher = Mihatter::StreamingWatcher.new
watcher.run! do |tweet|
  puts tweet.text
end

License

MIT

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rutan/mihatter.

About

a simple Twitter crawler

Resources

Stars

Watchers

Forks

Packages

No packages published