Files
orionprotocol-sdk/src/services/OrionAnalytics/index.ts
Aleksandr Kraiz c12a4e8e7a Linter standard (#49)
* Impl

* Fix

* Fix

* Bump

* Bump

* Fix

* Bump
2023-02-14 00:34:37 +04:00

22 lines
451 B
TypeScript

import fetchWithValidation from '../../fetchWithValidation';
import overviewSchema from './schemas/overviewSchema';
export default class OrionAnalytics {
private readonly apiUrl: string;
constructor(apiUrl: string) {
this.apiUrl = apiUrl;
this.getOverview = this.getOverview.bind(this);
}
get api() {
return this.apiUrl;
}
getOverview = () => fetchWithValidation(
`${this.apiUrl}/overview`,
overviewSchema,
);
}