},
- project.get = function(uuid)
+ projects.get = function(uuid)
{
self$groups.get(uuid)
},
- project.create = function(group, ensure_unique_name = "false")
+ projects.create = function(group, ensure_unique_name = "false")
{
group <- c("group_class" = "project", group)
self$groups.create(group, ensure_unique_name)
},
- project.update = function(group, uuid)
+ projects.update = function(group, uuid)
{
group <- c("group_class" = "project", group)
self$groups.update(group, uuid)
},
- project.list = function(filters = NULL, where = NULL,
+ projects.list = function(filters = NULL, where = NULL,
order = NULL, select = NULL, distinct = NULL,
limit = "100", offset = "0", count = "exact",
include_trash = NULL)
limit, offset, count, include_trash)
},
- project.delete = function(uuid)
+ projects.delete = function(uuid)
{
self$groups.delete(uuid)
},
if(toString(Sys.getenv("ARVADOS_API_HOST_INSECURE") == "TRUE"))
config$options = list(ssl_verifypeer = FALSE)
- print(config)
# times = 1 regular call + numberOfRetries
response <- httr::RETRY(verb, url = url, body = body,
config = config, times = retryTimes + 1)
generateProjectMethods <- function()
{
- c("\t\tproject.get = function(uuid)",
+ c("\t\tprojects.get = function(uuid)",
"\t\t{",
"\t\t\tself$groups.get(uuid)",
"\t\t},",
"",
- "\t\tproject.create = function(group, ensure_unique_name = \"false\")",
+ "\t\tprojects.create = function(group, ensure_unique_name = \"false\")",
"\t\t{",
"\t\t\tgroup <- c(\"group_class\" = \"project\", group)",
"\t\t\tself$groups.create(group, ensure_unique_name)",
"\t\t},",
"",
- "\t\tproject.update = function(group, uuid)",
+ "\t\tprojects.update = function(group, uuid)",
"\t\t{",
"\t\t\tgroup <- c(\"group_class\" = \"project\", group)",
"\t\t\tself$groups.update(group, uuid)",
"\t\t},",
"",
- "\t\tproject.list = function(filters = NULL, where = NULL,",
+ "\t\tprojects.list = function(filters = NULL, where = NULL,",
"\t\t\torder = NULL, select = NULL, distinct = NULL,",
"\t\t\tlimit = \"100\", offset = \"0\", count = \"exact\",",
"\t\t\tinclude_trash = NULL)",
"\t\t\t limit, offset, count, include_trash)",
"\t\t},",
"",
- "\t\tproject.delete = function(uuid)",
+ "\t\tprojects.delete = function(uuid)",
"\t\t{",
"\t\t\tself$groups.delete(uuid)",
"\t\t},",
* Get a collection:
```{r}
- collection <- arv$getCollection("uuid")
+ collection <- arv$collections.get("uuid")
```
* List collections:
```{r}
# offset of 0 and default limit of 100
- collectionList <- arv$listCollections(list(list("name", "like", "Test%")))
+ collectionList <- arv$collections.list(list(list("name", "like", "Test%")))
- collectionList <- arv$listCollections(list(list("name", "like", "Test%")), limit = 10, offset = 2)
+ collectionList <- arv$collections.list(list(list("name", "like", "Test%")), limit = 10, offset = 2)
```
```{r}
* List all collections even if the number of items is greater than maximum API limit:
```{r}
- collectionList <- arv$listAllCollections(list(list("name", "like", "Test%")))
+ collectionList <- listAll(arv$collections.list, list(list("name", "like", "Test%")))
```
* Delete a collection:
```{r}
- deletedCollection <- arv$deleteCollection("uuid")
+ deletedCollection <- arv$collections.delete("uuid")
```
* Update a collection's metadata:
```{r}
- updatedCollection <- arv$updateCollection("uuid", list(name = "New name", description = "New description"))
+ updatedCollection <- arv$collections.update(list(name = "New name", description = "New description"), "uuid")
```
* Create collection:
```{r}
- createdCollection <- arv$createCollection(list(name = "Example", description = "This is a test collection"))
+ newCollection <- arv$collections.create(list(name = "Example", description = "This is a test collection"))
```
* Get a project:
```{r}
- project <- arv$getProject("uuid")
+ project <- arv$projects.get("uuid")
```
* List projects:
```{r}
# list subprojects of a project
- projects <- arv$listProjects(list(list("owner_uuid", "=", "aaaaa-j7d0g-ccccccccccccccc")))
+ projects <- arv$projects.list(list(list("owner_uuid", "=", "aaaaa-j7d0g-ccccccccccccccc")))
# list projects which have names beginning with Example
- arv$listProjects(list(list("name","like","Example%")))
+ examples <- arv$projects.list(list(list("name","like","Example%")))
```
* List all projects even if the number of items is greater than maximum API limit:
```{r}
- collectionList <- arv$listAllProjects(list(list("name","like","Example%")))
+ projects <- listAll(arv$projects.list, list(list("name","like","Example%")))
```
* Delete a project:
```{r}
- deletedProject <- arv$deleteProject("uuid")
+ deletedProject <- arv$projects.delete("uuid")
```
* Update project:
```{r}
- updatedProject <- arv$updateProject("uuid", list(name = "new_name", description = "new description"))
+ updatedProject <- arv$projects.update(list(name = "new_name", description = "new description"), "uuid")
```
* Create project:
```{r}
- createdProject <- arv$createProject(list(name = "project_name", description = "project description"))
+ newProject <- arv$projects.update(list(name = "project_name", description = "project description"))
+ ```
+
+#### Help
+
+* View help page of any method defined in Arvados class by puting ? before method name:
+
+ ```{r}
+ ?collections.update
+ ?jobs.get
```
### Building the ArvadosR package