Closed hrbrmstr closed 5 years ago
testthat
infra instantiated and three light checks run. I'll try to find a list of consistently "bad" or "known proxy" IPs (part of what I do at work anyway) and get them into more extended tests.
Sounds good. And if you could add them to the repo in a “tests” folder that’d be great
Never mind ^^. I didn’t check before commenting. All looks great. Thanks for the contribution! We will push the new version to CRAN shortly.
Greetings!
I've added discrete API endpoints for the three services you use so others can use this as a general purpose utility package as well as for the task-specific functionality already provided.
Each endpoint is tied to an environment variable for the secret info (API key or contact info) as encouraging users to hard-code that info into a script is fairly dangerous and not a best practice. This is documented in each function. There are examples for the three discrete API callers but they're wrapped in
\donrun{}
blocks since they make live API calls and require API keys.The
NAMESPACE
file is now auto-generated via {roxygen2} and there is new package-level documentation generated viarIP-package.R
which also manages discreteImports
. Given the specification of core package dependencies in theDESCRIPTION
file and now automatically in theNAMESPACE
file, you really don't need to userequireNamespace(…)
calls anymore. I didn't want to modify your core function.I bumped up the version a full minor point (lots of big but not major changes), added myself to the
DESCRIPTION
and also addedURL
andBugReports
fields.NOTE
aaa.R
now contains an on-load computed package global.RIP_UA
which is anhttr
user_agent
object. It's considered best practice to use an identifiable user agent when making API calls so the service provider can track usage and also follow up with any issues they see. It's usable with your core function but I (again) didn't want to touch that bit of code.I can tweak any component of this PR to fit any desired style guide or operational requirements.