Created
February 6, 2009 22:38
-
-
Save dwaite/59664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require 'oauth' | |
=> true | |
>> @consumer=OAuth::Consumer.new( "connect-demo.com", "<secret>", {:site => "http://docs.google.com"}) | |
=> #<OAuth::Consumer:0x1253298 @key="connect-demo.com", @options={:signature_method=>"HMAC-SHA1", :request_token_path=>"/oauth/request_token", :site=>"http://docs.google.com", :authorize_path=>"/oauth/authorize", :access_token_path=>"/oauth/access_token", :scheme=>:header, :http_method=>:post, :oauth_version=>"1.0"}, @secret="<secret>"> | |
>> @consumer.request(:get, '/feeds/documents/private/full?xoauth_requestor_id=dwaite%40connect-demo.com', nil, {:scheme=>:query_string}) | |
=> #<Net::HTTPOK 200 OK readbody=true> | |
>> response.body | |
=> "<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd='http://schemas.google.com/g/2005'><id>http://docs.google.com/feeds/documents/private/full</id><updated>2009-02-06T21:45:33.511Z</updated><title type='text'>Available Documents - [email protected]</title><link rel='alternate' type='text/html' href='http://docs.google.com'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://docs.google.com/feeds/documents/private/full'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://docs.google.com/feeds/documents/private/full'/><link rel='self' type='application/atom+xml' href='http://docs.google.com/feeds/documents/private/full'/><author><name>dwaite</name><email>[email protected]</email></author><openSearch:totalResults>0</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex></feed>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment