mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
749 B
29 lines
749 B
import ApiService from '@/services/api.service'
|
|
|
|
class LabelService {
|
|
constructor() {
|
|
this.request = ApiService
|
|
}
|
|
|
|
getLabelList(projectId) {
|
|
return this.request.get(`/projects/${projectId}/labels`)
|
|
}
|
|
|
|
addLabel(projectId, payload) {
|
|
return this.request.post(`/projects/${projectId}/labels`, payload)
|
|
}
|
|
|
|
deleteLabel(projectId, labelId) {
|
|
return this.request.delete(`/projects/${projectId}/labels/${labelId}`)
|
|
}
|
|
|
|
updateLabel(projectId, labelId, payload) {
|
|
return this.request.patch(`/projects/${projectId}/labels/${labelId}`, payload)
|
|
}
|
|
|
|
uploadFile(projectId, payload, config = {}) {
|
|
return this.request.post(`/projects/${projectId}/label-upload`, payload, config)
|
|
}
|
|
}
|
|
|
|
export default new LabelService()
|