POST /
GET /envdata/getEnvironmentData
GET /envdata/RefreshGauges
These should be something like:
POST /readings
GET /readings
GET /readings/latest
This can initially be accomplished with Go's net/http package, but I'd suggest we try out Gorilla's pat http mux, especially since we'll be adding device IDs to the URL to distinguish where each reading came from. That'd look something like this:
POST /devices/{id}/readings
GET /devices/{id}/readings
GET /devices/{id}/readings/latest
Currently the three endpoints are:
These should be something like:
This can initially be accomplished with Go's
net/http
package, but I'd suggest we try out Gorilla's pat http mux, especially since we'll be adding device IDs to the URL to distinguish where each reading came from. That'd look something like this: