Class: Yahoo::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo/api/request.rb

Class Method Summary collapse

Class Method Details

.get(path, opts, format = "json") ⇒ Object



5
6
7
8
# File 'lib/yahoo/api/request.rb', line 5

def self.get(path,opts,format="json")
  uri = URI.parse("#{path}?#{opts.map {|k,v|"#{k}=#{CGI.escape(v)}"}.join('&')}")
  Yahoo::Response.new(Net::HTTP.get_response(uri),format)
end