0

I have this piece of code

require 'google/api_client'
require 'google/api_client/client_secrets'
require 'google/api_client/auth/installed_app'

search_client = Google::APIClient.new(
  :application_name => 'Application'
)

google_search = search_client.discovered_api('customsearch')

# Load client secrets from your client_secrets.json.
client_secrets = Google::APIClient::ClientSecrets.load   

search_client.authorization = nil

response = search_client.execute(google_search.cse.list, 'q' => 'query')

After I load that file in IRB, I got the result like

#<Google::APIClient::Result:0xad56844>
=> true

How can I use that result, like parse it to something meaningful?

Minh Triet
  • 1,190
  • 1
  • 15
  • 35

1 Answers1

1

Add after the last line:

status, headers, body = response
Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129