Skip to content

Instantly share code, notes, and snippets.

@queso
Created September 17, 2009 03:24
Show Gist options
  • Save queso/188329 to your computer and use it in GitHub Desktop.
Save queso/188329 to your computer and use it in GitHub Desktop.
def self.friend_ids(id, &blk)
http = EventMachine::HttpRequest.new("http://twitter.com/friends/ids/#{id}.json").get
http.callback { yield }
http.errback { raise StandardError, http.inspect }
end
#<EventMachine::HttpClient:0x10100e478 @parser=#<EventMachine::HttpClientParser:0x10100e388>, @errors="", @state=:response_header, @errbacks=[], @options={}, @deferred_args=[#<EventMachine::HttpClient:0x10100e478 ...>], @inflate=[], @method="GET", @chunk_header={}, @stream=nil, @response="", @uri=#<URI::HTTP:0x10100e798 URL:http://twitter.com/friends/ids/kevinrose.json>, @response_header={}, @data=#<EventMachine::Buffer:0x10100e360>, @callbacks=[#<Proc:0x000000010118d628@./twitter-em.rb:25>], @content_decoder=nil, @deferred_status=:failed, @parser_nbytes=0, @signature="90e9a62e086207975e805c2e829bb2f82">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment