2019-08-14 09:48:44 +00:00
|
|
|
/* global axios */
|
2020-03-09 17:57:10 +00:00
|
|
|
import ApiClient from './ApiClient';
|
2019-08-14 09:48:44 +00:00
|
|
|
|
2020-03-09 17:57:10 +00:00
|
|
|
class ReportsAPI extends ApiClient {
|
|
|
|
constructor() {
|
|
|
|
super('reports', { accountScoped: true });
|
|
|
|
}
|
|
|
|
|
|
|
|
getAccountReports(metric, since, until) {
|
|
|
|
return axios.get(`${this.url}/account`, {
|
|
|
|
params: { metric, since, until },
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getAccountSummary(accountId, since, until) {
|
|
|
|
return axios.get(`${this.url}/${accountId}/account_summary`, {
|
|
|
|
params: { since, until },
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default new ReportsAPI();
|