This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
hosebird /
| name | age | message | |
|---|---|---|---|
| |
.document | Sun May 17 13:32:15 -0700 2009 | |
| |
.gitignore | Sun May 17 13:32:15 -0700 2009 | |
| |
LICENSE | Sun May 17 13:32:15 -0700 2009 | |
| |
README.textile | Mon May 18 15:23:22 -0700 2009 | |
| |
Rakefile | Tue May 19 14:37:09 -0700 2009 | |
| |
VERSION | Tue May 19 14:42:41 -0700 2009 | |
| |
examples/ | Mon May 18 14:42:52 -0700 2009 | |
| |
hosebird.gemspec | Tue May 19 14:48:06 -0700 2009 | |
| |
lib/ | Tue May 19 14:40:34 -0700 2009 | |
| |
test/ | Mon May 18 12:57:40 -0700 2009 |
README.textileInstalling from GitHub
1. Create a
hosebird
Overview
Hosebird is a Ruby library for Twitter’s new Streaming API codename Hosebird. Hosebird will open a persistent HTTP connection which receives updates in near-realtime.
For example, hosebird makes it easy to monitor twitter for caps lock abuse.
require 'hosebird' username, password = #... twitter = Twitter::Base.new(Twitter::HTTPAuth.new(username, password))Hosebird::Spritzer.subscribe(twitter) do |status|
if status[:text].upcase == status[:text] && status[:text] =~ /\w+/
twitter.update(“@#{status[:user][:screen_name]} ur caps r on, btw”, :in_reply_to_status_id => status[:id])
end
end
Installation
Requirements
Optional
- yajl-ruby (Support Pending)
Installing from GitHub
sudo gem install benburkert-hosebird
sudo gem install benburkert-hosebird
Examples
Growlr: A Realtime Twitter Client
Note: Requires OSX with Growl
1. Create a ~/.twitter YAML file with your twitter username & password:
</code> echo "username: oprah password: harpo" > ~/.twitter
2. Checkout the hosebird source:
git clone git://github.com/benburkert/hosebird.git
3. Run the growler example:
ruby hosebird/examples/growlr.rb
Spritzr: Same as Growlr, but for the Public Timeline
Run hosebird/examples/spritzr.rb instead of hosebird/examples/growlr.rb.







