mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
22 lines
451 B
TypeScript
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,
|
|
);
|
|
}
|