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.
15 lines
547 B
15 lines
547 B
import ApiService from '@/services/api.service'
|
|
import { StatisticsRepository } from '@/domain/models/statistics/statisticsRepository'
|
|
import { Statistics } from '~/domain/models/statistics/statistics'
|
|
|
|
export class APIStatisticsRepository implements StatisticsRepository {
|
|
constructor(
|
|
private readonly request = ApiService
|
|
) {}
|
|
|
|
async fetch(projectId: string): Promise<Statistics> {
|
|
const url = `/projects/${projectId}/statistics`
|
|
const response = await this.request.get(url)
|
|
return Statistics.valueOf(response.data)
|
|
}
|
|
}
|