Module: GoogleImageApi
- Defined in:
- lib/google_image_api.rb,
lib/google_image_api/url.rb,
lib/google_image_api/client.rb,
lib/google_image_api/result.rb,
lib/google_image_api/version.rb,
lib/google_image_api/configuration.rb
Defined Under Namespace
Classes: Client, Configuration, Result, Url
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.Configure(&block) ⇒ Object
result = GoogleImageApi.find(@search, { :imgsz => “medium”, :rsz => 8, :start => 8, :imgtype => “face”, :as_filetype => “jpg” }).
- .find(query, options = {}) ⇒ Object
Class Method Details
.Configure(&block) ⇒ Object
result = GoogleImageApi.find(@search,
:imgsz => "medium",
:rsz => 8,
:start => 8,
:imgtype => "face",
:as_filetype => "jpg"
)
result.images.each do |img|
puts img['url']
end
19 20 21 |
# File 'lib/google_image_api.rb', line 19 def self.Configure(&block) Configuration.instance.instance_eval(&block) end |
.find(query, options = {}) ⇒ Object
23 24 25 |
# File 'lib/google_image_api.rb', line 23 def self.find( query, = {} ) client.find( query, ) end |