diff --git a/R/query.R b/R/query.R index 24efd6b..8a3eee8 100644 --- a/R/query.R +++ b/R/query.R @@ -54,11 +54,13 @@ bqr_query <- function(projectId = bqr_get_global_project(), body <- rmNullObs(body) - q <- googleAuthR::gar_api_generator("https://www.googleapis.com/bigquery/v2", + # solve 404? + the_url <- sprintf("https://www.googleapis.com/bigquery/v2/projects/%s/queries", projectId) + + q <- googleAuthR::gar_api_generator(the_url, "POST", - path_args = list(projects = projectId, - queries = ""), - data_parse_function = parse_bqr_query) + data_parse_function = parse_bqr_query, + checkTrailingSlash = FALSE) data <- try(q(the_body = body, path_arguments = list(projects = projectId))) diff --git a/man/bqr_auth.Rd b/man/bqr_auth.Rd index c1aaebb..abd042d 100644 --- a/man/bqr_auth.Rd +++ b/man/bqr_auth.Rd @@ -15,8 +15,7 @@ bqr_auth(token = NULL, new_user = FALSE, no_auto = FALSE) If you have set the environment variable \code{BQ_AUTH_FILE} to a valid file location, the function will look there for authentication details. -Otherwise it will look in the working directory for the `.httr-oauth` file, which if not present - will trigger an authentication flow via Google login screen in your browser. +Otherwise it will look in the working directory for the `bq.oauth` file, which if not present will trigger an authentication flow via Google login screen in your browser. If \code{BQ_AUTH_FILE} is specified, then \code{bqr_auth()} will be called upon loading the package via \code{library(bigQueryR)},