Merge branch '8784-dir-listings'
[arvados.git] / doc / sdk / ruby / index.html.textile.liquid
index 11dfcfb4343099f0afa05c529425345d3ae26c61..ec7bfaa2eb26f6f915a0c7cbd3bc0880d528492b 100644 (file)
@@ -2,9 +2,13 @@
 layout: default
 navsection: sdk
 navmenu: Ruby
-title: "Ruby SDK"
-
+title: "Installation"
 ...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
 
 The Ruby SDK provides a generic set of wrappers so you can make API calls easily.
 
@@ -22,7 +26,7 @@ h4. Option 1: install with RubyGems
 
 <notextile>
 <pre>
-$ <code class="userinput">sudo gem install arvados</code>
+$ <code class="userinput">sudo -i gem install arvados</code>
 </pre>
 </notextile>
 
@@ -33,7 +37,7 @@ h4. Option 2: build and install from source
 $ <code class="userinput">git clone https://github.com/curoverse/arvados.git</code>
 $ <code class="userinput">cd arvados/sdk/ruby</code>
 $ <code class="userinput">gem build arvados.gemspec</code>
-$ <code class="userinput">sudo gem install arvados-*.gem</code>
+$ <code class="userinput">sudo -i gem install arvados-*.gem</code>
 </pre>
 </notextile>
 
@@ -52,74 +56,3 @@ EOF</code>
 arvados.v1.users.current.full_name = 'Your Name'
 </pre>
 </notextile>
-
-h3. Examples
-
-Import the module (we skipped this step above by using "ruby -r arvados"):
-
-<notextile>
-<pre><code class="userinput">require 'arvados'
-</code></pre>
-</notextile>
-
-Set up an API client user agent:
-
-<notextile>
-<pre><code class="userinput">arv = Arvados.new(apiVersion: 'v1')
-</code></pre>
-</notextile>
-
-Get the User object for the current user:
-
-<notextile>
-<pre><code class="userinput">current_user = arv.user.current
-</code></pre>
-</notextile>
-
-Get the UUID of an object that was retrieved using the SDK:
-
-<notextile>
-<pre><code class="userinput">current_user_uuid = current_user[:uuid]
-</code></pre>
-</notextile>
-
-Retrieve an object by ID:
-
-<notextile>
-<pre><code class="userinput">some_user = arv.user.get(uuid: current_user_uuid)
-</code></pre>
-</notextile>
-
-Create an object:
-
-<notextile>
-<pre><code class="userinput">new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
-</code></pre>
-</notextile>
-
-Update an object:
-
-<notextile>
-<pre><code class="userinput">updated_link = arv.link.update(uuid: new_link[:uuid],
-                               link: {properties: {foo: 'bar'}})
-</code></pre>
-</notextile>
-
-Delete an object:
-
-<notextile>
-<pre><code class="userinput">arv.link.delete(uuid: new_link[:uuid])
-</code></pre>
-</notextile>
-
-Get a list of objects:
-
-<notextile>
-<pre><code class="userinput">repos = arv.repository.list
-first_repo = repos[:items][0]
-puts "UUID of first repo returned is #{first_repo[:uuid]}"</code>
-UUID of first repo returned is qr1hi-s0uqq-b1bnybpx3u5temz
-</pre>
-</notextile>
-
-The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.