0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-06-16 09:51:22 +02:00
Doodle3D-API/src/api/info.js
2017-11-30 17:23:13 +01:00

20 lines
475 B
JavaScript

import { parseFetch } from '../utils.js';
export default class Info {
constructor(api) {
this.api = api;
}
get() {
return fetch(`${this.api}info`, { method: 'GET' }).then(parseFetch);
}
status() {
return fetch(`${this.api}info/status`, { method: 'GET' }).then(parseFetch);
}
downloadLogFiles() {
window.location = `${this.api}info/logfiles`;
}
acces() {
return fetch(`${this.api}info/access`, { method: 'GET' }).then(parseFetch);
}
}