Skip to content

Instantly share code, notes, and snippets.

@trevmex
Created October 2, 2010 15:56
Show Gist options
  • Select an option

  • Save trevmex/607751 to your computer and use it in GitHub Desktop.

Select an option

Save trevmex/607751 to your computer and use it in GitHub Desktop.
require 'rest-client'
require 'json'
twit = Object.new
def twit.get_user_timeline(user_id)
@user_timeline = JSON.parse(RestClient.get("http://api.twitter.com/1/statuses/user_timeline.json?user_id=#{user_id}"))
self.instance_eval do
def statuses
@user_timeline
end
end
user_timeline.each do |status|
end
end
twit.get_user_timeline("8135682")
twit.statuses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment