4 <dt>Homepage</dt><dd><a href="http://code.google.com/p/google-api-ruby-client">http://code.google.com/p/google-api-ruby-client</a></dd>
5 <dt>Author</dt><dd><a href="mailto:bobaman@google.com">Bob Aman</a></dd>
6 <dt>Copyright</dt><dd>Copyright © 2011 Google, Inc.</dd>
7 <dt>License</dt><dd>Apache 2.0</dd>
10 [![Build Status](https://secure.travis-ci.org/google/google-api-ruby-client.png)](http://travis-ci.org/google/google-api-ruby-client)
11 [![Dependency Status](https://gemnasium.com/google/google-api-ruby-client.png)](https://gemnasium.com/google/google-api-ruby-client)
15 The Google API Ruby Client makes it trivial to discover and access supported
20 # Initialize the client
21 require 'google/api_client'
22 require 'signet/oauth_1/client'
23 client = Google::APIClient.new(
25 # Buzz has API-specific endpoints
26 :authorization => Signet::OAuth1::Client.new(
27 :temporary_credential_uri =>
28 'https://www.google.com/accounts/OAuthGetRequestToken',
30 'https://www.google.com/buzz/api/auth/OAuthAuthorizeToken',
31 :token_credential_uri =>
32 'https://www.google.com/accounts/OAuthGetAccessToken',
33 :client_credential_key => 'anonymous',
34 :client_credential_secret => 'anonymous'
37 client.authorization.fetch_temporary_credential!(
38 :additional_parameters => {
39 'scope' => 'https://www.googleapis.com/auth/buzz'
42 redirect_uri = client.authorization.authorization_uri(
43 :additional_parameters => {
44 'domain' => client.authorization.client_credential_key,
45 'scope' => 'https://www.googleapis.com/auth/buzz'
49 client.authorization.fetch_token_credential!(:verifier => '12345')
51 # Discover available methods
52 method_names = client.discovered_api('plus').to_h.keys
55 result = client.execute(
56 'plus.activities.list',
57 {'collection' => 'public', 'userId' => 'me'}
62 Be sure `http://rubygems.org/` is in your gem sources.
64 For normal client usage, this is sufficient:
66 $ sudo gem install google-api-client
68 The command line interface, the example applications, and the test suite
69 require additional dependencies. These may be obtained with:
71 $ sudo gem install google-api-client --development --force --no-rdoc --no-ri