New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow responses to be written directly to disk #77
Conversation
- Add `destfile=NULL` and `overwrite=FALSE` args - Use httr::write_disk() when destfile provided - Make print function path-friendly - Document - Add tests - Update to disk
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
===========================================
- Coverage 63.57% 52.53% -11.05%
===========================================
Files 8 8
Lines 302 316 +14
===========================================
- Hits 192 166 -26
- Misses 110 150 +40
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks great! Can you please change the argument names? Thanks again!
R/package.R
Outdated
gh <- function(endpoint, ..., .token = NULL, | ||
.api_url = NULL, .method = "GET", | ||
gh <- function(endpoint, ..., .token = NULL, destfile = NULL, | ||
overwrite = FALSE, .api_url = NULL, .method = "GET", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument names have to start with dots, to avoid conflicts with the GH API's parameters.
Done. Also fixed overwriting, which wasn't being carried through properly. |
Great, thanks! |
destfile=NULL
andoverwrite=FALSE
args