Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: boxr
Type: Package
Title: Interface for the 'Box.com API'
Version: 0.3.4.99999
Version: 0.3.5
Authors@R: c(
person("Brendan", "Rocks", email = "[email protected]",
role = c("aut")),
Expand Down
18 changes: 10 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# boxr 0.3.4.99999
# boxr 0.3.5

## Improvements

* adds automatic-retry to authentication functions, `box_auth()` and `box_auth_service()`. (#131)

* adds `box_auth_service()` to support OAuth2.0 using JWT, also adds `box_dir_invite()` to invite a collaboration on a Box folder. This makes it easier to authenticate to box.com from remote computers (e.g. RStudio Cloud, RStudio Server) (#23)

* modifies `box_source()`: adds `...` argument to pass other arguments to `source()`.
Expand Down Expand Up @@ -110,7 +112,7 @@ write function ([rio::export](https://github.com/leeper/rio)), the file type can
be determined automatically from the filename provided.

* `box_add_description` A simple way to add a description to a file on box.com.
These are a useful way to decribe the contents of a file, and can also be used
These are a useful way to describe the contents of a file, and can also be used
like commit messages on GitHub, to describe recent changes made.

* `box_fresh_auth` A convenience function for users having trouble
Expand All @@ -127,11 +129,11 @@ place of a file_id string

## Improvements

* Example of usage with `magrittr` pipes is added to the [README](README.md)
* Example of usage with `magrittr` pipes is added to the README.

* box file/folder id's are now validated locally before requests are sent

* Filenames are now validated locally, with helpful/informative error mesages
* Filenames are now validated locally, with helpful/informative error messages

* `box_read` now accepts a user specified read function, which is now by default
`rio::import`
Expand All @@ -148,7 +150,7 @@ interested (`?boxr_S3_classes`)
* `box_getwd` no longer logs an uninformative message

* Documentation / collaboration improvements (improved function documentation,
[variable naming conventions](R/README.md), and a code of conduct)
variable naming conventions (`R/README.md`), and a code of conduct)

* Improved tests

Expand All @@ -157,7 +159,7 @@ interested (`?boxr_S3_classes`)

* `options(boxr.progress = TRUE)` is now respected consistently

* Fix for spurious warnings comming from the latest version of `httr` (see
* Fix for spurious warnings coming from the latest version of `httr` (see
jeroenooms/curl#30 and hadley/httr#252)

* Fix for weird reporting for certain valid API queries, which return exactly 0
Expand All @@ -168,15 +170,15 @@ results

# boxr v0.2.9

Note: Skipped a version increment for CRAN iterationsii
Note: Skipped a version increment for CRAN iterations


## Bug Fixes

* Namespace stuff for the latest Rbuild under Windows


## Installtion
## Installation

Now up on CRAN:

Expand Down
10 changes: 5 additions & 5 deletions R/boxr-package.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#' boxr: access the Box API
#'
#' A lightweight, high-level R interface for the [box.com](https://developer.box.com/docs) API
#' A lightweight, *opinionated*, high-level R interface for the [box.com](https://developer.box.com/docs) API.
#'
#' This package has a documentation-website (created using [pkgdown](https://pkgdown.r-lib.org/)), containing:
#'
#' - [README](https://r-box.github.io/boxr)
#' - [README](https://r-box.github.io/boxr).
#' - [Get-started article](https://r-box.github.io/boxr/articles/boxr.html),
#' also accessible from R: `vignette("boxr")`
#' - [Function reference](https://r-box.github.io/boxr/reference/index.html)
#' also accessible from R: `vignette("boxr")`.
#' - [Function reference](https://r-box.github.io/boxr/reference/index.html).
#'
#' The `boxr` source-repository is at GitHub: <https://github.com/r-box/boxr>.
#' The boxr source-repository is at GitHub: <https://github.com/r-box/boxr>.
#'
#' If you find anything you think might be a bug, please report it as a
#' [GitHub issue](https://github.com/r-box/boxr/issues)!
Expand Down
2 changes: 1 addition & 1 deletion R/boxr__internal_diff_and_uldl.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Single Directory Operations for Downloading and Uploading mutiple Files
#' Single Directory Operations for Downloading and Uploading multiple Files
#'
#' Download or upload the contents of a box.com directory, not including
#' subdirectories
Expand Down
9 changes: 4 additions & 5 deletions R/boxr__internal_dir_comparison.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#' The reverse is true for uploads (e.g. via [box_fetch()]).
#'
#' `box_dir_diff` decides what should happen to a file based on three
#' peices of information:
#'
#' \describe{
#' \item{**Presence**}{
Expand All @@ -25,7 +24,7 @@
#' }
#' \item{**Content**}{
#' If a file is present in both the origin and the destination, does it
#' have the same content? The defintion comes from the file's `sha1`
#' have the same content? The definition comes from the file's `sha1`
#' hash, which for local files is determined using the
#' [digest()] function from the package of the same name. For
#' remote files, it is queried from the box.com API.
Expand Down Expand Up @@ -56,7 +55,7 @@
#'
#' Implementing similar functionality for local files is not possible in a
#' platform-independent manner; content modified time is the only file-based
#' timestamp which has a consistent defintion for UNIX and Windows
#' timestamp which has a consistent definition for UNIX and Windows
#' systems.
#'
#' @param dir_id The id of the box.com folder which you'd like to use for the
Expand Down Expand Up @@ -86,7 +85,7 @@
#' [box_fetch()]/[box_push()], they will be deleted.
#' }
#' \item{**`to_update`**}{
#' Files which are present in both the orign and the destination, but
#' Files which are present in both the origin and the destination, but
#' which have more recently modified copies in the origin. If downloading
#' with [box_fetch()], and `overwrite` set to `TRUE`,
#' new files will overwrite existing local copies. If uploading with
Expand Down Expand Up @@ -308,7 +307,7 @@ create_loc_dir_df <- function(local_dir = getwd()) {
#' Obtain a data.frame of the sub-directories in a box.com folder
#'
#' Takes the `id` of a box folder and returns a data.frame of it's
#' subdirectories, indluding thier equivalent paths in the local directory.
#' subdirectories, including their equivalent paths in the local directory.
#'
#' @param dir_id The box.com id for the folder that you'd like to query
#' @param local_dir The local directory which you'd like `dir_id` to
Expand Down
17 changes: 9 additions & 8 deletions R/boxr_auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#' \item{[box_auth_service()]}{for authenticating to service-apps.}
#' \item{[httr::oauth2.0_token()]}{for details on how tokens are handled.}
#' \item{[Box Developers: Setup with OAuth 2.0](https://developer.box.com/en/guides/applications/custom-apps/oauth2-setup)}{
#' documentation for setting up Box apps.}
#' documentation for setting up Box (interactive) apps with OAuth 2.0.}
#' }
#'
#' @export
Expand Down Expand Up @@ -225,7 +225,7 @@ box_auth <- function(client_id = NULL, client_secret = NULL,
#' @inheritParams box_auth
#' @param ... Other arguments passed to [box_auth()].
#'
#' @seealso [box_auth()] for the usual method of authorisation
#' @seealso [box_auth()] for the usual method of authentication.
#'
#' @export
#'
Expand All @@ -244,7 +244,7 @@ box_fresh_auth <- function(cache = "~/.boxr-oauth", ...) {

#' Authenticate to Box (interactive) automatically
#'
#' **This function is deprecated, and will be removed at the next relase.**
#' **This function is deprecated, and will be removed at the next release.**
#'
#' This function saves you the effort of typing [box_auth()] after
#' the package loads. Executing `box_auth_on_attach(TRUE)` will mean that
Expand All @@ -253,7 +253,7 @@ box_fresh_auth <- function(cache = "~/.boxr-oauth", ...) {
#' current session.
#'
#' @note This is provided for convenience, but it's a bad idea to use, if:
#' * You'd like your code to be reporoducible. Even if your
#' * You'd like your code to be reproducible. Even if your
#' collaborators have access to the same files on box.com, as the default
#' behaviour is to require using [box_auth()], code is likely to
#' become irreproducible.
Expand Down Expand Up @@ -325,7 +325,7 @@ box_auth_on_attach <- function(auth_on_attach = FALSE) {
#' Authenticate to Box (service-app)
#'
#' @description
#' How you authenticate to Box depends on how the Box-app through which you
#' How you authenticate to Box depends the Box-app through which you
#' connect. A Box service-app can be useful for unattended jobs that need
#' access to only a limited part of Box, e.g. one folder.
#'
Expand All @@ -336,10 +336,11 @@ box_auth_on_attach <- function(auth_on_attach = FALSE) {
#' are your Box-admin team. You specify the JWT either as `token_file`,
#' the path to the JWT file, or as `token_text`, the text of the JWT.
#'
#' Using JWT-authenitcation is more convienient than using standard OAuth2
#' Using JWT-authentication is more convenient than using standard OAuth2
#' authentication, as you do not have to go through the "OAuth Dance". This
#' convenience brings additional considerations because the JWT file gives
#' its bearer uninhibited access to anything the Box service-app can access:
#' its bearer uninhibited access to anything the Box service-app can access.
#' Accordingly, you are recommended to:
#'
#' - give the service-account access to as little information as you need it
#' to have, e.g. a single folder.
Expand Down Expand Up @@ -383,7 +384,7 @@ box_auth_on_attach <- function(auth_on_attach = FALSE) {
#' \item{[box_dir_invite()]}{for inviting a different account to collaborate on
#' a Box folder.}
#' \item{[Box Developers: Setup with JWT](https://developer.box.com/en/guides/applications/custom-apps/jwt-setup)}{
#' documentation for setting up Box apps.}
#' documentation for setting up Box (service) apps with JWT.}
#' }
#'
#'
Expand Down
4 changes: 2 additions & 2 deletions R/boxr_dir_verbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' Files present in the origin but not the destination will be
#' copied over.
#'
#' Behaviour when a file exists in both depends on the argumments supplied.
#' Behaviour when a file exists in both depends on the arguments supplied.
#'
#' @aliases box_push box_fetch
#'
Expand Down Expand Up @@ -41,7 +41,7 @@
#' However, files at Box are versioned, and most
#' operating systems have file recovery features (e.g. 'Trash'
#' (Ubuntu/Debian/OSX), or 'Recycle Bin' (Windows)), so unintended
#' modification of files will be revertable for most users.
#' modification of files will be revertible for most users.
#'
#' @section Implementation:
#'
Expand Down
26 changes: 13 additions & 13 deletions R/boxr_s3_classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
#'
#' **`boxr_file_reference`**
#'
#' - describes a file created, modified, or deleted at Box
#' - describes a file created, modified, or deleted at Box.
#' - returned by [box_ul()], [box_save()], [box_delete_file()], etc.
#' - available methods: [print()]
#' - available methods: [print()].
#'
#' **`boxr_folder_reference`**
#'
#' - describes a folder created or deleted at Box
#' - returned by [box_dir_create()], [box_delete_folder()]
#' - available methods: [print()]
#' - describes a folder created or deleted at Box.
#' - returned by [box_dir_create()], [box_delete_folder()].
#' - available methods: [print()].
#'
#' **`boxr_dir_wide_operation_result`**
#'
#' - describes the result of a directory-wide operation
#' - describes the result of a directory-wide operation.
#' - returned by [box_fetch()] and [box_push()].
#' - available methods: [print()], [summary()]
#' - available methods: [print()], [summary()].
#'
#' **`boxr_object_list`**
#'
#' - describes a collection of files at Box
#' - returned by [box_ls()], [box_search()], and related functions
#' - available methods: [print()], [as.data.frame()]
#' - describes a collection of files at Box.
#' - returned by [box_ls()], [box_search()], and related functions.
#' - available methods: [print()], [as.data.frame()].
#'
#' **`boxr_dir_comparison`**
#'
#' - describes the differnce between directories
#' - returned by the internal function [box_dir_diff()]
#' - available methods: [print()], [summary()]
#' - describes the difference between directories.
#' - returned by the internal function [box_dir_diff()].
#' - available methods: [print()], [summary()].
#'
#' @name boxr_S3_classes
NULL
Expand Down
6 changes: 3 additions & 3 deletions R/boxr_search.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#' - is available for many source code file types, though not including R at
#' the time of writing.
#'
#' * Boolean operators Are supported
#' - such as `and`, `or`, and `not` (upper or lower case)
#' * Boolean operators are supported
#' - such as `and`, `or`, and `not` (upper or lower case).
#'
#' * Phrases can Be searched
#' * Phrases can be searched
#' - by putting them in "quotation marks".
#'
#' * Search availability
Expand Down
2 changes: 1 addition & 1 deletion R/boxr_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' supports `data.frame`; to serialize lists, you may wish to use
#' [jsonlite::toJSON()].
#'
#' Please note that `box_write()` is used to write Robjects to Box files
#' Please note that `box_write()` is used to write R objects to Box files
#' using standard formats. To write R objects as `.RData` files,
#' you can use [box_save()].
#'
Expand Down
Loading