I poked into the client code and found a couple of options.
-, API, . , , , . , . :
require 'rubygems'
require 'google/api_client'
require 'httpadapter/adapters/net_http'
@client = Google::APIClient.new(
:key => 'SOME_KEY',
:host => 'www.googleapis.com',
:http_adapter => HTTPAdapter::NetHTTPAdapter.new,
:pretty_print => false
)
@client.authorization = nil
@plus = @client.discovered_api('plus', 'v1')
status, headers, body = @client.execute(
@plus.people.list_by_activity,
'activityId' => 'z12nspyxxufislit423eex442zqpdtqnk',
'collection' => 'plusoners',
'maxResults' => '100'
)
public_activity = JSON.parse(body[0])
. ! , :
require 'rubygems'
require 'google/api_client'
require 'httpadapter/adapters/net_http'
@client = Google::APIClient.new(
:key => 'SOME_KEY',
:host => 'www.googleapis.com',
:http_adapter => HTTPAdapter::NetHTTPAdapter.new,
:pretty_print => false
)
@plus = @client.discovered_api('plus', 'v1')
status, headers, body = @client.execute(
@plus.people.list_by_activity,
{'activityId' => 'z12nspyxxufislit423eex442zqpdtqnk',
'collection' => 'plusoners',
'maxResults' => '100'}, '', [], {:authenticated => false}
)
puts status
puts body
public_activity = JSON.parse(body[0])
Allen, Google+:)