Skip to content

Instantly share code, notes, and snippets.

@code
Created November 5, 2008 07:51
Show Gist options
  • Save code/22303 to your computer and use it in GitHub Desktop.
Save code/22303 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'open-uri'
require 'json'
# Twitter search in one line, got to love ruby.
def twitter_search(q); JSON.parse(open("http://search.twitter.com/search.json?q=#{q}").read) end
# puts twitter_search("codegent").inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment