MarkEdmondson1234 / searchConsoleR

R interface with Google Search Console API v3, including Search Analytics.
http://code.markedmondson.me/searchConsoleR/
Other
114 stars 41 forks source link

Namespace error: Authentication #55

Closed ThomasPepperz closed 5 years ago

ThomasPepperz commented 5 years ago

What goes wrong

when invoking the search_analytics function, I receive the following error: "Error: 'Authentication' is not an exported object from 'namespace:googleAuthR'"

Steps to reproduce the problem

It's been a month or two, but my code has always worked previously before.

# List available websites in Search Console
sc_websites =
  list_websites()

# Print available websites
sc_websites

# Subset and assign the correct domain site URL
domain = 
  sc_websites[14,]$siteUrl

# Check that the proper domain is stored
domain

# Specify "startDate" and "endDate"
startDate =
  Sys.Date()-5
# To pull one day's worth of data, set startDate to equal endDate
endDate = 
  Sys.Date()-3

# First Query
query.1 =
searchConsoleR::search_analytics(
    siteURL =
      domain,
    searchType = 
      c("web"),
    start =
      startDate,
    end =
      endDate,
    dimensions = 
      c(
        "date",
        "page",
        "query"
        ))

Expected output

Session Info

 sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] searchConsoleR_0.4.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2        rstudioapi_0.10   magrittr_1.5      usethis_1.5.1     devtools_2.1.0    pkgload_1.0.2     R6_2.4.0         
 [8] rlang_0.4.0       httr_1.4.1        tools_3.6.1       pkgbuild_1.0.5    sessioninfo_1.1.1 cli_1.1.0         withr_2.1.2      
[15] googleAuthR_1.0.0 remotes_2.1.0     askpass_1.1       rprojroot_1.3-2   openssl_1.4.1     assertthat_0.2.1  digest_0.6.20    
[22] gargle_0.3.1      crayon_1.3.4      processx_3.4.1    callr_3.3.1       fs_1.3.1          ps_1.3.0          testthat_2.2.1   
[29] curl_4.0          memoise_1.1.0     glue_1.3.1        compiler_3.6.1    backports_1.1.4   desc_1.2.0        prettyunits_1.0.2
[36] jsonlite_1.6     
R> 
ThomasPepperz commented 5 years ago

I updated my 'googleAuthR' package and the issue seems to have been resolved. I also downloaded the development version of searchConsoleR, so that may have had something to do with the resolution.

MarkEdmondson1234 commented 5 years ago

Yes the CRAN updated version for searchConsoleR is pending right now, so this will be sorted by today or tomorrow. In the meantime using the dev version on github will solve the issue.


From: Thomas A. Pepperz notifications@github.com Sent: Friday, September 6, 2019 1:45 AM To: MarkEdmondson1234/searchConsoleR Cc: Subscribed Subject: Re: [MarkEdmondson1234/searchConsoleR] Namespace error: Authentication (#55)

I updated my 'googleAuthR' package and the issue seems to have been resolved. I also downloaded the development version of searchConsoleR, so that may have had something to do with the resolution.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkEdmondson1234/searchConsoleR/issues/55?email_source=notifications&email_token=AAYCPLHXVZ5RAIV7JH4YL7TQIGK2VA5CNFSM4IUDQW22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6BIWWQ#issuecomment-528649050, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAYCPLBSLLMBBGKPIRQF6XTQIGK2VANCNFSM4IUDQW2Q.