You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A different approach would be to make it easier to construct native API queries from scratch using the client so that we don't have to code everything but it's more readily accessible. I don't know how hard that would be, but when I wrote API functionality (for downloading .zip files) locally it required quite a bit of code duplication from dataverse library.
We encountered something similar in REDCapR. It's a similar package as this one --in the sense that it's basically a glove around curl calls to a server's api. Then it adds to convenience functions and validation to make R development easier because it returns R's native data.frame objects.
@adam3smith, @kuriwaki, or anyone else, please share your impressions if you'd like. It looks like @skasberger and the pyDataverse do something very similar with their get_request()
The text was updated successfully, but these errors were encountered:
I like the idea a lot -- it would both simplify coding in the package but also make it much easier to use functionality unsupported by the client (my linked use case).
Two comments on the above:
I'm not sure about kernel -- not sure that's a very intuitive label in this case. How about mirroring pyDataverse and doing get_request() and post_request()
The last bit is my second part. Having this separately available for POST and GET would be very desirable imo
Anything that functionalizes all that paste duplication would be great for me! I agree that kernel is an uninformative name for my background. What @adam3smith suggests sounds better, or at least I'd like to know the definition of kernel in this context.
@adam3smith wrote in #49 (comment)
We encountered something similar in REDCapR. It's a similar package as this one --in the sense that it's basically a glove around curl calls to a server's api. Then it adds to convenience functions and validation to make R development easier because it returns R's native
data.frame
objects.When we saw all the duplication in REDCapR, we refactored that core functionality into
kernel_api()
. That central location makes it easier to improve things consistently like character encoding and error handling. It returns raw result to the calling function, which decides whether to save it as a local file, or return a data.frame.In
dataverse::get_file()
, I see the replication @adam3smith's talking about, with three instances similar toThis could become its own function like
The code inside
dataverse::get_file_metadata()
would look likeThe code inside the current
dataverse::get_file()
would have three different calls:@adam3smith, @kuriwaki, or anyone else, please share your impressions if you'd like. It looks like @skasberger and the pyDataverse do something very similar with their
get_request()
The text was updated successfully, but these errors were encountered: