ip2k / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

response should be a custom object #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
require 'google/api_client'
client = Google::APIClient.new(:service => 'buzz')
response = client.execute(
  'chili.activities.list',
  'userId' => 'googlebuzz', 'scope' => '@public', 'alt' => 'json'
)

What is the expected output? What do you see instead?
Expected: response is a Google::APIResponse (or similar) with methods for 
status, headers, body, success?, failure?, etc. and handles body (json) parsing 
when appropriate
Received: response is an Array containing three positional elements (status, 
headers, and body)

What version of the product are you using? On what operating system?
Version: 0.1.3
OS: Ubuntu 10.04

Please provide any additional information below.
If you are accepting patches, let me know and I will cook one up. ;-)

Original issue reported on code.google.com by gic...@gmail.com on 9 Dec 2010 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by bobaman@google.com on 11 Mar 2011 at 7:32

GoogleCodeExporter commented 9 years ago
This is working as intended. If you need a custom object you can use HTTP 
adapter to convert. It's already a dependency and is designed specifically for 
this purpose.

However, in most cases, the following is sufficient:

{{{
status, headers, body = response
}}}

Original comment by bobaman@google.com on 4 May 2011 at 12:29