Add getters/counters for new API endpoints #68
Merged
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.
What
This PR adds
vb_get_*()andvb_count_*()wrapper functions for the following new endpoints:GET /taxon-importancesGET /stem-countsGET /strataGET /named-placesGET /rolesGET /user-datasets... and also enables the use of cross-resource queries for plot observations associated with a given named place or user dataset, e.g.
vb_get_plot_observations("ds.199635")to get all plot observations associated with datasetds.199635.Why
So that package users can conveniently leverage these new API features.
How
For each of the 6 new resource types:
vb_get_*()wrappervb_count_*()wrapperTesting and documentation
roxygen-based documentation for all new functions, and generated man filesvb_get_*()andvb_count_*()functionscheckpasses:devtools::check(cran=TRUE, remote = TRUE, incoming = TRUE)Demo
Taxon importances
Stem counts
Strata
Named places
Plot observations for a given named place
Roles
User datasets
Plot observations for a given user dataset