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
This commit is contained in:
parent
ddc49fdd2b
commit
793e983fbe
6
README
6
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'},
|
||||
|
|
Loading…
Reference in New Issue