Skip to content

Commit

Permalink
Remove space_create and spaces_object_delete from exports
Browse files Browse the repository at this point in the history
As per pachadotdev#140:

- Remove export tags from space_create and spaces_object_delete
- Add notes to the roxygen docstrings
- Add `stops` with a hopefully helpful error message that the fns are not implemented yet
- Re-document package
  • Loading branch information
amoeba committed Jun 12, 2018
1 parent 195af19 commit 8c2a637
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,10 @@ export(sizes)
export(snapshot)
export(snapshot_delete)
export(snapshots)
export(space_create)
export(spaces)
export(spaces_acl_get)
export(spaces_acl_put)
export(spaces_object_copy)
export(spaces_object_delete)
export(spaces_object_get)
export(spaces_object_head)
export(spaces_object_put)
Expand Down
7 changes: 6 additions & 1 deletion R/spaces.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,15 @@ space_files <- function(space_info) {
}

#' Create a new space
#'
#' This function is not implemented yet. A working implementation is planned in
#' future releases of this package.
#'
#' @importFrom aws.s3 put_bucket
#' @export
#' @rdname spaces
space_create <- function(name, spaces_key = NULL, spaces_secret = NULL, ...) {
stop("This function is not implemented yet.", call. = FALSE)

if (is.null(name)) stop("Please specify the space name")
spaces_key <- check_space_access(spaces_key)
spaces_secret <- check_space_secret(spaces_secret)
Expand Down
6 changes: 5 additions & 1 deletion R/spaces_object_delete.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#' Delete an Object from a Space
#'
#' This function is not implemented yet. A working implementation is planned in
#' future releases of this package.
#'
#' @param object (character) The Object to delete
#' @param space (character) The Space to delete the Object from
#' @template spaces_args
#' @param ... Additional argument passed to \code{\link[aws.s3]{delete_object}}
#'
#' @return \code{TRUE} if successful, otherwise an object of class aws_error
#' details if not.
#' @export
#'
#' @references \url{https://developers.digitalocean.com/documentation/
#' spaces/#delete-object}
Expand All @@ -26,6 +28,8 @@ spaces_object_delete <- function(object,
spaces_key = NULL,
spaces_secret = NULL,
...) {
stop("This function is not implemented yet.", call. = FALSE)

spaces_key <- check_space_access(spaces_key)
spaces_secret <- check_space_secret(spaces_secret)

Expand Down
3 changes: 2 additions & 1 deletion man/spaces.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/spaces_object_delete.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c2a637

Please sign in to comment.