New functions for the PubChem PUG-REST API#239
Merged
stitam merged 16 commits intoropensci:masterfrom May 15, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 19 19
Lines 1724 1786 +62
======================================
- Misses 1724 1786 +62
Continue to review full report at Codecov.
|
Contributor
Author
|
The formula in #206 didn't work because the query is sometimes asynchronous and returns a listkey which has to be queried in a subsequent request, similarly to ChemSpider. I restructured |
Aariq
approved these changes
May 14, 2020
| } | ||
| else { | ||
| res <- httr::POST(qurl, user_agent("webchem"), | ||
| handle = handle("")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR is related to issues #206 and #216.
I originally created two new functions.
pc_pugrest()gave a lot of control over the PUG-REST API andpc_validate()validated all inputs topc_pugrest(). The aim was to offer functions for more advanced users to assemble their own requests. However,pc_validatebecame too complex and very difficult to test, and so I decided to just remove both functions. Instead, I created the functionget_sid()for issue #216 and will editget_cid()for issue #206 after @Aariq updated it according to #193 so there is no conflict.PR task list:
devtools::document()