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