Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Typo

  • Loading branch information...
commit 2c85371c8bc14bb048f3dc43ea5c92c86310215b 1 parent ff4d0e2
@tj authored
Showing with 8 additions and 5 deletions.
  1. +1 −1  Rakefile
  2. +4 −1 examples/web.rb
  3. +3 −3 lib/google-search/search.rb
View
2  Rakefile
@@ -10,7 +10,7 @@ Echoe.new "google-search", Google::Search::VERSION do |p|
p.email = "tj@vision-media.ca"
p.summary = "Google Search API"
p.url = "http://github.com/visionmedia/google-search"
- p.runtime_dependencies = << 'json'
+ p.runtime_dependencies << 'json'
end
Dir['tasks/**/*.rake'].sort.each { |f| load f }
View
5 examples/web.rb
@@ -1,4 +1,7 @@
$:.unshift File.dirname(__FILE__) + '/../lib'
require 'rubygems'
-require 'google-search'
+require 'google-search'
+
+search = Google::Search.new :web, :size => :large, :query => 'Victoria Web Design'
+response = search.get_response
View
6 lib/google-search/search.rb
@@ -20,7 +20,7 @@ class Search
##
# Language. Defaults to :en
- attr_accessor :lang
+ attr_accessor :language
##
# Query. Defaults to nil
@@ -64,7 +64,7 @@ def initialize type, options = {}
@version = options[:version] || 1.0
@offset = options[:offset] || 0
@size = options[:size] || :small
- @lang = options[:lang] || :en
+ @language = options[:language] || :en
@query = options[:query]
@api_key = options[:api_key] || :notsupplied
end
@@ -76,7 +76,7 @@ def get_uri
URI + "/G#{@type}Search?" + [
[:start, offset],
[:rsz, size],
- [:hl, lang],
+ [:hl, language],
[:key, api_key],
[:v, version],
[:q, query]
Please sign in to comment.
Something went wrong with that request. Please try again.