This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit b537d210cb2c73b5fa6309167e35c9409496bad2
tree 6386684d5fa34b144f32fa2d87470656deed085c
parent 5be561cd10c11f6f0fe1aebc222466c72077dbf4
tree 6386684d5fa34b144f32fa2d87470656deed085c
parent 5be561cd10c11f6f0fe1aebc222466c72077dbf4
| name | age | message | |
|---|---|---|---|
| |
History.txt | ||
| |
License.txt | ||
| |
Manifest.txt | ||
| |
README.txt | ||
| |
Rakefile | ||
| |
config/ | Mon Nov 19 17:04:45 -0800 2007 | |
| |
lib/ | ||
| |
log/ | Mon Nov 19 17:04:45 -0800 2007 | |
| |
script/ | ||
| |
setup.rb | ||
| |
tasks/ | ||
| |
test/ | ||
| |
website/ |
README.txt
Google Base Class is a base for authenticating to google and making requests to google services.
=Installation
sudo gem install googlebase
=Usage
===Establish A Connection
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.
require 'google/base'
Google::Base.establish_connection('username', 'password')
Google::Base.get('http://google.com/reader/path/to/whatever/')
Google::Base.get('https://google.com:443/analytics/home/') # to make an ssl request
===Inheritance
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.
require 'google/base'
Google::Base.establish_connection('username', 'password')
module Google
module Reader
class Base < Google::Base
class << self
def get_token
get("http://www.google.com/reader/api/0/token")
end
end
end
end
end
puts Google::Reader::Base.get_token







