nwfsc-cb / rCAX

rCAX R package: an R client to access the REST API for the StreamNet Coordinated Assessments tables
https://nwfsc-cb.github.io/rCAX/
Other
5 stars 1 forks source link

Populations table also throwing that 'publish' column error #34

Closed eeholmes closed 1 year ago

eeholmes commented 1 year ago

Hi Mari,

The Populations table is also throwing the 'publish' column error. Can you let CAX folks know? table_id F37C744F-E1FC-46D7-A8DB-0AB6337A4024

Eli

mari-williams commented 1 year ago

Emailed and reminded them that if the API requires publish=TRUE than they need to have that column on all tables (there are data def tables for each of the HLIs available).

mari-williams commented 1 year ago

API code should now exempt 'list' tables from the publish=TRUE rule

eeholmes commented 1 year ago

I tested with

# Populations table
tab = httr::GET("https://api.streamnet.org/api/v1/ca?table_id=F37C744F-E1FC-46D7-A8DB-0AB6337A4024&XApiKey=7A2F1EA9-4882-49E8-B23D-7DC202C2ACA5&$select=id")
data = jsonlite::fromJSON(rawToChar((tab$content)))

and it now works so closing.