Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (52 sloc) 2.2 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Google Base Class by John Nunemaker</title>
<link rel="stylesheet" href="css/common.css" type="text/css" />
<div id="wrapper">
<div id="header">
<h1>Google Base Class</h1>
<p>Easy Google Authentication and Requests.</p>
<ul id="nav">
<li><a href="rdoc/">Docs</a></li>
<li><a href="">Rubyforge Page</a></li>
<div id="content">
<p>Google Base Class is a base for authenticating to google and making requests to google services.</p>
<pre><code>sudo gem install googlebase</code></pre>
<h3>Establish A Connection</h3>
<p>The code below shows how to use the gem by itself. It checks if username and password are correct (raising Google::LoginError on FAIL) and stores the session id internally. Then you can make requests and the session id is automatically passed in a cookie.</p>
<pre><code class="ruby">require 'google/base'
Google::Base.establish_connection('username', 'password')
<p>This example takes things a bit farther and shows how to use this class simply as a base to get some methods for free and then wrap whatever google service you would like.</p>
<pre><code>require 'google/base'
Google::Base.establish_connection('username', 'password')
module Google
module Reader
class Base &lt; Google::Base
class &lt;&lt; self
def get_token
puts Google::Reader::Base.get_token</code></pre>
<div id="footer">
<p>Created by <a href="">John Nunemaker</a></p>
<script src="" type="text/javascript"></script>
<script type="text/javascript">_uacct = "UA-85301-15"; urchinTracker();</script>