0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-14 06:47:55 +01:00
doodle3d-client/js/api/SketchAPI.js

21 lines
571 B
JavaScript
Raw Normal View History

/*
* This file is part of the Doodle3D project (http://doodle3d.com).
*
* Copyright (c) 2013, Doodle3D
* This software is licensed under the terms of the GNU GPL v2 or later.
* See file LICENSE.txt or visit http://www.gnu.org/licenses/gpl.html for full license details.
*/
function SketchAPI() {
2015-05-01 19:12:05 +02:00
var className = 'SketchAPI';
this.load = function(id,success,fail) {
API.get('sketch/?id='+id,success,fail);
}
2015-04-28 12:47:44 +02:00
this.save = function(data,success,fail) {
2015-05-01 19:12:05 +02:00
console.log(className,'saving sketch',data);
2015-04-28 12:47:44 +02:00
API.post('sketch',{data:data},success,fail);
}
}