brianfoshee / aquaponics-data

0 stars 0 forks source link

Update routes to be RESTful #1

Closed brianfoshee closed 9 years ago

brianfoshee commented 9 years ago

Currently the three endpoints are:

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
brianfoshee commented 9 years ago
GET /readings?num=10
brianfoshee commented 9 years ago
git remote add heroku git@heroku.com:gowebz.git