{"size": 336, "ext": "js", "max_stars_repo_path": "client/src/api/index.js", "max_stars_repo_name": "kovipu/IOT-kalja", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/api/index.js", "max_issues_repo_name": "kovipu/IOT-kalja", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/api/index.js", "max_forks_repo_name": "kovipu/IOT-kalja", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.6842105263, "max_line_length": 50, "alphanum_fraction": 0.6369047619}
import axios from 'axios';

export function getTemp() {
  return axios.get('/states/')
}

export function reset(id) {
  return axios.post('/reset/', id, {
    headers: { 'Content-Type': 'text/plain' }
  });
}

export function setTarget(id, targetTemperature) {
  return axios.post('/targets/', [{
    id,
    targetTemperature
  }]);
}
