client side data models

This commit is contained in:
Eric Hulburd
2016-02-09 19:17:05 -06:00
parent a334afbc01
commit b14c266de3
12 changed files with 298 additions and 1 deletions

22
client/api/energy_data.js Normal file
View File

@@ -0,0 +1,22 @@
const ENDPOINT = '/data/v1/energy';
import extend from 'extend';
class EnergyDataApi {
static index(params){
params = extend({
}, params);
return jQuery.ajax({
url: `${ENDPOINT}`,
type: 'GET',
params: params,
dataType: 'json'
}).success((res)=>{
return res.data;
});
}
}
export default EnergyDataApi;

0
client/api/houses.js Normal file
View File

1
client/api/power_data.js Normal file
View File

@@ -0,0 +1 @@