mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-11-16 00:37:55 +01:00
added DoodleBox Manager
Where plausible used parameter as arguments (https://github.com/Doodle3D/Doodle3D-API/issues/2) added doodle box manager for a cleaner structure (https://github.com/Doodle3D/Doodle3D-API/issues/9)
This commit is contained in:
parent
6af01a0f27
commit
f3cadff7d5
28
README.md
28
README.md
@ -2,18 +2,26 @@
|
|||||||
Doodle3D API for communication with the Doodle3D WiFi-Box
|
Doodle3D API for communication with the Doodle3D WiFi-Box
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import Doodle3DAPI from 'doodle3dapi';
|
import Doodle3DManager from 'src/doodle3dmanager.js';
|
||||||
|
|
||||||
var localIP = "192.168.5.1";
|
var doodle3DManager = new Doodle3DManager();
|
||||||
var doodle3DAPI = new Doodle3DAPI(localIP);
|
|
||||||
doodle3DAPI.onconnect = function () {
|
|
||||||
|
|
||||||
};
|
doodle3DManager.addEventListener('boxappeared', (event) => {
|
||||||
doodle3DAPI.ondisconnect = function () {
|
var box = event.box;
|
||||||
|
|
||||||
};
|
box.addEventListener('connect', (event) => {
|
||||||
doodle3DAPI.onupdate = function (data) {
|
});
|
||||||
|
|
||||||
|
box.addEventListener('disconnect', (event) => {
|
||||||
|
});
|
||||||
|
|
||||||
|
box.addEventListener('update', (event) => {
|
||||||
|
var status = event.state;
|
||||||
|
});
|
||||||
|
|
||||||
|
box.setAutoUpdate(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
doodle3DManager.setAutoUpdate(true);
|
||||||
|
|
||||||
};
|
|
||||||
doodle3DAPI.startUpdateLoop();
|
|
||||||
```
|
```
|
||||||
|
@ -17,6 +17,7 @@ System.config({
|
|||||||
"map": {
|
"map": {
|
||||||
"babel": "npm:babel-core@5.7.4",
|
"babel": "npm:babel-core@5.7.4",
|
||||||
"babel-runtime": "npm:babel-runtime@5.7.0",
|
"babel-runtime": "npm:babel-runtime@5.7.0",
|
||||||
|
"casperlamboo/EventDispatcher": "github:casperlamboo/EventDispatcher@master",
|
||||||
"core-js": "npm:core-js@0.9.18",
|
"core-js": "npm:core-js@0.9.18",
|
||||||
"github/fetch": "github:github/fetch@0.9.0",
|
"github/fetch": "github:github/fetch@0.9.0",
|
||||||
"traceur": "github:jmcriffey/bower-traceur@0.0.90",
|
"traceur": "github:jmcriffey/bower-traceur@0.0.90",
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
import Doodle3DAPI from 'src/index.js';
|
import Doodle3DManager from 'src/doodle3dmanager.js';
|
||||||
import * as rest from 'src/restapi.js';
|
|
||||||
|
|
||||||
var api = 'http://connect.doodle3d.com/api/';
|
var doodle3DManager = new Doodle3DManager();
|
||||||
|
|
||||||
var addBox = (function () {
|
doodle3DManager.addEventListener('boxappeared', (event) => {
|
||||||
var known = [];
|
var box = event.box;
|
||||||
|
|
||||||
return function (boxData) {
|
|
||||||
if (known.indexOf(boxData.localip) === -1) {
|
|
||||||
known.push(boxData.localip);
|
|
||||||
|
|
||||||
var row = document.createElement('tr');
|
var row = document.createElement('tr');
|
||||||
row.style.color = 'gray';
|
row.style.color = 'gray';
|
||||||
@ -37,30 +32,33 @@ var addBox = (function () {
|
|||||||
row.appendChild(bedTarget);
|
row.appendChild(bedTarget);
|
||||||
row.appendChild(hasControl);
|
row.appendChild(hasControl);
|
||||||
|
|
||||||
id.innerHTML = boxData.wifiboxid;
|
id.innerHTML = box.boxData.wifiboxid;
|
||||||
localIP.innerHTML = boxData.localip;
|
localIP.innerHTML = box.boxData.localip;
|
||||||
|
|
||||||
document.getElementById('table').appendChild(row);
|
document.getElementById('table').appendChild(row);
|
||||||
|
|
||||||
var doodle3DAPI = new Doodle3DAPI(boxData.localip);
|
box.addEventListener('connect', (event) => {
|
||||||
doodle3DAPI.onconnect = function () {
|
|
||||||
row.style.color = 'black';
|
row.style.color = 'black';
|
||||||
};
|
});
|
||||||
doodle3DAPI.ondisconnect = function () {
|
|
||||||
|
box.addEventListener('disconnect', (event) => {
|
||||||
row.style.color = 'gray';
|
row.style.color = 'gray';
|
||||||
};
|
});
|
||||||
doodle3DAPI.onupdate = function (data) {
|
|
||||||
state.innerHTML = data.state;
|
box.addEventListener('update', (event) => {
|
||||||
if (data.state !== 'disconnected' && data.state !== 'connecting' && data.state !== 'unknown') {
|
var status = event.state;
|
||||||
bed.innerHTML = data.bed;
|
|
||||||
bedTarget.innerHTML = data.bed_target;
|
state.innerHTML = status.state;
|
||||||
bufferedLines.innerHTML = data.buffered_lines;
|
if (status.state !== 'disconnected' && status.state !== 'connecting' && status.state !== 'unknown') {
|
||||||
currentLine.innerHTML = data.current_line;
|
bed.innerHTML = status.bed;
|
||||||
hasControl.innerHTML = data.has_control;
|
bedTarget.innerHTML = status.bed_target;
|
||||||
hotend.innerHTML = data.hotend;
|
bufferedLines.innerHTML = status.buffered_lines;
|
||||||
hotendTarget.innerHTML = data.hotend_target;
|
currentLine.innerHTML = status.current_line;
|
||||||
state.innerHTML = data.state;
|
hasControl.innerHTML = status.has_control;
|
||||||
totalLines.innerHTML = data.total_lines;
|
hotend.innerHTML = status.hotend;
|
||||||
|
hotendTarget.innerHTML = status.hotend_target;
|
||||||
|
state.innerHTML = status.state;
|
||||||
|
totalLines.innerHTML = status.total_lines;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bed.innerHTML = '';
|
bed.innerHTML = '';
|
||||||
@ -73,34 +71,9 @@ var addBox = (function () {
|
|||||||
state.innerHTML = '';
|
state.innerHTML = '';
|
||||||
totalLines.innerHTML = '';
|
totalLines.innerHTML = '';
|
||||||
}
|
}
|
||||||
};
|
|
||||||
doodle3DAPI.startUpdateLoop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
function searchBoxes () {
|
|
||||||
rest.get(api + 'list.php').then((boxes) => {
|
|
||||||
for (var i = 0; i < boxes.length; i ++) {
|
|
||||||
var box = boxes[i];
|
|
||||||
|
|
||||||
addBox(box);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
setInterval(searchBoxes, 5000);
|
|
||||||
searchBoxes();
|
|
||||||
|
|
||||||
/*
|
box.setAutoUpdate(true);
|
||||||
addBox({
|
|
||||||
localip: '127.0.0.1:3000',
|
|
||||||
wifiboxid: 'Node Server'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
doodle3DManager.setAutoUpdate(true);
|
||||||
addBox({
|
|
||||||
localip: '192.168.5.1',
|
|
||||||
wifiboxid: 'Wired Printer'
|
|
||||||
});
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
755849
example/test.gcode
Normal file
755849
example/test.gcode
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
|||||||
"lib": "src"
|
"lib": "src"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"casperlamboo/EventDispatcher": "github:casperlamboo/EventDispatcher@master",
|
||||||
"github/fetch": "github:github/fetch@^0.9.0"
|
"github/fetch": "github:github/fetch@^0.9.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = 'http://' + localIP + '/d3dapi/';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get (keys) {
|
get (keys) {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import EventDispatcher from 'casperlamboo/EventDispatcher';
|
||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
import ConfigAPI from './configapi.js';
|
import ConfigAPI from './configapi.js';
|
||||||
import InfoAPI from './infoapi.js';
|
import InfoAPI from './infoapi.js';
|
||||||
@ -7,20 +8,26 @@ import SketchAPI from './sketchapi.js';
|
|||||||
import SystemAPI from './systemapi.js';
|
import SystemAPI from './systemapi.js';
|
||||||
import UpdateAPI from './updateapi.js';
|
import UpdateAPI from './updateapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class extends EventDispatcher {
|
||||||
constructor (localIP) {
|
constructor (boxData) {
|
||||||
this.config = new ConfigAPI(localIP);
|
super();
|
||||||
this.info = new InfoAPI(localIP);
|
|
||||||
this.network = new NetworkAPI(localIP);
|
this.boxData = boxData;
|
||||||
this.printer = new PrinterAPI(localIP);
|
|
||||||
this.sketch = new SketchAPI(localIP);
|
this.api = `http://${boxData.localip}/d3dapi/`;
|
||||||
this.system = new SystemAPI(localIP);
|
|
||||||
this.update = new UpdateAPI(localIP);
|
this.config = new ConfigAPI(this.api);
|
||||||
|
this.info = new InfoAPI(this.api);
|
||||||
|
this.network = new NetworkAPI(this.api);
|
||||||
|
this.printer = new PrinterAPI(this.api);
|
||||||
|
this.sketch = new SketchAPI(this.api);
|
||||||
|
this.system = new SystemAPI(this.api);
|
||||||
|
this.update = new UpdateAPI(this.api);
|
||||||
|
|
||||||
this.alive = false;
|
this.alive = false;
|
||||||
|
|
||||||
this.batchSize = 512;
|
this.maxBatchSize = 10*1024;
|
||||||
this.maxBufferedLines = 4096;
|
this.maxBufferedLines = 1024*1024;
|
||||||
|
|
||||||
this.state = {};
|
this.state = {};
|
||||||
|
|
||||||
@ -30,14 +37,14 @@ export default class {
|
|||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
startUpdateLoop () {
|
setAutoUpdate (autoUpdate) {
|
||||||
|
|
||||||
this.network.alive().then(() => {
|
this.network.alive().then(() => {
|
||||||
|
|
||||||
this.alive = true;
|
this.alive = true;
|
||||||
if (this.onconnect !== undefined) {
|
|
||||||
this.onconnect();
|
this.dispatchEvent({
|
||||||
}
|
type: 'connect'
|
||||||
|
});
|
||||||
|
|
||||||
if (!this.loaded) {
|
if (!this.loaded) {
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
@ -45,19 +52,17 @@ export default class {
|
|||||||
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
|
|
||||||
if (this.alive) {
|
if (this.alive) {
|
||||||
this.alive = false;
|
this.alive = false;
|
||||||
|
|
||||||
if (this.ondisconnect !== undefined) {
|
this.dispatchEvent({
|
||||||
this.ondisconnect();
|
type: 'disconnect'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
console.warn(error);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.startUpdateLoop();
|
this.setAutoUpdate();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -68,30 +73,27 @@ export default class {
|
|||||||
print (gcode) {
|
print (gcode) {
|
||||||
this._currentBatch = 0;
|
this._currentBatch = 0;
|
||||||
|
|
||||||
gcode = gcode.split('\n');
|
var lastIndex = 0;
|
||||||
|
while (lastIndex !== (gcode.length - 1)) {
|
||||||
|
var index = gcode.lastIndexOf('\n', lastIndex + maxBatchSize);
|
||||||
|
var batch = gcode.substring(lastIndex, index);
|
||||||
|
lastIndex = index;
|
||||||
|
|
||||||
//split gcode in batches
|
this.printBatches.push(batch);
|
||||||
while (gcode.length > 0) {
|
|
||||||
var gcodeBatch = gcode.splice(0, Math.min(this.batchSize, gcode.length));
|
|
||||||
this._printBatches.push(gcodeBatch.join('\n'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
stopPrint (settings) {
|
stopPrint (endCode = '') {
|
||||||
|
|
||||||
this._printBatches = [];
|
this._printBatches = [];
|
||||||
this._currentBatch = 0;
|
this._currentBatch = 0;
|
||||||
|
|
||||||
this.printer.stop({
|
this.printer.stop(endCode).then((data) => {
|
||||||
'gcode': settings.endCode()
|
|
||||||
}).then((data) => {
|
|
||||||
|
|
||||||
console.log('Printer stop command sent');
|
console.log('Printer stop command sent');
|
||||||
}).catch((error) => {
|
|
||||||
|
|
||||||
console.warn(error);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@ -112,31 +114,31 @@ export default class {
|
|||||||
_updateState () {
|
_updateState () {
|
||||||
//que api calls so they don't overload the d3d box
|
//que api calls so they don't overload the d3d box
|
||||||
|
|
||||||
this.info.status().then((data) => {
|
this.info.status().then((state) => {
|
||||||
this.state = data;
|
|
||||||
|
|
||||||
if (this.onupdate !== undefined) {
|
this.state = state;
|
||||||
this.onupdate(data);
|
|
||||||
}
|
this.dispatchEvent({
|
||||||
|
type: 'update',
|
||||||
|
state
|
||||||
|
});
|
||||||
|
|
||||||
this._updateLoop();
|
this._updateLoop();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
||||||
console.warn(error);
|
console.warn(error);
|
||||||
this.startUpdateLoop();
|
this.setAutoUpdate();
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_printBatch () {
|
_printBatch () {
|
||||||
var gcode = this._printBatches.shift();
|
var gcode = this._printBatches.shift();
|
||||||
|
var start = (this._currentBatch === 0) ? true : false;
|
||||||
|
var first = (this._currentBatch === 0) ? true : false;
|
||||||
|
var last = (this._printBatches.length === 0) ? true : false; //only for the node js server
|
||||||
|
|
||||||
this.printer.print({
|
this.printer.print(gcode, start, first, last).then((data) => {
|
||||||
'start': ((this._currentBatch === 0) ? true : false),
|
|
||||||
'first': ((this._currentBatch === 0) ? true : false),
|
|
||||||
'gcode': gcode,
|
|
||||||
'last': ((this._printBatches.length === 0) ? true : false) //only for debug purposes
|
|
||||||
}).then((data) => {
|
|
||||||
|
|
||||||
console.log('batch sent: ' + this._currentBatch, data);
|
console.log('batch sent: ' + this._currentBatch, data);
|
||||||
|
|
||||||
if (this._printBatches.length > 0) {
|
if (this._printBatches.length > 0) {
|
||||||
@ -148,11 +150,11 @@ export default class {
|
|||||||
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
console.warn(error);
|
||||||
|
|
||||||
this._printBatches.unshift(gcode);
|
this._printBatches.unshift(gcode);
|
||||||
|
|
||||||
console.warn(error);
|
this.setAutoUpdate();
|
||||||
this.startUpdateLoop();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
57
src/doodle3dmanager.js
Normal file
57
src/doodle3dmanager.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import * as rest from './restapi.js';
|
||||||
|
import Doodle3DAPI from './doodle3dapi.js';
|
||||||
|
import EventDispatcher from 'casperlamboo/EventDispatcher';
|
||||||
|
|
||||||
|
export default class extends EventDispatcher {
|
||||||
|
constructor () {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.boxes = [];
|
||||||
|
this.api = 'http://connect.doodle3d.com/api/';
|
||||||
|
}
|
||||||
|
|
||||||
|
setAutoUpdate (autoUpdate = true, rate = 5000) {
|
||||||
|
if (autoUpdate) {
|
||||||
|
this._checkNew();
|
||||||
|
|
||||||
|
this.interval = setInterval(() => {
|
||||||
|
this._checkNew();
|
||||||
|
}, rate);
|
||||||
|
}
|
||||||
|
else if (this.interval !== undefined) {
|
||||||
|
clearInterval(this.interval);
|
||||||
|
delete this.interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
addBox (boxData) {
|
||||||
|
var box = new Doodle3DAPI(boxData);
|
||||||
|
|
||||||
|
this.boxes.push(box);
|
||||||
|
|
||||||
|
this.dispatchEvent({
|
||||||
|
type: 'boxappeared',
|
||||||
|
box: box
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_checkNew () {
|
||||||
|
rest.get(this.api + 'list.php').then((boxes) => {
|
||||||
|
var knownIPs = [];
|
||||||
|
for (var i = 0; i < this.boxes.length; i ++) {
|
||||||
|
var boxData = this.boxes[i].boxData;
|
||||||
|
knownIPs.push(boxData.localip);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < boxes.length; i ++) {
|
||||||
|
var boxData = boxes[i];
|
||||||
|
|
||||||
|
if (knownIPs.indexOf(boxData.localip) === -1) {
|
||||||
|
this.addBox(boxData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get () {
|
get () {
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scan () {
|
scan () {
|
||||||
@ -19,9 +18,8 @@ export default class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assosiate (ssid, phrase = null, recreate = false) {
|
assosiate (ssid, phrase = null, recreate = false) {
|
||||||
|
|
||||||
var data = {ssid, recreate};
|
var data = {ssid, recreate};
|
||||||
if (phrase) phrase = phrase;
|
if (phrase) data.phrase = phrase;
|
||||||
|
|
||||||
return rest.post(this.api + 'network/associate', data);
|
return rest.post(this.api + 'network/associate', data);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
temperature () {
|
temperature () {
|
||||||
@ -26,11 +25,14 @@ export default class {
|
|||||||
return rest.post(this.api + 'printer/heatup', {});
|
return rest.post(this.api + 'printer/heatup', {});
|
||||||
}
|
}
|
||||||
|
|
||||||
print (data) {
|
print (gcode = '', first = false, start = false, last = false) {
|
||||||
|
var data = {gcode, first, start}
|
||||||
|
if (last) data.last = last;
|
||||||
|
|
||||||
return rest.post(this.api + 'printer/print', data);
|
return rest.post(this.api + 'printer/print', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
stop (data) {
|
stop (gcode = '') {
|
||||||
return rest.post(this.api + 'printer/stop', data);
|
return rest.post(this.api + 'printer/stop', {gcode});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,18 +1,17 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getSketch (id) {
|
getSketch (id) {
|
||||||
return rest.get(this.api + 'sketch/?id=' + id);
|
return rest.get(this.api + 'sketch/?id=' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
set (data) {
|
set (data = '') {
|
||||||
return rest.post(this.api + 'sketch', {
|
return rest.post(this.api + 'sketch', {
|
||||||
'data': data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
versions () {
|
versions () {
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as rest from './restapi.js';
|
import * as rest from './restapi.js';
|
||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
constructor (localIP) {
|
constructor (api) {
|
||||||
this.localIP = localIP;
|
this.api = api;
|
||||||
this.api = `http://${localIP}/d3dapi/`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status () {
|
status () {
|
||||||
|
Loading…
Reference in New Issue
Block a user