This is more for interactive use.
library(googlesheets)
library(xml2)
library(xmlview)
if (!interactive()) {
gs_auth(file.path("..", "tests", "testthat", "googlesheets_token.rds"))
}
## Auto-refreshing stale OAuth token.
key <- "1oLRq_aSy5A6uh60-Hk3EZ3bcu-rGJBx_H7VuXRxn2FQ"
ss <- gs_key(key)
## Authorization will be used.
## Sheet successfully identified: "12"
ws <- 1
gs_read(ss)
## Accessing worksheet titled "Sheet1"
## No encoding supplied: defaulting to UTF-8.
## Source: local data frame [2 x 1]
##
## foo
## (chr)
## 1 hello
## 2 world
this_ws <- googlesheets:::gs_ws(ss, ws, verbose = FALSE)
req <- httr::GET(this_ws$listfeed, googlesheets:::get_google_token())
rc <- googlesheets:::content_as_xml_UTF8(req)
xml_view(rc)
{"x":{"xmlDoc":"\nAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.