ropensci / traits

R package for accessing species trait data from multiple databases
Other
39 stars 14 forks source link

add alias API version beta == v1 #114

Closed dlebauer closed 5 years ago

dlebauer commented 5 years ago

Description

In the last release I forgot to merge in this minor change.

We've created an v1 that will eventually replace our /beta endpoint. We currently maintain both for backward compatibility, but have started using v1 in our tutorials and documentation that were based on the terraref/traits fork. It would be nice to be able to write code that uses the v1 end point instead of the beta endpoint.

Would it be possible to push this to CRAN as a v0.4.1 'hotfix' so that our current tutorials will work with the official version on cran?

Example

This should work:

options(
        betydb_url = "https://terraref.ncsa.illinois.edu/bety/",
        betydb_api_version = 'v1')
canopy_height <- betydb_search(trait     = "canopy_height",
                               sitename  = "~Season 6",
                               limit     = "1"
                               )
dlebauer commented 5 years ago

(failing tests are from traitbank and shouldn't be affected by this PR)

dlebauer commented 5 years ago

@kimberlyh66 could you please check that this fixes the issues you were having?

kimberlyh66 commented 5 years ago

@dlebauer yes, this fixes the problem that I was having

kimberlyh66 commented 5 years ago

v1 now works, but need API key

sckott commented 5 years ago

@dlebauer is this ready to look at?

dlebauer commented 5 years ago

yes this is ready to push out to CRAN!