Closed waynehartman closed 10 years ago
Sounds good.
In keeping with trying to be more human-readable, what if our second instance of level is "recent"?
i.e.
{
"level" : {
"recent" : 633.0,
"average" : 635.0,
"lastUpdated" : "2014-07-12T20:00:00+00:00"
},
"stageLevel" : 2
}
Perfect
Implemented in opensatx/sawaterlevel-api#5
I was doing some research on the business rules on scheduling reminders when I noticed that the current Edwards Aquifer 'stage level' didn't correspond to the current SAWS stage level. I did some additional research and found out that this happens frequently because when the Edwards stage level gets to a certain level, SAWS has to tapper off on the water that it pumps out. This means that because SAWS is pumping less, it's stage trigger doesn't necessarily have to correspond to that of the Edwards.
What this means: The server API is going to have to tell me what the current stage level is for SAWS. There's a bar at the top of the SAWS site from which the value can be scraped: http://saws.org/
I'd like to see the API enhanced to add a
stageLevel
property to thelevel
API. Also, I think that thetimestamp
attribute could be more descriptively named (totally my fault) to something likelastUpdated
. (I'm a programmer, not a poet.) The entire payload would look like this:The stage level is an integer enumerated value with the following domain:
No Restrictions=
0
Stage 1=1
Stage 2=2
Stage 3=3
Stage 4=4
Stage 5=5