X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0ac69cee6889be8337d147a75829596f19075fa5..194df852b504214879c005a0b730ab1e00395160:/doc/sdk/ruby/index.html.textile.liquid diff --git a/doc/sdk/ruby/index.html.textile.liquid b/doc/sdk/ruby/index.html.textile.liquid index b78a37d03a..ec7bfaa2eb 100644 --- a/doc/sdk/ruby/index.html.textile.liquid +++ b/doc/sdk/ruby/index.html.textile.liquid @@ -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. @@ -52,74 +56,3 @@ EOF arvados.v1.users.current.full_name = 'Your Name' - -h3. Examples - -Import the module (we skipped this step above by using "ruby -r arvados"): - - -
require 'arvados'
-
-
- -Set up an API client user agent: - - -
arv = Arvados.new(apiVersion: 'v1')
-
-
- -Get the User object for the current user: - - -
current_user = arv.user.current
-
-
- -Get the UUID of an object that was retrieved using the SDK: - - -
current_user_uuid = current_user[:uuid]
-
-
- -Retrieve an object by ID: - - -
some_user = arv.user.get(uuid: current_user_uuid)
-
-
- -Create an object: - - -
new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
-
-
- -Update an object: - - -
updated_link = arv.link.update(uuid: new_link[:uuid],
-                               link: {properties: {foo: 'bar'}})
-
-
- -Delete an object: - - -
arv.link.delete(uuid: new_link[:uuid])
-
-
- -Get a list of objects: - - -
repos = arv.repository.list
-first_repo = repos[:items][0]
-puts "UUID of first repo returned is #{first_repo[:uuid]}"
-UUID of first repo returned is qr1hi-s0uqq-b1bnybpx3u5temz
-
-
- -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.