Module: Twitter

Defined in:
lib/twitter.rb,
lib/twitter/base.rb,
lib/twitter/oauth.rb,
lib/twitter/search.rb,
lib/twitter/no_auth.rb,
lib/twitter/request.rb,
lib/twitter/httpauth.rb,
lib/twitter/rails/helpers.rb,
lib/twitter/rails/controller.rb,
lib/twitter/rails/initializer.rb

Defined Under Namespace

Modules: Rails Classes: Base, General, HTTPAuth, InformTwitter, NoAuth, NotFound, OAuth, RateLimitExceeded, Request, Search, TwitterError, Unauthorized, Unavailable

Class Method Summary collapse

Class Method Details

.firehoseObject



32
33
34
35
# File 'lib/twitter.rb', line 32

def self.firehose
  response = HTTParty.get('http://twitter.com/statuses/public_timeline.json', :format => :json)
  response.map { |tweet| Mash.new(tweet) }
end

.user(id) ⇒ Object



37
38
39
40
# File 'lib/twitter.rb', line 37

def self.user(id)
  response = HTTParty.get("http://twitter.com/users/show/#{id}.json", :format => :json)
  Mash.new(response)
end