Permalink
Browse files

Checking in changes prior to tagging of version 0.07. Changelog diff is:

diff --git a/Changes b/Changes
index 6f67c25..9c15f58 100644
--- a/Changes
+++ b/Changes
@@ -1,7 +1,9 @@
 Revision history for Perl extension Net::Google::Spreadsheets

-0.07    Tue Sep 22 18:11:09 2009
-        - Use Net::Google::DataAPI
+0.07    Fri Dec 22 22:53:34 2009
+        - now uses Net::Google::DataAPI
+        - AuthSub and OAuth support via Net::Google::DataAPI
+        - now uses Any::Moose

 0.06    Thu Aug 20 23:21:35 2009
         - Refactored internals
  • Loading branch information...
1 parent 35318d5 commit 935e990c3a59b0a2be0daf4de52b90ee58823336 @nobuo-danjou nobuo-danjou committed Dec 18, 2009
Showing with 44 additions and 2 deletions.
  1. +4 −2 Changes
  2. +37 −0 lib/Net/Google/Spreadsheets.pm
  3. +3 −0 xt/01_podspell.t
View
@@ -1,7 +1,9 @@
Revision history for Perl extension Net::Google::Spreadsheets
-0.07 Tue Sep 22 18:11:09 2009
- - Use Net::Google::DataAPI
+0.07 Fri Dec 22 22:53:34 2009
+ - now uses Net::Google::DataAPI
+ - AuthSub and OAuth support via Net::Google::DataAPI
+ - now uses Any::Moose
0.06 Thu Aug 20 23:21:35 2009
- Refactored internals
@@ -241,6 +241,39 @@ http://spreadsheets.google.com/ccc?key=key
Returns first item of spreadsheets(\%condition) if available.
+=head1 AUTHORIZATIONS
+
+you can optionally pass auth object argument when initializing
+Net::Google::Spreadsheets instance.
+
+If you want to use AuthSub mechanism, make Net::Google::DataAPI::Auth::AuthSub
+object and path it to the constructor:
+
+ my $authsub = Net::Google::AuthSub->new;
+ $authsub->auth(undef, $session_token);
+ my $auth = Net::Google::DataAPI::Auth::AuthSub->new(
+ authsub => $authsub
+ );
+
+ my $service = Net::Google::Spreadsheet->new(
+ auth => $auth
+ );
+
+In OAuth case, like this:
+
+ my $oauth = Net::Google::DataAPI::Auth::OAuth->new(
+ consumer_key => 'consumer.example.com',
+ consumer_secret => 'mys3cr3t',
+ callback => 'http://consumer.example.com/callback',
+ );
+ $oauth->get_request_token;
+ my $url = $oauth->get_authorize_token_url;
+ # show the url to the user and get the $verifier value
+ $oauth->get_access_token({verifier => $verifier});
+ my $service = Net::Google::Spreadsheet->new(
+ auth => $oauth
+ );
+
=head1 TESTING
To test this module, you have to prepare as below.
@@ -291,6 +324,10 @@ L<http://code.google.com/intl/en/apis/spreadsheets/docs/3.0/reference.html>
L<Net::Google::AuthSub>
+L<Net::Google::DataAPI>
+
+L<Net::OAuth>
+
L<Net::Google::Spreadsheets::Spreadsheet>
L<Net::Google::Spreadsheets::Worksheet>
View
@@ -19,3 +19,6 @@ sq
rewritable
param
com
+oauth
+AuthSub
+auth

0 comments on commit 935e990

Please sign in to comment.