https://github.com/1beb/rgoogledrive
Access to Google Drive files through the V2 API from within R.
https://github.com/1beb/rgoogledrive
Last synced: 11 months ago
JSON representation
Access to Google Drive files through the V2 API from within R.
- Host: GitHub
- URL: https://github.com/1beb/rgoogledrive
- Owner: 1beb
- Created: 2013-12-06T15:17:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-11T16:51:53.000Z (over 11 years ago)
- Last Synced: 2024-10-28T10:41:45.998Z (over 1 year ago)
- Language: R
- Size: 131 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RGoogleDrive
This R package is largely a wrapper for Hadley Wickham's
[httr](https://github.com/hadley/httr), built with the
specific intention of providing access to the
[Google Drive SDK](https://developers.google.com/drive/v2/reference/)
from within R.
Google's updated API relies on OAuth 2.0 making it
impossible to use simple authentication past the
deprecation date of the first API (Scheduled for April
2015). This means that you must register your own app,
with it's own secret key.
1. Go to [Google's API Console](https://cloud.google.com/console#/project)
2. Turn on the Google Drive SDK for that project and save the app url, and secret key
The following options will need to be set before you can proceed to authentication:
```
options(drive.app ="107...5.apps.googleusercontent.com")
options(drive.secret = "YOUR_SECRET")
```
## Installation
```
library(devtools)
install_github("RGoogleDrive","1beb") # install
```
## Basic Usage
First, authenticate:
```
library(RGoogleDrive)
drive.auth()
```
Then, search for the file that you're interested in accessing by title, the library will provide you with guidance if more than one document is returned in your search:
```
drive.list("My Document")
```
Once you know the exact title of the document you wish to download, you can specify the name and format of the content you wish to receive, for example:
```
drive.file("My Document",download.type="txt") # Returns flat text
drive.file("My Spreadsheet",download.type="csv") # Returns a data.frame
drive.file("My Document",download.type="html") # Returns GDocs HTML
```
## Contributers
* https://github.com/noamross