Reputation: 115
My requirement is to get top 20 links for a search query in google.com. I am using the Google-api-client! for ruby.
Here goes the code I am using,
require 'google/api_client'
client = Google::APIClient.new
response = client.execute(
search.cse.list, 'key' => '<My Key>', 'cx' => '013036536707430787589%3A_pqjad5hr1a', 'alt' => 'json', 'q' => 'hello world'
)
Now I am facing three problems,
Upvotes: 1
Views: 2287
Reputation: 11662
Instead of setting a dummy access token, just set the authorization mechanism to nil:
client.authorization = nil
This way it won't send an authorization header and will just rely on the API key for identifying your app.
Upvotes: 9