leszek-sieminski / rahrefs Goto Github PK
View Code? Open in Web Editor NEWR package that serves as an interface for interaction with the Ahrefs.com API.
License: Other
R package that serves as an interface for interaction with the Ahrefs.com API.
License: Other
Really useful library thanks, I was just looking through it and saw this:
Lines 113 to 138 in 7132390
...which I think won't perform as you intend. The assertthat
conditions need to be within assert_that()
to trigger errors, so assertthat::is.string(target)
just returns TRUE
or FALSE
rather than an error. Also could list several in one condition.
Also to save writing out assertthat::
all the time, you can use #' @import assertthat
in the boilerplate.
As a suggestion:
#' @import assertthat
..snip..
assert_that(!is.null(target),
!is.na(target),
is.string(target), # this will trigger an error now, doesn't as is
is.string(report),
!is.null(report),
etc...
)
First of all thanks for your help!
I'm trying to connect to ahrefs API using r. I have found your library and it did work to see the available reports and libraries. Now I would like to perform a basic query but I receive different errors:
ERROR 1 (the url and token has been omited)
RAhrefs::rah_backlinks (target = "domain.com/path/path",
token = Sys.getenv("token"),
mode = "exact", metrics = "url_from")
Error: nchar(token) not greater than 30
ERROR 2 (if i delete the token, then i get a different error, it seems is requesting the token)
RAhrefs::rah_backlinks (target = "domain.com/path/path",
mode = "exact", metrics = "url_from")
Error in do.call(rbind.data.frame, data_list$refpages) :
second argument must be a list
Dear Leszek,
When I am trying to run below code chunk using "RAhrefs" package written by you.
Code runs well when the target is any Ahref url but gives internal billing error in output if I change URL to any other URL.
#target <- 'ahrefs.com'
target <- 'andrewgoldner.com'
temp <- rah_domain_rating(target, token = Sys.getenv("AHREFS_AUTH_TOKEN"),
mode = "domain", metrics = NULL, limit = 1000, order_by = NULL,
where = NULL, having = NULL)
Could you please help me with this?
Thanks in Advance,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.