Add railtie
[arvados.git] / README.md
index b7fadc996ed8c0aa2c3ce84f00ea3507c8a12880..840b0476b6d66c2899e82f514ae04dce3d263d89 100644 (file)
--- a/README.md
+++ b/README.md
@@ -84,7 +84,7 @@ For server-to-server interactions, like those between a web application and Goog
 
     client = Google::APIClient.new
     key = Google::APIClient::PKCS12.load_key('client.p12', 'notasecret')
-    service_account = Google::APIClient::JWTAsserter(
+    service_account = Google::APIClient::JWTAsserter.new(
         '123456-abcdef@developer.gserviceaccount.com',
         'https://www.googleapis.com/auth/prediction',
         key)
@@ -104,9 +104,9 @@ Example:
         puts result.data
     end
     
-    batch.add(:api_method=>urlshortener.url.insert, 
+    batch.add(:api_method => urlshortener.url.insert, 
               :body_object => { 'longUrl' => 'http://example.com/foo' })
-    batch.add(:api_method=>urlshortener.url.insert, 
+    batch.add(:api_method => urlshortener.url.insert, 
               :body_object => { 'longUrl' => 'http://example.com/bar' })
     client.execute(batch)
     
@@ -146,4 +146,33 @@ and continue if necessary, check `result.resumable_upload`.
     if upload.resumable?
         client.execute(upload)
     end
-    
+
+## Command Line
+
+Included with the gem is a command line interface for working with Google APIs.
+
+    # Log in
+    google-api oauth-2-login --client-id='...' --client-secret='...' --scope="https://www.googleapis.com/auth/plus.me"
+
+    # List the signed-in user's activities
+    google-api execute plus.activities.list --api=plus -- userId="me" collection="public"
+
+    # Start an interactive API session
+    google-api irb
+    >> plus = $client.discovered_api('plus')
+    >> $client.execute(plus.activities.list, {'userId' => 'me', 'collection' => 'public'})
+    => # returns a response from the API
+
+For more information, use `google-api --help`
+
+## Samples
+
+See the full list of [samples on Google Code](http://code.google.com/p/google-api-ruby-client/source/browse?repo=samples).
+
+
+## Support
+
+Please [report bugs at the project on Google Code](http://code.google.com/p/google-api-ruby-client/issues/entry). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
+
+
+