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
892 B
29 lines
892 B
import ApiService from '@/services/api.service'
|
|
|
|
class AnnotationService {
|
|
constructor() {
|
|
this.request = ApiService
|
|
}
|
|
|
|
getAnnotationList(projectId, docId) {
|
|
return this.request.get(`/projects/${projectId}/docs/${docId}/annotations`)
|
|
}
|
|
|
|
addAnnotation(projectId, docId, payload) {
|
|
return this.request.post(`/projects/${projectId}/docs/${docId}/annotations`, payload)
|
|
}
|
|
|
|
deleteAnnotation(projectId, docId, annotationId) {
|
|
return this.request.delete(`/projects/${projectId}/docs/${docId}/annotations/${annotationId}`)
|
|
}
|
|
|
|
clearAnnotations(projectId, docid) {
|
|
return this.request.delete(`/projects/${projectId}/docs/${docid}/annotations`)
|
|
}
|
|
|
|
updateAnnotation(projectId, docId, annotationId, payload) {
|
|
return this.request.patch(`/projects/${projectId}/docs/${docId}/annotations/${annotationId}`, payload)
|
|
}
|
|
}
|
|
|
|
export default new AnnotationService()
|