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

Skip to content

r-box/boxr

Repository files navigation

Build Status Win Build Status Project Status: Active - The project has reached a stable, usable state and is being actively developed. cran version monthly_downloads

boxr

A lightweight, opinionated, high-level R interface to the box.com API, standing on the shoulders of httr.

Box is a cloud content-management and file-sharing service. The goal of the boxr package is to make it easier for you to conduct data analyses that interact with your Box account.

New in boxr 0.3.5

It has been a while since the last CRAN release of boxr; we are pleased to to announce:

  • the package-documentation has been fortified, including a pkgdown site.

  • a new authentication method: box_auth_service(), described in this article.

  • new maintainers: the creator of boxr, Brendan Rocks, is now maintainer-emeritus. The day-to-day maintenance is handled by Nathan Day and Ian Lyttle.

Other changes are detailed in the NEWS.

Installation

You can download boxr from CRAN, with:

install.packages("boxr")

If you’d like to download the development version from GitHub, use:

# install.packages("devtools")
devtools::install_github("r-box/boxr")

Documentation

The package-documentation website is created and maintained using pkgdown. Upon the CRAN release for version 0.3.5, the documentation website consists of:

Usage

We have a Get-started article that goes into more detail on interacting with your Box account using R.

Authentication

Any time you interact with the Box API, you will be using a Box application, i.e. a Box-app. If you’ve already used boxr to authenticate with Box, you’ve already used a Box app.

tl;dr

If you have access to client_id and client_secret for a Box-app, you can use box_auth() to authenticate:

box_auth(client_id = "your_client_id", client_secret = "your_client_secret")

This will kick off a process that, all being well, will keep you authenticated for the rest of the R session. By saving this information to your .Renviron file, at your next R session you can use, without arguments:

box_auth()

If you don’t have access to client_id and client_secret for a Box-app, read on.

Details

You can think of a Box-app as the door through which boxr functions can access Box. For the most part, boxr functions keep this “out-of-mind”. During authentication, Box-apps come to the fore.

Getting the authentication to work the first time is most difficult part of using this package. Once you get it working, it should just work.

How you deal with Box-apps may depend on your situation:

  • “I use a personal Box account”:

    You will have to set up a Box-app, then authenticate to it.

  • “I use a Box account that an institution manages”:

    Your institution may have set up an app already; you may be able to authenticate to it. If not, maybe you can create a Box-app or ask your Box-admin team to create one.

The type of Box-app you use may also depend your situation:

  • “I want to use boxr interactively, from my local computer”:

    We recommend you use a Box interactive-app, then authenticate using box_auth(). You can read more in this interactive-app article.

  • “I want to run an unattended scheduled process, e.g. a report, from a remote machine using boxr”:

    We recommend you use a Box service-app, then authenticate using box_auth_service(). You can read more in this service-app article.

  • “I want to use boxr interactively using a remote machine, perhaps using RStudio Cloud or RStudio Server.”:

    You could go either way; this situation is covered in both the interactive-app article and the service-app article.

The differences between the two types of apps are discussed in this overview article on Box-apps.

Basic operations

Advanced operations

Alternatives

Other ways to interact with a Box account include:

Contributing

Always very welcome! If you’d like to submit a pull request for a new feature, ideally it would be documented, come with an addition to NEWS.md, and have a test or two. This project has a standard Code of Conduct.

License

The MIT License (MIT)

Copyright (c) 2015-2019 boxr contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

📦 A high-level R interface for the box.com API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16

Languages