- name <- classSchema$id
- fields <- unique(names(classSchema$properties))
- #fieldsList <- paste0("c(", paste0("\"", fields, "\"", collapse = ", "), ")")
- constructorArgs <- paste(fields, "= NULL")
-
- classString <- c("#' @export",
- paste0(name, " <- R6::R6Class("),
- "",
- paste0("\t\"", name, "\","),
- "",
- "\tpublic = list(",
- paste0("\t\t", fields, " = NULL,"),
- "",
- "\t\tinitialize = function(",
- paste0("\t\t\t\t", splitArgs(constructorArgs, 40, ")")),
- "\t\t{",
- paste0("\t\t\tself$", fields, " <- ", fields),
- "\t\t\t",
- "\t\t\tprivate$classFields <- c(",
- paste0("\t\t\t\t", splitArgs(fields, 40)),
- "\t\t\t)",
- "\t\t},",
- "",
- "\t\ttoJSON = function() {",
- "\t\t\tfields <- sapply(private$classFields, function(field)",
- "\t\t\t{",
- "\t\t\t\tself[[field]]",
- "\t\t\t}, USE.NAMES = TRUE)",
- "\t\t\t",
- paste0("\t\t\tjsonlite::toJSON(list(\"", tolower(name), "\" =
- Filter(Negate(is.null), fields)), auto_unbox = TRUE)"),
- "\t\t}",
- "\t),",
- "",
- "\tprivate = list(",
- "\t\tclassFields = NULL",
- "\t),",
- "",
- "\tcloneable = FALSE",
- ")",
- "")
+ #TODO: Manually update this documentation to reflect changes in discovery document.
+ c("#' project.get",
+ "#' ",
+ "#' projects.get is equivalent to groups.get method.",
+ "#' ",
+ "#' @usage arv$projects.get(uuid)",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.get",
+ "NULL",
+ "",
+ "#' project.create",
+ "#' ",
+ "#' projects.create wrapps groups.create method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.create(group, ensure_unique_name = \"false\")",
+ "#' @param group Group object.",
+ "#' @param ensure_unique_name Adjust name to ensure uniqueness instead of returning an error on (owner_uuid, name) collision.",
+ "#' @return Group object.",
+ "#' @name projects.create",
+ "NULL",
+ "",
+ "#' project.update",
+ "#' ",
+ "#' projects.update wrapps groups.update method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.update(group, uuid)",
+ "#' @param group Group object.",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.update",
+ "NULL",
+ "",
+ "#' project.delete",
+ "#' ",
+ "#' projects.delete is equivalent to groups.delete method.",
+ "#' ",
+ "#' @usage arv$project.delete(uuid)",
+ "#' @param uuid The UUID of the Group in question.",
+ "#' @return Group object.",
+ "#' @name projects.delete",
+ "NULL",
+ "",
+ "#' project.list",
+ "#' ",
+ "#' projects.list wrapps groups.list method by setting group_class attribute to \"project\".",
+ "#' ",
+ "#' @usage arv$projects.list(filters = NULL,",
+ "#' where = NULL, order = NULL, distinct = NULL,",
+ "#' limit = \"100\", offset = \"0\", count = \"exact\",",
+ "#' include_trash = NULL, uuid = NULL, recursive = NULL)",
+ "#' @param filters ",
+ "#' @param where ",
+ "#' @param order ",
+ "#' @param distinct ",
+ "#' @param limit ",
+ "#' @param offset ",
+ "#' @param count ",
+ "#' @param include_trash Include items whose is_trashed attribute is true.",
+ "#' @param uuid ",
+ "#' @param recursive Include contents from child groups recursively.",
+ "#' @return Group object.",
+ "#' @name projects.list",
+ "NULL",
+ "")