leoherzog / cwop.rest

⚡ An easy way to submit weather reports to the NOAA Citizen's Weather Observer Program
https://cwop.rest/
9 stars 1 forks source link

parameter `baromin` should be named differently #2

Closed legoadk closed 2 months ago

legoadk commented 3 months ago

baromin implies "barometer measured in inHg". It's supposed to be posted to CWOP in mbar/hPa, and in fact the documentation does indicate this properly. Therefore, I make the claim that the parameter name baromin is incorrect and should instead be something akin to baromhpa, barommb, or barommbar - purely in the interest of reducing confusion for anyone wanting to write software that posts to this service.

leoherzog commented 3 months ago

This is such a great suggestion. I'm embarassed to say that I've read that param (when used with other weather APIs) as baro-min, like, minimum number that the barometer is at or something... not barom-in :sweat_smile:

I will add that change in the next couple of days!

legoadk commented 3 months ago

I do see some other people using cwop.rest in the CWOP data; be careful to ensure backwards-compatibility. I'm guessing those that have used it probably don't expect it to change :)

leoherzog commented 2 months ago

Added pressure parameter to the existing baromin parameter. Both will continue to work for the foreseeable future. If both are supplied, then pressure wins. I'll maybe consider adding a deprecation notice sometime in the future, but it takes two lines of code to support the new parameters, so I'm not in a hurry :)

Thanks again for bringing this to my attention!