[ARVADOS] updated: 1.1.2-45-g99bec63
Git user
git at public.curoverse.com
Thu Dec 21 09:40:43 EST 2017
Summary of changes:
sdk/R/R/Arvados.R | 19 ++++++++++++++-----
sdk/R/README | 8 ++++----
2 files changed, 18 insertions(+), 9 deletions(-)
via 99bec637f6d4384a8d6f3c2cb27eb32d13c14f21 (commit)
from 3d51cb80240a582a901855d7a7e79b70dcf28bab (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 99bec637f6d4384a8d6f3c2cb27eb32d13c14f21
Author: Fuad Muhic <fmuhic at capeannenterprises.com>
Date: Thu Dec 21 15:39:10 2017 +0100
Made updating groups and collections less verbose.
Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>
diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R
index b521026..3236ab7 100644
--- a/sdk/R/R/Arvados.R
+++ b/sdk/R/R/Arvados.R
@@ -100,13 +100,16 @@ Arvados <- R6::R6Class(
collection
},
- updateCollection = function(uuid, body)
+ updateCollection = function(uuid, newContent)
{
collectionURL <- paste0(private$host, "collections/", uuid)
headers <- list("Authorization" = paste("OAuth2", private$token),
"Content-Type" = "application/json")
+ body <- list(list())
names(body) <- c("collection")
+ body$collection <- newContent
+
body <- jsonlite::toJSON(body, auto_unbox = T)
serverResponse <- private$http$PUT(collectionURL, headers, body)
@@ -119,13 +122,16 @@ Arvados <- R6::R6Class(
collection
},
- createCollection = function(body)
+ createCollection = function(content)
{
collectionURL <- paste0(private$host, "collections")
headers <- list("Authorization" = paste("OAuth2", private$token),
"Content-Type" = "application/json")
+ body <- list(list())
names(body) <- c("collection")
+ body$collection <- content
+
body <- jsonlite::toJSON(body, auto_unbox = T)
serverResponse <- private$http$POST(collectionURL, headers, body)
@@ -153,14 +159,15 @@ Arvados <- R6::R6Class(
project
},
- createProject = function(body)
+ createProject = function(content)
{
projectURL <- paste0(private$host, "groups")
headers <- list("Authorization" = paste("OAuth2", private$token),
"Content-Type" = "application/json")
+ body <- list(list())
names(body) <- c("group")
- body$group <- c("group_class" = "project", body$group)
+ body$group <- c("group_class" = "project", content)
body <- jsonlite::toJSON(body, auto_unbox = T)
serverResponse <- private$http$POST(projectURL, headers, body)
@@ -173,13 +180,15 @@ Arvados <- R6::R6Class(
project
},
- updateProject = function(uuid, body)
+ updateProject = function(uuid, newContent)
{
projectURL <- paste0(private$host, "groups/", uuid)
headers <- list("Authorization" = paste("OAuth2", private$token),
"Content-Type" = "application/json")
+ body <- list(list())
names(body) <- c("group")
+ body$group <- newContent
body <- jsonlite::toJSON(body, auto_unbox = T)
serverResponse <- private$http$PUT(projectURL, headers, body)
diff --git a/sdk/R/README b/sdk/R/README
index 5ae23c2..0c43473 100644
--- a/sdk/R/README
+++ b/sdk/R/README
@@ -51,13 +51,13 @@ deletedCollection <- arv$deleteCollection("uuid")
#Update collection:
-updatedCollection <- arv$updateCollection("uuid", list(list(name = "new_name", description = "new_desciption")))
+updatedCollection <- arv$updateCollection("uuid", list(name = "new_name", description = "new_desciption"))
--------------------------------------------------------------------------------------------------------------------------------
#Create collection:
-createdCollection <- arv$createCollection(list(list(name = "new_name", description = "new_desciption")))
+createdCollection <- arv$createCollection(list(name = "new_name", description = "new_desciption"))
--------------------------------------------------------------------------------------------------------------------------------
@@ -201,12 +201,12 @@ deletedProject <- arv$deleteProject("uuid")
#Update project:
-updatedProject <- arv$updateProject("uuid", list(list(name = "new_name", description = "new_desciption")))
+updatedProject <- arv$updateProject("uuid", list(name = "new_name", description = "new_desciption"))
--------------------------------------------------------------------------------------------------------------------------------
#Create project:
-createdProject <- arv$createProject(list(list(name = "project_name", description = "project_desciption")))
+createdProject <- arv$createProject(list(name = "project_name", description = "project_desciption"))
--------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list