Sha256: b4e037b8fccb88201cb203ff0d84eb8070718bf874aecc9c706360f04b5a6a48
Contents?: true
Size: 1.57 KB
Versions: 1
Compression:
Stored size: 1.57 KB
Contents
module GoogleAjax class Search < Results # A shortcut to the estimated result count # e.g. GoogleAjax.books("Iliad").count # => 60000 def count self[:cursor][:estimated_result_count] end ## # :call-seq: # local(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_local def self.local(query, latitude, longitude, args = {}) args = { :sll => "#{latitude},#{longitude}" }.merge(args) get(:local, query, args) end ## # :call-seq: # blogs(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_blog ## # :call-seq: # books(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_book ## # :call-seq: # images(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_image ## # :call-seq: # news(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_news # Contrary to the doc, scoring=d is not an acceptable parameter (nor is scoring=date) ## # :call-seq: # video(query, args = {}) # Arguments: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_video ## # :call-seq: # web(query, args = {}) # http://code.google.com/apis/ajaxsearch/documentation/reference.html#_fonje_web standard_api :blogs, :books, :images, :news, :video, :web end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
googleajax-1.0.1 | lib/googleajax/search.rb |