Go to file
Steven Bazyl 5941c0d877 Add test for options as 5th param in array style calls 2012-10-04 15:46:48 -07:00
bin Remove embedded version #s, use Gemfile 2012-09-05 14:05:48 -07:00
lib Add method for checking if upload can be resumed 2012-10-04 15:31:46 -07:00
spec Add test for options as 5th param in array style calls 2012-10-04 15:46:48 -07:00
tasks Updating version and dependencies. 2012-07-31 16:56:17 +03:00
yard Added super-hacky script to generate the wiki reference pages. 2011-12-02 17:24:56 +03:00
.gitignore Ignore .rvmrc file 2012-06-14 10:48:29 +02:00
.rspec Upgrade RSpec 1.x to RSpec 2.10-x 2012-06-14 11:18:35 +02:00
.travis.yml Adding Steven to the Travis notification list. 2012-05-11 13:53:17 +03:00
.yardopts Add .yardopts for doc hosting 2012-07-19 14:14:03 -07:00
CHANGELOG.md Continue internal shuffling... 2012-09-24 16:09:17 -07:00
Gemfile Remove embedded version #s, use Gemfile 2012-09-05 14:05:48 -07:00
LICENSE Basic project skeleton. 2010-07-28 19:30:56 +00:00
README.md Update example in readme 2012-09-24 15:21:56 -07:00
Rakefile Updating dependencies. 2012-07-21 13:51:23 +03:00
google-api-client.gemspec Backwards compatibility for MultiJson. 2012-08-30 12:15:59 +03:00

README.md

APIClient

Homepage
http://code.google.com/p/google-api-ruby-client
Author
Bob Aman
Copyright
Copyright © 2011 Google, Inc.
License
Apache 2.0

Build Status Dependency Status

Description

The Google API Ruby Client makes it trivial to discover and access supported APIs.

Example Usage

# Initialize the client & Google+ API
require 'google/api_client'
client = Google::APIClient.new
plus = client.discovered_api('plus')

# Initialize OAuth 2.0 client    
client.authorization.client_id = '<CLIENT_ID_FROM_API_CONSOLE>'
client.authorization.client_secret = '<CLIENT_SECRET>'
client.authorization.scope = 'https://www.googleapis.com/auth/plus.me'

# Request authorization
redirect_uri = client.authorization.authorization_uri

# Wait for authorization code then exchange for token
client.authorization.code = '....'
client.authorization.fetch_access_token!

# Make an API call
result = client.execute(
  :api_method => plus.activities.list'
  :parameters => {'collection' => 'public', 'userId' => 'me'}
)

puts result.data

Install

Be sure http://rubygems.org/ is in your gem sources.

For normal client usage, this is sufficient:

$ sudo gem install google-api-client

The command line interface, the example applications, and the test suite require additional dependencies. These may be obtained with:

$ sudo gem install google-api-client --development --force --no-rdoc --no-ri