2018-04-11 09:54:19 -04:00
|
|
|
import axios from '../../lib/utils/axios_utils';
|
2017-05-06 13:02:06 -04:00
|
|
|
|
|
|
|
export default class PipelineService {
|
|
|
|
constructor(endpoint) {
|
2018-04-11 09:54:19 -04:00
|
|
|
this.pipeline = endpoint;
|
2017-05-06 13:02:06 -04:00
|
|
|
}
|
|
|
|
|
2019-03-07 05:29:46 -05:00
|
|
|
getPipeline(params) {
|
|
|
|
return axios.get(this.pipeline, { params });
|
2017-05-06 13:02:06 -04:00
|
|
|
}
|
2017-06-02 09:24:42 -04:00
|
|
|
|
2020-01-08 07:07:59 -05:00
|
|
|
// eslint-disable-next-line class-methods-use-this
|
|
|
|
deleteAction(endpoint) {
|
|
|
|
return axios.delete(`${endpoint}.json`);
|
|
|
|
}
|
|
|
|
|
2018-04-11 09:54:19 -04:00
|
|
|
// eslint-disable-next-line class-methods-use-this
|
2017-06-02 09:24:42 -04:00
|
|
|
postAction(endpoint) {
|
2018-04-11 09:54:19 -04:00
|
|
|
return axios.post(`${endpoint}.json`);
|
2017-06-02 09:24:42 -04:00
|
|
|
}
|
2017-05-06 13:02:06 -04:00
|
|
|
}
|