https://github.com/dbtlr/google-api-rails
A rails wrapper for the Google API ruby client.
https://github.com/dbtlr/google-api-rails
Last synced: about 1 month ago
JSON representation
A rails wrapper for the Google API ruby client.
- Host: GitHub
- URL: https://github.com/dbtlr/google-api-rails
- Owner: dbtlr
- License: mit
- Created: 2013-06-26T04:25:26.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-28T02:41:16.000Z (about 13 years ago)
- Last Synced: 2025-04-19T10:08:43.386Z (about 1 year ago)
- Language: Ruby
- Size: 137 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Google API Wrapper for Ruby on Rails [](https://travis-ci.org/dbtlr/google-api-rails)
This wraps the official [Google Ruby API client](https://github.com/google/google-api-ruby-client). All documentation for interacting with the actual client can be found there.
## Installation
Add the gem to your Gemfile:
```ruby
gem install google-api-rails
```
Create an initializer, for instance google-api-rails.rb with the following:
```ruby
GoogleApi.config do |config|
config.client_id = ""
config.client_secret = ""
config.application_name = ""
end
```
## Getting Started
To use the Ruby API client, simple access it through the wrapper like so:
```ruby
# Make an API call
result = GoogleApi.client.execute(
:api_method => plus.activities.list,
:parameters => {'collection' => 'public', 'userId' => 'me'}
)
```
## About This Gem
I wrote this simply to have the convenience of keeping my Google API config in an initializer, instead of all over my apps. If you know of a better way or see something I missed, feel free to submit an issue or pull request.