communitysnowobs / cso-api

0 stars 2 forks source link

change the list of variables to be acquired from the Mountain Hub API #10

Closed aaarendt closed 4 years ago

aaarendt commented 4 years ago

Mountain Hub changed their API fields. This PR updates our scripts to match what is in the API. It also request some new fields, like comments.

I don't know if just updating this file will fix the issue of the database not being updated? @jonahjoughin please confirm.

emiliom commented 4 years ago

I've been examining the current response from the MountainHub API. Just wanted to comment here that, as far as I can tell, record.observation.location[1] is still providing latitude, so it should still work. record.location.coordinates[1] is another source of latitude, and there's a third one still: record.observation.place.location.coordinates[1]. But since I haven't seen any documentation for their API, I don't know what the differences are between those three. One interesting difference is that record.location.coordinates and record.observation.place.location follow the GeoJSON convention while record.observation.location doesn't; so, I'd guess the first two are more recent additions that are more responsive to geospatial standards.

Still, my main point is this: if the web app's access to the MountainHub API is currently broken or not performing as expected, replacing record.observation.location with record.location.coordinates will probably not make a difference -- though an edge case comes to mind where I speculate record.location.coordinates might be more robust.