File: twitter_search_api.rb

package info (click to toggle)
ruby-yajl 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,980 kB
  • sloc: ansic: 2,473; ruby: 2,049; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')

require 'yajl/http_stream'
require 'uri'

unless keywords = ARGV[0]
  puts "\nUsage: ruby examples/http/twitter_search_api.rb keyword\n\n"
  exit(0)
end

puts Yajl::HttpStream.get("http://search.twitter.com/search.json?q=#{keywords}").inspect