mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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
786 B
29 lines
786 B
import ApiService from '@/services/api.service'
|
|
|
|
class DocumentService {
|
|
constructor() {
|
|
this.request = new ApiService()
|
|
}
|
|
|
|
getDocumentList({ projectId, limit, offset }) {
|
|
return this.request.get(`/projects/${projectId}/docs?limit=${limit}&offset=${offset}`)
|
|
}
|
|
|
|
addDocument(projectId, payload) {
|
|
return this.request.post(`/projects/${projectId}/docs`, payload)
|
|
}
|
|
|
|
deleteDocument(projectId, docId) {
|
|
return this.request.delete(`/projects/${projectId}/docs/${docId}`)
|
|
}
|
|
|
|
updateDocument(projectId, docId, payload) {
|
|
return this.request.patch(`/projects/${projectId}/docs/${docId}`, payload)
|
|
}
|
|
|
|
uploadFile(projectId, payload) {
|
|
return this.request.post(`/projects/${projectId}/docs/upload`, payload)
|
|
}
|
|
}
|
|
|
|
export default new DocumentService()
|