Show
Destroy
An entry
Get it down. Make it good. Share it.
Title
Text
At MITA, we used Google Apps for email, online documents, spreadsheets, forms, chat, and more. I've been weaving Applications together in an Intranet, using Ruby & Rails. Ruby is a pleasure to work with. It is a logical, flexible, and powerful object-oriented scripting-type language. The "Staff Listing" on the Intranet list the 50+ employees in the organization, and the data is pulled from PowerSchool, the school's Student Information System (SIS) [where all Employees are centrally managed anyway]. Using Ruby and Google's API, I've put together the following pages: * Index * Login Using a webform, submit Google login information (username and password) to https://www.google.com/accounts/ClientLogin , which returns the "token": SID=DQAAAIUAAAAfSngN... LSID=DQAAAIcAAAAinnV... Auth=DQAAAIcAAAAinnV... * Reports<br /> The "Reports" page uses the SID from the token, and submits a request to google.com/hosted/services/v1.0/reports/ReportingData. Using Google's API, I can grab * accounts * activity * disk_space * email_clients * quota_limit_accounts * summary * suspended_accounts (described <a href="http://code.google.com/apis/apps/reporting/google_apps_reporting_api.html">here</a>) @token = SID @domain = your Google Apps domain name (this assumes you are using Google Apps for <b>your domain</b>) @date = "2009-11-14" # This XML String will be posted to the URL below xml_req =<<EOF <?xml version="1.0" encoding="UTF-8"?> <rest xmlns="google:accounts:rest:protocol" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "> <type>Report</type> <token>#{@token}</token> <domain>@domain</domain> <date>@date</date> <reportType>daily</reportType> <reportName>accounts</reportName> </rest> EOF # This actually posts the Request http = Net::HTTP.new('www.google.com', 443) http.use_ssl = true req = http.post('/hosted/services/v1.0/reports/ReportingData', xml_req) I've also touched the surface pulling feeds from the domain, using google.com/a/feeds/domain_name - this is something to explore a bit more.
Status
idea
draft
release
personal
Series
Part of a Series?
Bitcoin
On Work
Phoenix Trello Tutorial
Civics
Re Email Address
Tags
api
×
google
×
ruby
×
integration
×
+
Slug
Url
Image 1
Image 2
Image 3
Visible
Date