The API consists of 3 methods.
- POST Reading: stores temperature, humidity and battery charge from a particular thermostat.
- GET Reading: returns the thermostat data using the reading_id obtained from POST Reading.
- GET Stats: gives the average, minimum and maximum by temperature, humidity and battery_charge in a particular thermostat across all the period of time.
$ cd $PROJ_DIR
$ cp config/database.example.yml config/database.yml
$ cp env.example .env
$ bundle install
$ rails db:setup
$ rails s
$ redis-server
$ sidekiq
$ rspec