ropensci / rnoaa

R interface to many NOAA data APIs
https://docs.ropensci.org/rnoaa
Other
328 stars 85 forks source link

homr qid search fails #404

Closed djhocking closed 2 years ago

djhocking commented 2 years ago

@sckott - I was running tests before releasing the cache fix #403 to cran. Unfortunately, the homr function doesn't seem to be working when searching by qid. I'm not sure if this is a slight change with the API to search by qid or if it's not allowed at all any more. For example, none of these work:

homr(qid = 'COOP:046742')
homr(qid = ':046742')
homr(qidMod='starts', qid='COOP:0467')

which then causes test-homr.R to fail. Other arguments to search homr work fine.

I'm not familiar with HOMR yet and am fairly new to a number of these methods of using APIs. If you have time to take a look that would be great but let me know how to proceed if there's not a suitable solution in time for the #403 CRAN release.

sckott commented 2 years ago

Sorry about that. I had a look. It was going through some redirects and then leading to non json data somehow.

When i changed the base url to 'https://www.ncei.noaa.gov/access/homr/services/station/' then it seemed to work.

djhocking commented 2 years ago

Perfect, fixed everything. Thanks!