tests/testthat/test-gs4_endpoints.R

test_that("endpoints can be retrieved en masse", {
  endpoints <- gs4_endpoints()
  expect_true(length(endpoints) >= 14)
  expect_match(names(endpoints), "^sheets\\.spreadsheets\\.")
})

test_that("a single endpoint can be retrieved", {
  nm <- "sheets.spreadsheets.values.batchClear"
  endpoint <- gs4_endpoints(nm)[[1]]
  expect_true(
    all(c("id", "path", "parameters", "scopes") %in% names(endpoint))
  )
})

Try the googlesheets4 package in your browser

Any scripts or data that you put into this service are public.

googlesheets4 documentation built on July 9, 2023, 7:40 p.m.