[ARVADOS] updated: 3c2fee34ad8f668f5cf9001d6b7d605965ec28bb

Git user git at public.curoverse.com
Tue Nov 1 10:20:21 EDT 2016


Summary of changes:
 doc/_config.yml                                    |  9 ++-
 doc/_layouts/default.html.liquid                   |  2 +-
 .../install-prerequisites.html.textile.liquid      |  4 +-
 doc/sdk/cli/install.html.textile.liquid            |  1 -
 doc/sdk/go/example.html.textile.liquid             | 43 +++++++++++-
 doc/sdk/go/index.html.textile.liquid               | 13 +---
 doc/sdk/index.html.textile.liquid                  |  4 +-
 doc/sdk/java/example.html.textile.liquid           | 78 +++++++++++++++++++++
 doc/sdk/java/index.html.textile.liquid             | 11 ++-
 doc/sdk/perl/example.html.textile.liquid           | 81 ++++++++++++++++++++++
 doc/sdk/perl/index.html.textile.liquid             | 59 +---------------
 doc/sdk/python/example.html.textile.liquid         | 23 ++++--
 doc/sdk/python/sdk-python.html.textile.liquid      |  3 +-
 doc/sdk/ruby/example.html.textile.liquid           | 75 ++++++++++++++++++++
 doc/sdk/ruby/index.html.textile.liquid             | 74 +-------------------
 15 files changed, 313 insertions(+), 167 deletions(-)
 create mode 100644 doc/sdk/java/example.html.textile.liquid
 create mode 100644 doc/sdk/perl/example.html.textile.liquid
 create mode 100644 doc/sdk/ruby/example.html.textile.liquid

       via  3c2fee34ad8f668f5cf9001d6b7d605965ec28bb (commit)
      from  c10e9e5f3398d40a3346c7d7c1f84bf50262b8ec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3c2fee34ad8f668f5cf9001d6b7d605965ec28bb
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Nov 1 10:20:14 2016 -0400

    10346: Document SDK examples uniformly

diff --git a/doc/_config.yml b/doc/_config.yml
index d77b39d..4f9e200 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -83,8 +83,8 @@ navbar:
       - sdk/python/crunch-utility-libraries.html.textile.liquid
       - sdk/python/events.html.textile.liquid
     - CLI:
-      - sdk/cli/index.html.textile.liquid
       - sdk/cli/install.html.textile.liquid
+      - sdk/cli/index.html.textile.liquid
       - sdk/cli/reference.html.textile.liquid
       - sdk/cli/subcommands.html.textile.liquid
     - Go:
@@ -92,10 +92,13 @@ navbar:
       - sdk/go/example.html.textile.liquid
     - Perl:
       - sdk/perl/index.html.textile.liquid
+      - sdk/perl/example.html.textile.liquid
     - Ruby:
       - sdk/ruby/index.html.textile.liquid
+      - sdk/ruby/example.html.textile.liquid
     - Java:
       - sdk/java/index.html.textile.liquid
+      - sdk/java/example.html.textile.liquid
   api:
     - Concepts:
       - api/index.html.textile.liquid
@@ -153,12 +156,12 @@ navbar:
       - install/configure-azure-blob-storage.html.textile.liquid
       - install/install-keepproxy.html.textile.liquid
       - install/install-keep-web.html.textile.liquid
-    - Install Crunch v2 on SLURM:
+    - Containers API support on SLURM:
       - install/crunch2-slurm/install-prerequisites.html.textile.liquid
       - install/crunch2-slurm/install-compute-node.html.textile.liquid
       - install/crunch2-slurm/install-dispatch.html.textile.liquid
       - install/crunch2-slurm/install-test.html.textile.liquid
-    - Install Crunch v1:
+    - Jobs API support (deprecated):
       - install/install-crunch-dispatch.html.textile.liquid
       - install/install-compute-node.html.textile.liquid
     - Helpful hints:
diff --git a/doc/_layouts/default.html.liquid b/doc/_layouts/default.html.liquid
index ed232c6..4c4e254 100644
--- a/doc/_layouts/default.html.liquid
+++ b/doc/_layouts/default.html.liquid
@@ -2,7 +2,7 @@
 <html>
   <head>
     <meta charset="utf-8">
-    <title>{% unless page.title == "Arvados | Documentation" %} Arvados | Documentation | {% endunless %}{{ page.title }}</title>
+    <title>{% unless page.title == "Arvados | Documentation" %} Arvados {% if page.navmenu %}| {{ page.navmenu }} {% endif %} | {% endunless %}{{ page.title }}</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="description" content="">
     <meta name="author" content="">
diff --git a/doc/install/crunch2-slurm/install-prerequisites.html.textile.liquid b/doc/install/crunch2-slurm/install-prerequisites.html.textile.liquid
index c4dc929..26c7dde 100644
--- a/doc/install/crunch2-slurm/install-prerequisites.html.textile.liquid
+++ b/doc/install/crunch2-slurm/install-prerequisites.html.textile.liquid
@@ -1,9 +1,9 @@
 ---
 layout: default
 navsection: installguide
-title: Crunch v2 SLURM prerequisites
+title: Containers API SLURM prerequisites
 ...
 
-Crunch v2 containers can be dispatched to a SLURM cluster.  The dispatcher sends work to the cluster using SLURM's @sbatch@ command, so it works in a variety of SLURM configurations.
+Containers can be dispatched to a SLURM cluster.  The dispatcher sends work to the cluster using SLURM's @sbatch@ command, so it works in a variety of SLURM configurations.
 
 In order to run containers, you must run the dispatcher as a user that has permission to set up FUSE mounts and run Docker containers on each compute node.  This install guide refers to this user as the @crunch@ user.  We recommend you create this user on each compute node with the same UID and GID, and add it to the @fuse@ and @docker@ system groups to grant it the necessary permissions.  However, you can run the dispatcher under any account with sufficient permissions across the cluster.
diff --git a/doc/sdk/cli/install.html.textile.liquid b/doc/sdk/cli/install.html.textile.liquid
index 8cde514..4776a97 100644
--- a/doc/sdk/cli/install.html.textile.liquid
+++ b/doc/sdk/cli/install.html.textile.liquid
@@ -3,7 +3,6 @@ layout: default
 navsection: sdk
 navmenu: CLI
 title: "Installation"
-
 ...
 
 Arvados CLI tools are written in Ruby and Python.  To use the @arv@ command, you can either install the @arvados-cli@ gem via RubyGems or build and install the package from source.  The @arv@ command also relies on other Arvados tools.  To get those, install the @arvados-python-client@ and @arvados-cwl-runner@ packages, either from PyPI or source.
diff --git a/doc/sdk/go/example.html.textile.liquid b/doc/sdk/go/example.html.textile.liquid
index 903d367..d8fccae 100644
--- a/doc/sdk/go/example.html.textile.liquid
+++ b/doc/sdk/go/example.html.textile.liquid
@@ -2,34 +2,71 @@
 layout: default
 navsection: sdk
 navmenu: Python
-title: Python SDK examples
+title: Examples
 ...
 
+h2.  Initialize SDK
+
+<pre>
+import (
+  "git.curoverse.com/arvados.git/sdk/go/arvados"
+  "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
+}
+
+func main() {
+  arv, err := arvadosclient.MakeArvadosClient()
+  if err != nil {
+    log.Fatalf("Error setting up arvados client %s", err.Error())
+  }
+}
+</pre>
+
 h2. create
 
 <pre>
   var collection arvados.Collection
-  err := api.Create("collection", Dict{"collection": Dict{"name": "create example"}}, &collection)
+  err := api.Create("collections", Dict{"collection": Dict{"name": "create example"}}, &collection)
 </pre>
 
 h2. delete
 
 <pre>
   var collection arvados.Collection
-  err := api.Delete("collection", "", Dict{"collection": Dict{"name": "create example"}}, &collection)
+  err := api.Delete("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{}, &collection)
 </pre>
 
 h2. get
 
 <pre>
+  var collection arvados.Collection
+  err := api.Get("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{}, &collection)
 </pre>
 
 h2. list
 
 <pre>
+  var collection arvados.Collection
+  err := api.List("collections", Dict{}, &collection)
 </pre>
 
 h2. update
 
 <pre>
+  var collection arvados.Collection
+  err := api.Update("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{"collection": Dict{"name": "update example"}}, &collection)
+</pre>
+
+h2. Get current user
+
+<pre>
+  var user arvados.User
+  err := api.Get("users", "current", Dict{}, &user)
 </pre>
+
+h2. Example program
+
+You can save this source as a .go file and run it:
+
+<notextile>{% code 'example_sdk_go' as go %}</notextile>
+
+A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree.
diff --git a/doc/sdk/go/index.html.textile.liquid b/doc/sdk/go/index.html.textile.liquid
index 2487331..f18320a 100644
--- a/doc/sdk/go/index.html.textile.liquid
+++ b/doc/sdk/go/index.html.textile.liquid
@@ -2,24 +2,15 @@
 layout: default
 navsection: sdk
 navmenu: Go
-title: "Go SDK"
-
+title: "Installation"
 ...
 
 The Go ("Golang":http://golang.org) SDK provides a generic set of wrappers so you can make API calls easily.
 
 h3. Installation
 
-You don't need to install anything. Just import the client like this. The go tools will fetch the relevant code and dependencies for you.
+Use @go get git.curoverse.com/arvados.git/sdk/go/arvadosclient at .  The go tools will fetch the relevant code and dependencies for you.
 
 <notextile>{% code 'example_sdk_go_imports' as go %}</notextile>
 
 If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://dev.arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados
-
-h3. Example
-
-You can save this source as a .go file and run it:
-
-<notextile>{% code 'example_sdk_go' as go %}</notextile>
-
-A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree.
diff --git a/doc/sdk/index.html.textile.liquid b/doc/sdk/index.html.textile.liquid
index e440e6b..990f09c 100644
--- a/doc/sdk/index.html.textile.liquid
+++ b/doc/sdk/index.html.textile.liquid
@@ -1,13 +1,13 @@
 ---
 layout: default
 navsection: sdk
-title: "Arvados SDK Reference"
+title: "SDK Reference"
 ...
 
 This section documents language bindings for the "Arvados API":{{site.baseurl}}/api and Keep that are available for various programming languages.  Not all features are available in every SDK.  The most complete SDK is the Python SDK.  Note that this section only gives a high level overview of each SDK.  Consult the "Arvados API":{{site.baseurl}}/api section for detailed documentation about Arvados API calls available on each resource.
 
 * "Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html
-* "Command line SDK":{{site.baseurl}}/sdk/cli/index.html ("arv")
+* "Command line SDK":{{site.baseurl}}/sdk/cli/install.html ("arv")
 * "Go SDK":{{site.baseurl}}/sdk/go/index.html
 * "Perl SDK":{{site.baseurl}}/sdk/perl/index.html
 * "Ruby SDK":{{site.baseurl}}/sdk/ruby/index.html
diff --git a/doc/sdk/java/example.html.textile.liquid b/doc/sdk/java/example.html.textile.liquid
new file mode 100644
index 0000000..9ff848b
--- /dev/null
+++ b/doc/sdk/java/example.html.textile.liquid
@@ -0,0 +1,78 @@
+---
+layout: default
+navsection: sdk
+navmenu: Java
+title: "Examples"
+...
+
+h2. Initialize SDK
+
+<pre>
+import org.arvados.sdk.Arvados;
+</pre>
+
+<pre>
+    String apiName = "arvados";
+    String apiVersion = "v1";
+
+    Arvados arv = new Arvados(apiName, apiVersion);
+</pre>
+
+h2. create
+
+<pre>
+    Map<String, String> collection = new HashMap<String, String>();
+    collection.put("name", "create example");
+
+    Map<String, Object> params = new HashMap<String, Object>();
+    params.put("collection", collection);
+    Map response = arv.call("collections", "create", params);
+</pre>
+
+h2. delete
+
+<pre>
+    Map<String, Object> params = new HashMap<String, Object>();
+    params.put("uuid", uuid);
+    Map response = arv.call("collections", "delete", params);
+</pre>
+
+h2. get
+
+<pre>
+    params = new HashMap<String, Object>();
+    params.put("uuid", userUuid);
+    Map response = arv.call("users", "get", params);
+</pre>
+
+h2. list
+
+<pre>
+    Map<String, Object> params = new HashMap<String, Object>();
+    Map response = arv.call("users", "list", params);
+
+    // get uuid of the first user from the response
+    List items = (List)response.get("items");
+
+    Map firstUser = (Map)items.get(0);
+    String userUuid = (String)firstUser.get("uuid");
+</pre>
+
+h2. update
+
+<pre>
+    Map<String, String> collection = new HashMap<String, String>();
+    collection.put("name", "update example");
+
+    Map<String, Object> params = new HashMap<String, Object>();
+    params.put("uuid", uuid);
+    params.put("collection", collection);
+    Map response = arv.call("collections", "update", params);
+</pre>
+
+h2. Get current user
+
+<pre>
+    Map<String, Object> params = new HashMap<String, Object>();
+    Map response = arv.call("users", "current", params);
+</pre>
diff --git a/doc/sdk/java/index.html.textile.liquid b/doc/sdk/java/index.html.textile.liquid
index 48f72d3..27984b2 100644
--- a/doc/sdk/java/index.html.textile.liquid
+++ b/doc/sdk/java/index.html.textile.liquid
@@ -2,8 +2,7 @@
 layout: default
 navsection: sdk
 navmenu: Java
-title: "Java SDK"
-
+title: "Installation"
 ...
 
 The Java SDK provides a generic set of wrappers so you can make API calls in java.
@@ -11,10 +10,10 @@ The Java SDK provides a generic set of wrappers so you can make API calls in jav
 h3. Introdution
 
 * The Java SDK requires Java 6 or later
-  
+
 * The Java SDK is implemented as a maven project. Hence, you would need a working
 maven environment to be able to build the source code. If you do not have maven setup,
-you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful. 
+you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful.
 
 * In this document $ARVADOS_HOME is used to refer to the directory where
 arvados code is cloned in your system. For ex: $ARVADOS_HOME = $HOME/arvados
@@ -38,7 +37,7 @@ ARVADOS_API_HOST_INSECURE: Set this to true if you are using self-signed
 </notextile>
 
 * Please see "api-tokens":{{site.baseurl}}/user/reference/api-tokens.html for full details.
-  	  
+
 
 h3. Building the Arvados SDK
 
@@ -124,7 +123,7 @@ The local repository is usually located in your home directory at <code class="u
 <pre>
 In Eclipse IDE:
 Window -> Preferences -> Java -> Build Path -> Classpath Variables
-    Click on the "New..." button and add a new 
+    Click on the "New..." button and add a new
     M2_REPO variable and set it to your local Maven repository
 </pre>
 </notextile>
diff --git a/doc/sdk/perl/example.html.textile.liquid b/doc/sdk/perl/example.html.textile.liquid
new file mode 100644
index 0000000..980129c
--- /dev/null
+++ b/doc/sdk/perl/example.html.textile.liquid
@@ -0,0 +1,81 @@
+---
+layout: default
+navsection: sdk
+navmenu: Perl
+title: "Examples"
+...
+
+h2. Initialize SDK
+
+Set up an API client user agent:
+
+<notextile>
+<pre><code class="userinput">
+use Arvados;
+my $arv = Arvados->new('apiVersion' => 'v1');
+</code></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.
+
+h2. create
+
+Create an object:
+
+<notextile>
+<pre><code class="userinput">my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
+</code></pre>
+</notextile>
+
+h2. delete
+
+<notextile>
+<pre><code class="userinput">my $some_user = $arv->{'collections'}->{'get'}->execute('uuid' => $collection_uuid);
+</code></pre>
+</notextile>
+
+h2. get
+
+Retrieve an object by ID:
+
+<notextile>
+<pre><code class="userinput">my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
+</code></pre>
+</notextile>
+
+Get the UUID of an object that was retrieved using the SDK:
+
+<notextile>
+<pre><code class="userinput">my $current_user_uuid = $current_user->{'uuid'}
+</code></pre>
+</notextile>
+
+h2. list
+
+Get a list of objects:
+
+<notextile>
+<pre><code class="userinput">my $repos = $arv->{'repositories'}->{'list'}->execute;
+print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
+</code></pre>
+</notextile>
+
+h2. update
+
+Update an object:
+
+<notextile>
+<pre><code class="userinput">my $test_link = $arv->{'links'}->{'update'}->execute(
+        'uuid' => $test_link->{'uuid'},
+        'link' => { 'properties' => { 'foo' => 'bar' } });
+</code></pre>
+</notextile>
+
+h2. Get current user
+
+Get the User object for the current user:
+
+<notextile>
+<pre><code class="userinput">my $current_user = $arv->{'users'}->{'current'}->execute;
+</code></pre>
+</notextile>
diff --git a/doc/sdk/perl/index.html.textile.liquid b/doc/sdk/perl/index.html.textile.liquid
index e28d020..407008d 100644
--- a/doc/sdk/perl/index.html.textile.liquid
+++ b/doc/sdk/perl/index.html.textile.liquid
@@ -2,8 +2,7 @@
 layout: default
 navsection: sdk
 navmenu: Perl
-title: "Perl SDK"
-
+title: "Installation"
 ...
 
 The Perl SDK provides a generic set of wrappers so you can make API calls easily.
@@ -63,59 +62,3 @@ EOF</code>
 arvados.v1.users.current.full_name = 'Your Name'
 </pre>
 </notextile>
-
-h3. Examples
-
-Set up an API client user agent:
-
-<notextile>
-<pre><code class="userinput">my $arv = Arvados->new('apiVersion' => 'v1');
-</code></pre>
-</notextile>
-
-Get the User object for the current user:
-
-<notextile>
-<pre><code class="userinput">my $current_user = $arv->{'users'}->{'current'}->execute;
-</code></pre>
-</notextile>
-
-Get the UUID of an object that was retrieved using the SDK:
-
-<notextile>
-<pre><code class="userinput">my $current_user_uuid = $current_user->{'uuid'}
-</code></pre>
-</notextile>
-
-Retrieve an object by ID:
-
-<notextile>
-<pre><code class="userinput">my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
-</code></pre>
-</notextile>
-
-Create an object:
-
-<notextile>
-<pre><code class="userinput">my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
-</code></pre>
-</notextile>
-
-Update an object:
-
-<notextile>
-<pre><code class="userinput">my $test_link = $arv->{'links'}->{'update'}->execute(
-        'uuid' => $test_link->{'uuid'},
-        'link' => { 'properties' => { 'foo' => 'bar' } });
-</code></pre>
-</notextile>
-
-Get a list of objects:
-
-<notextile>
-<pre><code class="userinput">my $repos = $arv->{'repositories'}->{'list'}->execute;
-print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
-</code></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.
diff --git a/doc/sdk/python/example.html.textile.liquid b/doc/sdk/python/example.html.textile.liquid
index 7ae5e58..fe24dba 100644
--- a/doc/sdk/python/example.html.textile.liquid
+++ b/doc/sdk/python/example.html.textile.liquid
@@ -2,9 +2,16 @@
 layout: default
 navsection: sdk
 navmenu: Python
-title: Python SDK examples
+title: Examples
 ...
 
+h2.  Initialize SDK
+
+<pre>
+import arvados
+api = arvados.api("v1")
+</pre>
+
 h2. create
 
 <pre>
@@ -14,23 +21,29 @@ result = api.collection().create(body={"collection": {"name": "create example"}}
 h2. delete
 
 <pre>
-result = api.collection().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
 </pre>
 
 h2. get
 
 <pre>
-result = api.collection().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
 </pre>
 
 h2. list
 
 <pre>
-result = api.collection().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
+result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
 </pre>
 
 h2. update
 
 <pre>
-result = api.collection().update(uuid="aaaaa-bbbbb-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+result = api.collections().update(uuid="aaaaa-bbbbb-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+</pre>
+
+h2. Get current user
+
+<pre>
+result = api.users().current().execute()
 </pre>
diff --git a/doc/sdk/python/sdk-python.html.textile.liquid b/doc/sdk/python/sdk-python.html.textile.liquid
index 0b0f77d..e9b560a 100644
--- a/doc/sdk/python/sdk-python.html.textile.liquid
+++ b/doc/sdk/python/sdk-python.html.textile.liquid
@@ -2,8 +2,7 @@
 layout: default
 navsection: sdk
 navmenu: Python
-title: "Python SDK"
-
+title: "Installation"
 ...
 
 The Python SDK provides access from Python to the Arvados API and Keep.  It also includes a number of command line tools for using and administering Arvados and Keep, and some conveniences for use in Crunch scripts; see "Crunch utility libraries":crunch-utility-libraries.html for details.
diff --git a/doc/sdk/ruby/example.html.textile.liquid b/doc/sdk/ruby/example.html.textile.liquid
new file mode 100644
index 0000000..b95b1fc
--- /dev/null
+++ b/doc/sdk/ruby/example.html.textile.liquid
@@ -0,0 +1,75 @@
+---
+layout: default
+navsection: sdk
+navmenu: Python
+title: Examples
+...
+
+h2.  Initialize SDK
+
+Import the module and set up an API client user agent:
+
+<pre>
+require 'arvados'
+arv = Arvados.new(apiVersion: 'v1')
+</pre>
+
+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.
+
+h2. create
+
+Create an object:
+
+<pre>
+new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
+</pre>
+
+h2. delete
+
+Delete an object:
+
+<pre>
+arv.link.delete(uuid: new_link[:uuid])
+</pre>
+
+h2. get
+
+Retrieve an object by ID:
+
+<pre>
+some_user = arv.user.get(uuid: current_user_uuid)
+</pre>
+
+1h2. list
+
+Get a list of objects:
+
+<pre>
+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>
+
+h2. update
+
+Update an object:
+
+<pre>
+updated_link = arv.link.update(uuid: new_link[:uuid],
+                               link: {properties: {foo: 'bar'}})
+</pre>
+
+h2. Get current user
+
+Get the User object for the current user:
+
+<pre>
+current_user = arv.user.current
+</pre>
+
+Get the UUID of an object that was retrieved using the SDK:
+
+<pre>
+current_user_uuid = current_user[:uuid]
+</pre>
diff --git a/doc/sdk/ruby/index.html.textile.liquid b/doc/sdk/ruby/index.html.textile.liquid
index b78a37d..5ad0254 100644
--- a/doc/sdk/ruby/index.html.textile.liquid
+++ b/doc/sdk/ruby/index.html.textile.liquid
@@ -2,8 +2,7 @@
 layout: default
 navsection: sdk
 navmenu: Ruby
-title: "Ruby SDK"
-
+title: "Installation"
 ...
 
 The Ruby SDK provides a generic set of wrappers so you can make API calls easily.
@@ -52,74 +51,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.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list