2016-04-21 15:32:11 +02:00
|
|
|
import * as rest from '../rest.js';
|
2015-07-15 15:06:18 +02:00
|
|
|
|
|
|
|
export default class {
|
2015-07-24 13:15:00 +02:00
|
|
|
constructor (api) {
|
|
|
|
this.api = api;
|
2015-07-15 15:06:18 +02:00
|
|
|
}
|
|
|
|
|
2015-10-12 12:33:33 +02:00
|
|
|
get (...keys) {
|
2016-04-21 15:09:49 +02:00
|
|
|
return rest.get(`${ this.api }config/?${ keys.join('=&') }=`);
|
2015-07-15 15:06:18 +02:00
|
|
|
}
|
|
|
|
|
2015-07-23 19:12:50 +02:00
|
|
|
getAll () {
|
2016-04-21 15:09:49 +02:00
|
|
|
return rest.get(`${ this.api }config/all`);
|
2015-07-15 15:06:18 +02:00
|
|
|
}
|
|
|
|
|
2015-07-23 19:12:50 +02:00
|
|
|
set (data) {
|
2016-04-21 15:09:49 +02:00
|
|
|
return rest.post(`${ this.api }config`, data);
|
2015-07-15 15:06:18 +02:00
|
|
|
}
|
2015-07-24 13:15:00 +02:00
|
|
|
}
|