Refactored most of the code.
authorFuad Muhic <fmuhic@capeannenterprises.com>
Tue, 5 Dec 2017 14:35:27 +0000 (15:35 +0100)
committerFuad Muhic <fmuhic@capeannenterprises.com>
Tue, 5 Dec 2017 14:35:27 +0000 (15:35 +0100)
Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic@capeannenterprises.com>

12 files changed:
sdk/R/.RData
sdk/R/NAMESPACE
sdk/R/R/Arvados.R
sdk/R/R/Collection.R
sdk/R/R/HttpParser.R
sdk/R/R/HttpRequest.R
sdk/R/R/custom_classes.R
sdk/R/man/Collection-class.Rd [moved from sdk/R/man/Collection.Rd with 61% similarity]
sdk/R/man/collection_create.Rd [deleted file]
sdk/R/man/collection_delete.Rd [deleted file]
sdk/R/man/collection_get.Rd [deleted file]
sdk/R/man/collection_list.Rd [deleted file]

index 1e0b193a52ad7cf1c5978647b0e71ab44b5dd3ff..0f875af1e657b759a091f73d98d80f6cb509e5af 100644 (file)
Binary files a/sdk/R/.RData and b/sdk/R/.RData differ
index 41f39945af1733cad961b6eb4a42f7cef5aef3b0..f9e576a874d9bc3679bd29c4d028f2bbdcd66b3a 100644 (file)
@@ -1,4 +1,4 @@
 # Generated by roxygen2: do not edit by hand
 
 export(Arvados)
-export(Collection)
+exportClasses(Collection)
index d502b8dabe93f830054040f70f97f4bdeb31598a..abd07f9a12940e7ca58cfe433b8fa527d322a67b 100644 (file)
@@ -15,169 +15,138 @@ Arvados <- setRefClass(
     "Arvados",
 
     fields = list(
-        token = "ANY",
-        host  = "ANY"
+
+        getToken          = "function",
+        getHostName       = "function",
+
+        #Todo(Fudo): These are hardcoded and for debug only. Remove them later on.
+        getWebDavToken    = "function",
+        getWebDavHostName = "function",
+
+        collection_get    = "function",
+        collection_list   = "function",
+        collection_create = "function",
+        collection_update = "function",
+        collection_delete = "function"
     ),
 
     methods = list(
 
         initialize = function(auth_token = NULL, host_name = NULL) 
         {
-            version <- "v1"
-            #Todo(Fudo): Set environment variables
-            token <<- auth_token
-            host  <<- paste0("https://", host_name, "/arvados/", version, "/")
-        }
-    )
-)
+            # Private state
+            if(!is.null(host_name))
+               Sys.setenv(ARVADOS_API_HOST  = host_name)
 
-#' collection_get
-#'
-#' Get Arvados collection
-#'
-#' @name collection_get
-#' @field uuid UUID of the given collection
-#' @examples arv = Arvados("token", "hostName")
-#' @examples arv$collection_get("uuid")
-Arvados$methods(
-
-    collection_get = function(uuid) 
-    {
-        collection_relative_url <- paste0("collections/", uuid)
-        http_request <- HttpRequest("GET", token, host, collection_relative_url) 
-        server_response <- http_request$execute()
-
-        httpParser <- HttpParser()
-        collection <- httpParser$parseCollectionGet(server_response)
+            if(!is.null(auth_token))
+                Sys.setenv(ARVADOS_API_TOKEN = auth_token)
 
-        if(!is.null(collection$errors))
-            stop(collection$errors)       
+            host  <- Sys.getenv("ARVADOS_API_HOST");
+            token <- Sys.getenv("ARVADOS_API_TOKEN");
 
-        class(collection) <- "ArvadosCollection"
+            if(host == "" | token == "")
+                stop("Please provide host name and authentification token or set ARVADOS_API_HOST and ARVADOS_API_TOKEN environmental variables.")
 
-        return(collection)
-    }
-)
-
-#' collection_list
-#'
-#' Retreive list of collections based on provided filter.
-#'
-#' @name collection_list
-#' @field filters List of filters we want to use to retreive list of collections.
-#' @field limit Limits the number of result returned by server.
-#' @field offset Offset from beginning of the result set.
-#' @examples arv = Arvados("token", "hostName")
-#' @examples arv$collection_list(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"))
-Arvados$methods(
+            version <- "v1"
+            host  <- paste0("https://", host, "/arvados/", version, "/")
 
-    collection_list = function(filters = NULL, limit = NULL, offset = NULL) 
-    {
-        #Todo(Fudo): Implement limit and offset
-        collection_relative_url <- "collections"
-        http_request <- HttpRequest("GET", token, host, collection_relative_url,
-                                    body = NULL,  filters, limit, offset) 
+            # Public methods
+            getToken <<- function() { token }
+            getHostName <<- function() { host }
 
-        server_response <- http_request$execute()
+            #Todo(Fudo): Hardcoded credentials to WebDAV server. Remove them later
+            getWebDavToken    <<- function() { "4invqy35tf70t7hmvdc83ges8ug9cklhgqq1l8gj2cjn18teuq" }
+            getWebDavHostName <<- function() { "https://collections.4xphq.arvadosapi.com/c=4xphq-4zz18-9d5b0qm4fgijeyi/_/" }
 
-        httpParser <- HttpParser()
-        collection <- httpParser$parseCollectionGet(server_response)
+            collection_get <<- function(uuid) 
+            {
+                collection_url <- paste0(host, "collections/", uuid)
+                headers <- list(Authorization = paste("OAuth2", token))
 
-        if(!is.null(collection$errors))
-            stop(collection$errors)       
+                http <- HttpRequest() 
+                serverResponse <- http$GET(collection_url, headers)
 
-        class(collection) <- "ArvadosCollectionList"
+                httpParser <- HttpParser()
+                collection <- httpParser$parseJSONResponse(serverResponse)
 
-        return(collection)
-    }
-)
+                if(!is.null(collection$errors))
+                    stop(collection$errors)       
 
-#' collection_create
-#'
-#' Create Arvados collection
-#'
-#' @name collection_create
-#' @field body Structure of the collection we want to create.
-#' @examples arv = Arvados("token", "hostName")
-#' @examples arv$collection_create(list(collection = list(name = "myCollection")))
-Arvados$methods(
+                collection
+            }
 
-    collection_create = function(body
-    {
-        collection_relative_url <- paste0("collections/", "/?alt=json")
-        body = jsonlite::toJSON(body, auto_unbox = T)
+            collection_list <<- function(filters = NULL, limit = 100, offset = 0
+            {
+                collection_url <- paste0(host, "collections")
+                headers <- list(Authorization = paste("OAuth2", token))
 
-        http_request    <- HttpRequest("POST", token, host, collection_relative_url, body
-        server_response <- http_request$execute()
+                http <- HttpRequest(
+                serverResponse <- http$GET(collection_url, headers, NULL, filters, limit, offset)
 
-        httpParser <- HttpParser()
-        collection <- httpParser$parseCollectionGet(server_response)
+                httpParser <- HttpParser()
+                collection <- httpParser$parseJSONResponse(serverResponse)
 
-        if(!is.null(collection$errors))
-            stop(collection$errors)       
+                if(!is.null(collection$errors))
+                    stop(collection$errors)       
 
-        class(collection) <- "ArvadosCollection"
+                collection
+            }
 
-        return(collection)
-    }
-)
+            collection_delete <<- function(uuid) 
+            {
+                collection_url <- paste0(host, "collections/", uuid)
+                headers <- list("Authorization" = paste("OAuth2", token),
+                                "Content-Type"  = "application/json")
 
-#' collection_delete
-#'
-#' Delete Arvados collection
-#'
-#' @name collection_delete
-#' @field uuid UUID of the collection we want to delete.
-#' @examples arv = Arvados("token", "hostName")
-#' @examples arv$collection_delete(uuid = "aaaaa-bbbbb-ccccccccccccccc")
-Arvados$methods(
+                http <- HttpRequest() 
+                serverResponse <- http$DELETE(collection_url, headers)
 
-    collection_delete = function(uuid) 
-    {
-        collection_relative_url <- paste0("collections/", uuid, "/?alt=json")
+                httpParser <- HttpParser()
+                collection <- httpParser$parseJSONResponse(serverResponse)
 
-        http_request    <- HttpRequest("DELETE", token, host, collection_relative_url) 
-        server_response <- http_request$execute()
+                if(!is.null(collection$errors))
+                    stop(collection$errors)       
 
-        httpParser <- HttpParser()
-        collection <- httpParser$parseCollectionGet(server_response)
+                collection
+            }
 
-        if(!is.null(collection$errors))
-            stop(collection$errors)       
+            collection_update <<- function(uuid, body) 
+            {
+                collection_url <- paste0(host, "collections/", uuid)
+                headers <- list("Authorization" = paste("OAuth2", token),
+                                "Content-Type"  = "application/json")
+                body <- jsonlite::toJSON(body, auto_unbox = T)
 
-        class(collection) <- "ArvadosCollection"
+                http <- HttpRequest() 
+                serverResponse <- http$PUT(collection_url, headers, body)
 
-        return(collection)
-    }
-)
+                httpParser <- HttpParser()
+                collection <- httpParser$parseJSONResponse(serverResponse)
 
-#' collection_update
-#'
-#' Update Arvados collection
-#'
-#' @name collection_update
-#' @field uuid UUID of the collection we want to update.
-#' @field body New structure of the collection.
-#' @examples arv = Arvados("token", "hostName")
-#' @examples arv$collection_update(uuid = "aaaaa-bbbbb-ccccccccccccccc", list(collection = list(name = "newName")))
-Arvados$methods(
+                if(!is.null(collection$errors))
+                    stop(collection$errors)       
 
-    collection_update = function(uuid, body) 
-    {
-        collection_relative_url <- paste0("collections/", uuid, "/?alt=json")
-        body = jsonlite::toJSON(body, auto_unbox = T)
+                collection
+            }
 
-        http_request    <- HttpRequest("PUT", token, host, collection_relative_url, body) 
-        server_response <- http_request$execute()
+            collection_create <<- function(body) 
+            {
+                collection_url <- paste0(host, "collections")
+                headers <- list("Authorization" = paste("OAuth2", token),
+                                "Content-Type"  = "application/json")
+                body <- jsonlite::toJSON(body, auto_unbox = T)
 
-        httpParser <- HttpParser()
-        collection <- httpParser$parseCollectionGet(server_response)
+                http <- HttpRequest() 
+                serverResponse <- http$POST(collection_url, headers, body)
 
-        if(!is.null(collection$errors))
-            stop(collection$errors)       
+                httpParser <- HttpParser()
+                collection <- httpParser$parseJSONResponse(serverResponse)
 
-        class(collection) <- "ArvadosCollection"
+                if(!is.null(collection$errors))
+                    stop(collection$errors)       
 
-        return(collection)
-    }
+                collection
+            }
+        }
+    )
 )
index 037f711105e4fa0009e6b429ecc623070267d929..cf2a612d87cdd5d5d218a3782b0fa32012684ed2 100644 (file)
@@ -33,7 +33,6 @@ Collection <- setRefClass(
 
     "Collection",
 
-    #NOTE(Fudo): Fix types!
     fields = list(uuid                     = "ANY",
                   items                    = "ANY",
                   etag                     = "ANY",
@@ -55,16 +54,18 @@ Collection <- setRefClass(
                   file_names               = "ANY",
                   trash_at                 = "ANY",
                   is_trashed               = "ANY",
-                  arvados_api              = "Arvados"
+
+                  getCollectionContent = "function"
     ),
 
     methods = list(
 
         initialize = function(api, uuid) 
         {
-            arvados_api <<- api
-            result <- arvados_api$collection_get(uuid)
+
+            result <- api$collection_get(uuid)
             
+            # Private members
             uuid                     <<- result$uuid                               
             etag                     <<- result$etag                               
             owner_uuid               <<- result$owner_uuid                         
@@ -86,23 +87,27 @@ Collection <- setRefClass(
             trash_at                 <<- result$trash_at                           
             is_trashed               <<- result$is_trashed                         
 
-            items  <<- getCollectionContent()
-        },
 
-        getCollectionContent = function()
-        {
-            #IMPORTANT(Fudo): This url is hardcoded for now. Fix it later.
-            uri <- URLencode("https://collections.4xphq.arvadosapi.com/c=4xphq-4zz18-9d5b0qm4fgijeyi/_/")
+            #Public methods
 
-            # fetch directory listing via curl and parse XML response
-            h <- curl::new_handle()
-            curl::handle_setopt(h, customrequest = "PROPFIND")
+            # Private methods
+            getCollectionContent <<- function()
+            {
+                #TODO(Fudo): Use proper URL here.
+                uri <- URLencode(api$getWebDavHostName())
 
-            #IMPORTANT(Fudo): Token is hardcoded as well. Write it properly.
-            curl::handle_setheaders(h, "Authorization" = paste("OAuth2 4invqy35tf70t7hmvdc83ges8ug9cklhgqq1l8gj2cjn18teuq"))
-            response <- curl::curl_fetch_memory(uri, h)
+                # fetch directory listing via curl and parse XML response
+                h <- curl::new_handle()
+                curl::handle_setopt(h, customrequest = "PROPFIND")
 
-            HttpParser()$parseWebDAVResponse(response, uri)
+                #TODO(Fudo): Use proper token here.
+                curl::handle_setheaders(h, "Authorization" = paste("OAuth2", api$getWebDavToken()))
+                response <- curl::curl_fetch_memory(uri, h)
+
+                HttpParser()$parseWebDAVResponse(response, uri)
+            }
+
+            items  <<- getCollectionContent()
         }
     )
 )
index ebe7d8c636d28b26132f4d3da965a709753b380f..bbe0a604a042ac2587565384d4111e44f7ecb9b0 100644 (file)
@@ -19,6 +19,13 @@ HttpParser <- setRefClass(
             #Todo(Fudo): Create new Collection object and populate it
         },
 
+        parseJSONResponse = function(server_response) 
+        {
+            parsed_response <- httr::content(server_response, as = "parsed", type = "application/json")
+
+            #Todo(Fudo): Create new Collection object and populate it
+        },
+
         parseWebDAVResponse = function(response, uri)
         {
             #Todo(Fudo): Move this to HttpParser.
@@ -29,7 +36,7 @@ HttpParser <- setRefClass(
             base <- paste(paste("/", strsplit(uri, "/")[[1]][-1:-3], sep="", collapse=""), "/", sep="")
             result <- unlist(
                 XML::xpathApply(doc, "//D:response/D:href", function(node) {
-                    sub(base, "", URLdecode(xmlValue(node)), fixed=TRUE)
+                    sub(base, "", URLdecode(XML::xmlValue(node)), fixed=TRUE)
                 })
             )
             result[result != ""]
index 041d64d825fe9e842b87c2d97e5e353b04c2238b..eecf0c1a15352a089c9e108249276cf5bb4d0d42 100644 (file)
@@ -5,163 +5,126 @@ HttpRequest <- setRefClass(
     "HttrRequest",
 
     fields = list(
-        send_method         = "character",
-        server_base_url     = "character",
-        server_relative_url = "character",
-        auth_token          = "character",
-        allowed_methods     = "list",
-        request_body        = "ANY",
-        query_filters       = "ANY",
-        response_limit      = "ANY",
-        query_offset        = "ANY"
+
+        GET    = "function",
+        PUT    = "function",
+        POST   = "function",
+        DELETE = "function"
     ),
 
     methods = list(
-        initialize = function(method,
-                              token,
-                              base_url,
-                              relative_url,
-                              body = NULL,
-                              filters = NULL,
-                              limit = 100,
-                              offset = 0) 
-        {
-            send_method         <<- method
-            auth_token          <<- token
-            server_base_url     <<- base_url
-            server_relative_url <<- relative_url
-            request_body        <<- body
-            query_filters       <<- filters
-            response_limit      <<- limit
-            query_offset        <<- offset
-        },
-
-        execute = function() 
+        initialize = function() 
         {
-            #Todo(Fudo): Get rid of the switch and make this module more general.
-            http_method <- switch(send_method,
-                                  "GET"    = .self$getRequest,
-                                  "POST"   = .self$postRequest,
-                                  "PUT"    = .self$putRequest,
-                                  "DELETE" = .self$deleteRequest,
-                                  "PATCH"  = .self$pathcRequest)
-            http_method()
-        },
-
-        getRequest = function() 
-        {
-            requestHeaders <- httr::add_headers(Authorization = .self$getAuthHeader())
-            requestQuery   <- .self$generateQuery()
-            url            <- paste0(server_base_url, server_relative_url, requestQuery)
-
-            server_data <- httr::GET(url    = url,
-                                     config = requestHeaders)
-        },
+            # Public methods
+            GET <<- function(url, headers = NULL, body = NULL,
+                             queryFilters = NULL, limit = 100, offset = 0)
+            {
+                print(limit)
+                headers <- httr::add_headers(unlist(headers))
+                query <- .createQuery(queryFilters, limit, offset)
+                url <- paste0(url, query)
+                print(url)
 
-        #Todo(Fudo): Try to make this more generic
-        postRequest = function() 
-        {
-            url <- paste0(server_base_url, server_relative_url)
-            requestHeaders <- httr::add_headers("Authorization" = .self$getAuthHeader(),
-                                                "Content-Type"  = "application/json")
-            response <- POST(url, body = request_body, config = requestHeaders)
-        },
+                serverResponse <- httr::GET(url = url, config = headers)
+            }
 
-        putRequest = function() 
-        {
-            url <- paste0(server_base_url, server_relative_url)
-            requestHeaders <- httr::add_headers("Authorization" = .self$getAuthHeader(),
-                                                "Content-Type"  = "application/json")
+            PUT <<- function(url, headers = NULL, body = NULL,
+                             queryFilters = NULL, limit = 100, offset = 0)
+            {
+                headers <- httr::add_headers(unlist(headers))
+                query <- .createQuery(queryFilters, limit, offset)
+                url <- paste0(url, query)
 
-            response <- PUT(url, body = request_body, config = requestHeaders)
-        },
+                serverResponse <- httr::PUT(url = url, config = headers, body = body)
+            }
 
-        deleteRequest = function() 
-        {
-            url <- paste0(server_base_url, server_relative_url)
-            requestHeaders <- httr::add_headers("Authorization" = .self$getAuthHeader(),
-                                                "Content-Type"  = "application/json")
-            response <- DELETE(url, config = requestHeaders)
-        },
+            POST <<- function(url, headers = NULL, body = NULL,
+                              queryFilters = NULL, limit = 100, offset = 0)
+            {
+                headers <- httr::add_headers(unlist(headers))
+                query <- .createQuery(queryFilters, limit, offset)
+                url <- paste0(url, query)
 
-        pathcRequest = function() 
-        {
-            #Todo(Fudo): Implement this later on.
-            print("PATCH method")
-        },
+                serverResponse <- httr::POST(url = url, config = headers, body = body)
+            }
 
-        getAuthHeader = function() 
-        {
-            auth_method <- "OAuth2"
-            auth_header <- paste(auth_method, auth_token)
-        },
+            DELETE <<- function(url, headers = NULL, body = NULL,
+                             queryFilters = NULL, limit = 100, offset = 0)
+            {
+                headers <- httr::add_headers(unlist(headers))
+                query <- .createQuery(queryFilters, limit, offset)
+                url <- paste0(url, query)
 
-        generateQuery = function() 
-        {
-            #Todo(Fudo): This function is a mess, refactor it
-            finalQuery <- "?alt=json"
+                serverResponse <- httr::DELETE(url = url, config = headers)
+            }
 
-            if(!is.null(query_filters))
+            # Private methods
+            .createQuery <- function(filters, limit, offset)
             {
-                filters <- sapply(query_filters, function(filter)
+                finalQuery <- "?alt=json"
+
+                if(!is.null(filters))
                 {
-                    if(length(filter) != 3)
-                        stop("Filter list must have exacthey 3 elements.")
+                    filters <- sapply(filters, function(filter)
+                    {
+                        if(length(filter) != 3)
+                            stop("Filter list must have exacthey 3 elements.")
 
-                    attributeAndOperator = filter[c(1, 2)]
-                    filterList = filter[[3]]
-                    filterListIsPrimitive = TRUE
-                    if(length(filterList) > 1)
-                        filterListIsPrimitive = FALSE
+                        attributeAndOperator = filter[c(1, 2)]
+                        filterList = filter[[3]]
+                        filterListIsPrimitive = TRUE
+                        if(length(filterList) > 1)
+                            filterListIsPrimitive = FALSE
 
-                    attributeAndOperator <- sapply(attributeAndOperator, function(component) {
-                        component <- paste0("\"", component, "\"")
-                    })
+                        attributeAndOperator <- sapply(attributeAndOperator, function(component) {
+                            component <- paste0("\"", component, "\"")
+                        })
 
-                    filterList <- sapply(unlist(filterList), function(filter) {
-                        filter <- paste0("\"", filter, "\"")
-                    })
+                        filterList <- sapply(unlist(filterList), function(filter) {
+                            filter <- paste0("\"", filter, "\"")
+                        })
 
-                    filterList <- paste(filterList, collapse = ",+")
+                        filterList <- paste(filterList, collapse = ",+")
 
-                    if(!filterListIsPrimitive)
-                        filterList <- paste0("[", filterList, "]")
+                        if(!filterListIsPrimitive)
+                            filterList <- paste0("[", filterList, "]")
 
-                    filter <- c(attributeAndOperator, filterList)
+                        filter <- c(attributeAndOperator, filterList)
 
-                    queryParameter <- paste(filter, collapse = ",+")
-                    queryParameter <- paste0("[", queryParameter, "]")
-        
-                })
+                        queryParameter <- paste(filter, collapse = ",+")
+                        queryParameter <- paste0("[", queryParameter, "]")
+            
+                    })
 
-                filters <- paste(filters, collapse = ",+")
-                filters <- paste0("[", filters, "]")
+                    filters <- paste(filters, collapse = ",+")
+                    filters <- paste0("[", filters, "]")
 
-                encodedQuery <- URLencode(filters, reserved = T, repeated = T)
+                    encodedQuery <- URLencode(filters, reserved = T, repeated = T)
 
-                finalQuery <- paste0(finalQuery, "&filters=", encodedQuery)
+                    finalQuery <- paste0(finalQuery, "&filters=", encodedQuery)
 
-                #Todo(Fudo): This is a hack for now. Find a proper solution.
-                finalQuery <- stringr::str_replace_all(finalQuery, "%2B", "+")
-            }
+                    #Todo(Fudo): This is a hack for now. Find a proper solution.
+                    finalQuery <- stringr::str_replace_all(finalQuery, "%2B", "+")
+                }
 
-            if(!is.null(response_limit))
-            {
-                if(!is.numeric(response_limit))
-                    stop("Limit must be a numeric type.")
-                
-                finalQuery <- paste0(finalQuery, "&limit=", response_limit)
-            }
+                if(!is.null(limit))
+                {
+                    if(!is.numeric(limit))
+                        stop("Limit must be a numeric type.")
+                    
+                    finalQuery <- paste0(finalQuery, "&limit=", limit)
+                }
 
-            if(!is.null(query_offset))
-            {
-                if(!is.numeric(query_offset))
-                    stop("Offset must be a numeric type.")
-                
-                finalQuery <- paste0(finalQuery, "&offset=", query_offset)
-            }
+                if(!is.null(offset))
+                {
+                    if(!is.numeric(offset))
+                        stop("Offset must be a numeric type.")
+                    
+                    finalQuery <- paste0(finalQuery, "&offset=", offset)
+                }
 
-            finalQuery
+                finalQuery
+            }
         }
     )
 )
index 89d1d12614f54760726ee982dc7f95684dca1bcd..22f1f76e468c4bb56558de969b2e0dd7306edf40 100644 (file)
@@ -1,11 +1,3 @@
-#Study(Fudo): For some reason this doesnt seem to work,
-#see what seems to be a problem.
-
-setOldClass("characterOrNULL")
-setClassUnion("characterOrNULL", c("character", "NULL"))
-
-setClassUnion("listOrNULL", c("list", "NULL"))
-setOldClass("listOrNULL")
-
-setOldClass("numericOrNULL")
-setClassUnion("numericOrNULL", c("numeric", "NULL"))
+setClassUnion("characterOrNull", c("character", "NULL"))
+setClassUnion("listOrNull", c("list", "NULL"))
+setClassUnion("numericOrNull", c("numeric", "NULL"))
similarity index 61%
rename from sdk/R/man/Collection.Rd
rename to sdk/R/man/Collection-class.Rd
index add30b1440853167eab966f0b5124b935907f67d..79a771a24f19da28f556f9a20cbe1e774c7994e8 100644 (file)
@@ -1,18 +1,10 @@
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/arvados_objects.R
-\name{Collection}
+% Please edit documentation in R/Collection.R
+\docType{class}
+\name{Collection-class}
+\alias{Collection-class}
 \alias{Collection}
 \title{Collection Object}
-\usage{
-Collection(uuid = NULL, etag = NULL, owner_uuid = NULL,
-  created_at = NULL, modified_by_client_uuid = NULL,
-  modified_by_user_uuid = NULL, modified_at = NULL,
-  portable_data_hash = NULL, replication_desired = NULL,
-  replication_confirmed_at = NULL, replication_confirmed = NULL,
-  updated_at = NULL, manifest_text = NULL, name = NULL,
-  description = NULL, properties = NULL, delete_at = NULL,
-  file_names = NULL, trash_at = NULL, is_trashed = NULL)
-}
 \arguments{
 \item{uuid}{Object ID}
 
@@ -54,9 +46,6 @@ Collection(uuid = NULL, etag = NULL, owner_uuid = NULL,
 
 \item{is_trashed}{No description}
 }
-\value{
-Collection object
-}
 \description{
 Collection Object
 }
@@ -64,4 +53,4 @@ Collection Object
 Todo: Update description
 Collection
 }
-\concept{Collection functions}
+
diff --git a/sdk/R/man/collection_create.Rd b/sdk/R/man/collection_create.Rd
deleted file mode 100644 (file)
index 4a0509b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Arvados.R
-\name{collection_create}
-\alias{collection_create}
-\title{collection_create}
-\description{
-Create Arvados collection
-}
-\section{Fields}{
-
-\describe{
-\item{\code{body}}{Structure of the collection we want to create.}
-}}
-
-\examples{
-arv = Arvados("token", "host_name")
-arv$collection_create(list(collection = list(name = "myCollection")))
-}
diff --git a/sdk/R/man/collection_delete.Rd b/sdk/R/man/collection_delete.Rd
deleted file mode 100644 (file)
index 5c37a9b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Arvados.R
-\name{collection_delete}
-\alias{collection_delete}
-\title{collection_delete}
-\description{
-Delete Arvados collection
-
-Delete Arvados collection
-}
-\section{Fields}{
-
-\describe{
-\item{\code{uuid}}{UUID of the collection we want to delete.}
-
-\item{\code{uuid}}{UUID of the collection we want to delete.}
-}}
-
-\examples{
-arv = Arvados("token", "host_name")
-arv$collection_delete(uuid = "aaaaa-bbbbb-ccccccccccccccc")
-arv = Arvados("token", "host_name")
-arv$collection_delete(uuid = "aaaaa-bbbbb-ccccccccccccccc")
-}
diff --git a/sdk/R/man/collection_get.Rd b/sdk/R/man/collection_get.Rd
deleted file mode 100644 (file)
index e29170b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Arvados.R
-\name{collection_get}
-\alias{collection_get}
-\title{collection_get}
-\description{
-Get Arvados collection
-}
-\section{Fields}{
-
-\describe{
-\item{\code{uuid}}{UUID of the given collection}
-}}
-
-\examples{
-arv = Arvados("token", "host_name")
-arv$collection_get("uuid")
-}
diff --git a/sdk/R/man/collection_list.Rd b/sdk/R/man/collection_list.Rd
deleted file mode 100644 (file)
index a1a73d7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Arvados.R
-\name{collection_list}
-\alias{collection_list}
-\title{collection_list}
-\description{
-Retreive list of collections based on provided filter.
-}
-\section{Fields}{
-
-\describe{
-\item{\code{filters}}{List of filters we want to use to retreive list of collections.}
-
-\item{\code{limit}}{Limits the number of result returned by server.}
-
-\item{\code{offset}}{Offset from beginning of the result set.}
-}}
-
-\examples{
-arv = Arvados("token", "host_name")
-arv$collection_list(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"))
-}