if(exists("GoogleDocsPassword")) {
# getGoogleDocsConnection("my login", "my password")
cat("Getting documents\n")
con = getGoogleDocsConnection(names(GoogleDocsPassword), GoogleDocsPassword)
getDocs(con) # list of GoogleDocuments
getDocs(con, TRUE) # a data frame
## Not run:
# con = getGoogleDocsConnection("me", "password", service = "wise")
# getDocs(con) # just the spreadsheets
# ## End(Not run)
# Get just the word processing documents, i.e. not the spreadsheets,
d = getDocs(con, what = "https://docs.google.com/feeds/documents/private/full/-/document")
# The above should be slightly faster than doing the subsetting in R.
d = getDocs(con)
d[sapply(d, is, "GoogleDocument")]
spreadsheetsDocs = getDocs(con, what = "https://docs.google.com/feeds/documents/private/full/-/spreadsheet")
# Get the starred spreadsheets
starredSheets = getDocs(con, what = "https://docs.google.com/feeds/documents/private/full/-/spreadsheet/starred")
# documents within the directory named MyDir
o = getDocs(con, what = "https://docs.google.com/feeds/documents/private/full/-/MyDir")
}
Run the code above in your browser using DataLab