/gaah

GAAH - Google Apps API Helper

Primary LanguageRuby

GAAH - Google Apps API Helper

API Wrapper for Google Apps Marketplace

Currently supports:

Provisioning API (read-only)

Calendar API

Example Code

CLIENT_KEY = '000000000000.apps.googleusercontent.com'
CLIENT_SECRET = 'abcdefghijklmnopqrstuvwx'
DOMAIN = 'example.com'

# Setup
require 'gaah'
Gaah.setup_oauth(CLIENT_KEY, CLIENT_SECRET)
Gaah.domain = DOMAIN

# Get users
users = Gaah::Provisioning::Api.users
user = users.first
user.id    # "https://apps-apis.google.com/a/feeds/example.com/user/2.0/bobert"
user.name  # "Bobert Jones"
user.title # "bobert"

# Get calendar events
xoauth_requestor_id = 'me@example.com'
events = user.events(xoauth_requestor_id)
event = events.first
event.title           # "Meeting with Joe"
event.when.start_time # 2013-04-16 13:00:00 -0400

Resources

Warning: Google documentation links sometimes move without good redirection.

Todo