2020-01-21 13:12:44 +00:00
|
|
|
/* global axios */
|
|
|
|
import ApiClient from './ApiClient';
|
|
|
|
|
|
|
|
class ConversationApi extends ApiClient {
|
|
|
|
constructor() {
|
2020-03-09 17:57:10 +00:00
|
|
|
super('conversations', { accountScoped: true });
|
2020-01-21 13:12:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getLabels(conversationID) {
|
|
|
|
return axios.get(`${this.url}/${conversationID}/labels`);
|
|
|
|
}
|
|
|
|
|
2020-02-16 10:16:26 +00:00
|
|
|
updateLabels(conversationID, labels) {
|
|
|
|
return axios.post(`${this.url}/${conversationID}/labels`, { labels });
|
2020-01-21 13:12:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default new ConversationApi();
|