Doodle3D-API/src/api/update.js

23 lines
430 B
JavaScript
Raw Normal View History

2016-04-21 15:32:11 +02:00
import * as rest from '../rest.js';
2015-07-15 15:06:18 +02:00
2016-04-21 15:44:20 +02:00
export default class Update {
constructor(api) {
this.api = api;
2015-07-15 15:06:18 +02:00
}
2016-04-21 15:44:20 +02:00
status() {
2016-04-21 15:09:49 +02:00
return rest.get(`${ this.api }update/status`);
2015-07-15 15:06:18 +02:00
}
2016-04-21 15:44:20 +02:00
download() {
2015-07-15 15:06:18 +02:00
//not tested
2016-04-21 15:09:49 +02:00
return rest.post(`${ this.api }update/download`, {});
2015-07-15 15:06:18 +02:00
}
2016-04-21 15:44:20 +02:00
install() {
2015-07-15 15:06:18 +02:00
//not tested
2016-04-21 15:09:49 +02:00
return rest.post(`${ this.api }update/install`, {});
2015-07-15 15:06:18 +02:00
}
2016-04-21 15:44:20 +02:00
clear() {
2015-07-15 15:06:18 +02:00
//not tested
2016-04-21 15:09:49 +02:00
return rest.post(`${ this.api }update/clear`, {});
2015-07-15 15:06:18 +02:00
}
}