From 793e983fbe4f775a6c776ce0b2b3b7b0d245bf7e Mon Sep 17 00:00:00 2001 From: Bob Aman Date: Thu, 7 Oct 2010 22:36:02 +0000 Subject: [PATCH] Broke the examples in the README up a bit to be less intimidating. git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@47 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef --- README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README b/README index 4fd5c4ff6..676990a6d 100644 --- a/README +++ b/README @@ -12,6 +12,7 @@ APIs. == Example Usage + # Initialize the client require 'google/api_client' require 'signet/oauth_1/client' client = Google::APIClient.new( @@ -40,6 +41,11 @@ APIs. ) # Redirect user here client.authorization.fetch_token_credential!(:verifier => '12345') + + # Discover available methods + method_names = client.discovered_service('buzz').to_h.keys + + # Make an API call response = client.execute( 'chili.activities.list', {'scope' => '@self', 'userId' => '@me', 'alt' => 'json'},