Doodle3D-API/src/sketchapi.js

25 lines
383 B
JavaScript
Raw Normal View History

import * as rest from './restapi.js';
2015-07-15 15:06:18 +02:00
export default class {
constructor (api) {
this.api = api;
2015-07-15 15:06:18 +02:00
}
getSketch (id) {
return rest.get(this.api + 'sketch/?id=' + id);
2015-07-15 15:06:18 +02:00
}
set (data = '') {
return rest.post(this.api + 'sketch', {
data
});
2015-07-15 15:06:18 +02:00
}
status () {
return rest.get(this.api + 'sketch/status');
2015-07-15 15:06:18 +02:00
}
clear () {
return rest.post(this.api + 'sketch/clear');
2015-07-15 15:06:18 +02:00
}
}