diff --git a/R/getData.R b/R/getData.R index 449b62d..e5d009a 100644 --- a/R/getData.R +++ b/R/getData.R @@ -1,10 +1,3 @@ -options("googleAuthR.scopes.selected" = getOption("searchConsoleR.scope") ) -options("googleAuthR.client_id" = getOption("searchConsoleR.client_id")) -options("googleAuthR.client_secret" = getOption("searchConsoleR.client_secret")) -options("googleAuthR.webapp.client_id" = getOption("searchConsoleR.webapp.client_id")) -options("googleAuthR.webapp.client_secret" = getOption("searchConsoleR.webapp.client_secret")) - - #' Query search traffic keyword data #' #' @description Download your Google SEO data. @@ -45,7 +38,7 @@ options("googleAuthR.webapp.client_secret" = getOption("searchConsoleR.webapp.cl #' \item 'device' #' \item 'page' #' \item 'query' -#' \item 'searchAppearance' +#' \item 'searchAppearance' (can only appear on its own) #' } #' The grouping dimension values are combined to create a unique key #' for each result row. If no dimensions are specified, @@ -150,7 +143,6 @@ search_analytics <- function(siteURL, endDate = Sys.Date() - 3, dimensions = NULL, searchType = c("web","video","image"), - searchAppearance = NULL, dimensionFilterExp = NULL, aggregationType = c("auto","byPage","byProperty"), rowLimit = 1000, @@ -216,8 +208,7 @@ search_analytics <- function(siteURL, # up to the limit you have set if(rowLimit > 5000){ message("Batching data via method: ", walk_data) - message("With rowLimit set to ", rowLimit ," - will need up to [", (rowLimit %/% 5000) + 1, "] API calls") + message("With rowLimit set to ", rowLimit ," will need up to [", (rowLimit %/% 5000) + 1, "] API calls") rowLimit0 <- rowLimit rowLimit <- 5000 } else { diff --git a/README.md b/README.md index 3dd7e1d..39e9cbd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # searchConsoleR -[![CRAN](http://www.r-pkg.org/badges/version/searchConsoleR)](http://cran.r-project.org/package=searchConsoleR) +[![CRAN](http://www.r-pkg.org/badges/version/searchConsoleR)](https://CRAN.R-project.org/package=searchConsoleR) [![Travis-CI Build Status](https://travis-ci.org/MarkEdmondson1234/searchConsoleR.svg?branch=master)](https://travis-ci.org/MarkEdmondson1234/searchConsoleR) R interface with Google Search Console (formally Google Webmaster Tools) API v3. diff --git a/man/search_analytics.Rd b/man/search_analytics.Rd index ee2cab3..f4eca8e 100644 --- a/man/search_analytics.Rd +++ b/man/search_analytics.Rd @@ -6,9 +6,9 @@ \usage{ search_analytics(siteURL, startDate = Sys.Date() - 93, endDate = Sys.Date() - 3, dimensions = NULL, searchType = c("web", "video", "image"), - searchAppearance = NULL, dimensionFilterExp = NULL, - aggregationType = c("auto", "byPage", "byProperty"), rowLimit = 1000, - prettyNames = TRUE, walk_data = c("byBatch", "byDate", "none")) + dimensionFilterExp = NULL, aggregationType = c("auto", "byPage", + "byProperty"), rowLimit = 1000, prettyNames = TRUE, + walk_data = c("byBatch", "byDate", "none")) } \arguments{ \item{siteURL}{The URL of the website you have auth access to.} @@ -56,7 +56,7 @@ Download your Google SEO data. \item 'device' \item 'page' \item 'query' - \item 'searchAppearance' + \item 'searchAppearance' (can only appear on its own) } The grouping dimension values are combined to create a unique key for each result row. If no dimensions are specified, diff --git a/tests/testthat/test-searchConsoleR.R b/tests/testthat/test-searchConsoleR.R index c85c11d..279bced 100644 --- a/tests/testthat/test-searchConsoleR.R +++ b/tests/testthat/test-searchConsoleR.R @@ -46,10 +46,9 @@ test_that("Can get search analytics data lots of dims with batching", { test_that("Can get search analytics data lots of dims with date", { skip_on_cran() - sa2 <- search_analytics(my_example, + sa2 <- search_analytics(my_example, startDate = Sys.Date() - 10, dimensions = c("date","device", "country" ,"query","page"), - walk_data = "byDate", - rowLimit = 9999) + walk_data = "byDate") expect_s3_class(sa2, "data.frame")