Doodle3D-API/src/api/sketch.js

20 lines
405 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 Sketch {
2016-04-21 15:52:23 +02:00
constructor(api) {
this.api = api;
}
getSketch(id) {
return rest.get(`${ this.api }sketch/?id=${ id }`);
}
set(data = '') {
return rest.post(`${ this.api }sketch`, { data });
}
status() {
return rest.get(`${ this.api }sketch/status`);
}
clear() {
return rest.post(`${ this.api }sketch/clear`);
}
}