Doodle3D-API/src/updateapi.js

30 lines
521 B
JavaScript
Raw Normal View History

2015-07-23 16:12:11 +02:00
import rest from './restapi.js';
2015-07-15 15:06:18 +02:00
export default class {
constructor (localIP) {
this.localIP = localIP;
this.api = `http://${localIP}/d3dapi/`;
}
status (callback) {
rest.get(this.api + 'update/status', callback);
}
download (callback) {
//not tested
rest.post(this.api + 'update/download', {}, callback);
}
install (callback) {
//not tested
rest.post(this.api + 'update/install', {}, callback);
}
clear (callback) {
//not tested
rest.post(this.api + 'update/clear', {}, callback);
}
}