Open srearl opened 4 years ago
Thanks for this suggestion @srearl! I agree that DOIs and URLs may be more common to users but I'm a little wary of adding (and maintaining) support for DOI and URL inputs to this function because:
1.) It creates a precedent for extending support to all other API functions 2.) URLs (if you mean data package URLs) these may change and break workflows 3.) Package ID is conspicuously listed on the data package landing page
Can you tell me more about your use case and why package IDs may be challenging for users?
Hi Colin,
Agreed @srearl, manually parsing that list would be onerous. I'm moving this into the queue with the caveat that it should be implemented for all EDI API functions in this package.
The least intrusive implementation here might be a mapping function that takes one of:
and returns the other two IDs, which can be passed to downstream functions.
api_get_provenance_metadata
is a fantastic resource but I ran into a case where I needed to access provenance information but had the doi and/or url of the dataset rather than the project identifier (e.g., knb-lter-xxx.x.x). Below is an R-based MRE using a dataset from BNZ that I used to address this task but it seems that the utility ofapi_get_provenance_metadata
would be increased if it would natively accept a dataset doi or url in addition to the project ### identifier.MRE (in R):