properties_list <- get_ga_properties(account_id = 209776907)
"updateTime", "displayName", "timeZone", "currencyCode", "serviceLevel",
property_id <- gsub("properties/", "", properties_list$name[1])
property_metadata <- get_ga_metadata(property_id = property_id)
metrics <- get_ga_stats(property_id, stats_type = "metrics")
expect_named(metrics, c("website", "activeUsers", "newUsers", "totalUsers",
dimensions <- get_ga_stats(property_id, stats_type = "dimensions")
expect_named(dimensions, c("day", "month", "year", "country", "fullPageUrl"))
test_that("Google Analytics: All Stats", {
stats_list <- get_all_ga_metrics(account_id = 209776907)

Error in `request_ga(token = token, url = "https://analyticsadmin.googleapis.com/v1alpha/properties", 
    query = list(filter = paste0("parent:accounts/", account_id)), 
    request_type = "GET")`: API request failed:{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "CREDENTIALS_MISSING",
        "domain": "googleapis.com",
        "metadata": {
          "method": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListProperties",
          "service": "analyticsadmin.googleapis.com"
        }
      }
    ]
  }
}

<http_401/http_400/http_error/error/condition>
Error in `request_google_forms(url = form_info_url, token = token)`: Unauthorized (HTTP 401).

test_that("Google Forms: Get multiple forms", {
multiple_forms <- get_multiple_forms(form_ids = form_ids)

# Don't provide a googlesheet -- this should fail if we arent running this interactively.
datasheet <- try(write_to_gsheet(input = forms_df), silent = TRUE)
# Try to write to a sheet that already has stuff in it without saying overwrite, this should fail
# This should work now that we said to overwrite it
expect_s3_class(datasheet, c("sheets_id", "drive_id", "vctrs_vctr", "character"))
# Let's figure out how many sheets we have