Skip to content

Instantly share code, notes, and snippets.

@hokkai7go
Created October 7, 2012 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hokkai7go/3847418 to your computer and use it in GitHub Desktop.
Save hokkai7go/3847418 to your computer and use it in GitHub Desktop.
search twitter using json format
require "net/http"
require "json"
request = Net::HTTP::Get.new("/search.json?q=railsgirls")
http = Net::HTTP.start('search.twitter.com')
response = http.request(request)
puts JSON.parse(response.body)
@hokkai7go
Copy link
Author

Nokogiriとか使ってやろうとしたんだけど、これだけでよかったわー

@igaiga
Copy link

igaiga commented Oct 8, 2012

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment