mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-06-03 06:04:31 +02:00
38 lines
592 B
JavaScript
38 lines
592 B
JavaScript
import rest from 'src/restapi';
|
|
|
|
export default class {
|
|
constructor (localIP) {
|
|
this.localIP = localIP;
|
|
this.api = `http://${localIP}/d3dapi/`;
|
|
}
|
|
|
|
status (callback) {
|
|
rest.get(this.api + 'update/status', callback);
|
|
|
|
return this;
|
|
}
|
|
|
|
download (callback) {
|
|
//not tested
|
|
|
|
rest.post(this.api + 'update/download', {}, callback);
|
|
|
|
return this;
|
|
}
|
|
|
|
install (callback) {
|
|
//not tested
|
|
|
|
rest.post(this.api + 'update/install', {}, callback);
|
|
|
|
return this;
|
|
}
|
|
|
|
clear (callback) {
|
|
//not tested
|
|
|
|
rest.post(this.api + 'update/clear', {}, callback);
|
|
|
|
return this;
|
|
}
|
|
} |