mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 05:06:11 +01:00
12 lines
441 B
TypeScript
12 lines
441 B
TypeScript
import { RatingsInfo } from '../../commands/ratings';
|
|||
|
|
import { Region } from '../../constants/regions';
|
||
|
|
import regionToRegionSubdomain from './regionToRegionSubdomain';
|
||
|
|
|
||
|
|
export default async function getRatingsInfo(region: Region) {
|
||
|
|
const response = await fetch(
|
||
|
|
`https://${regionToRegionSubdomain(
|
||
|
|
region,
|
||
|
|
)}.wotblitz.com/en/api/rating-leaderboards/season/`,
|
||
|
|
);
|
||
|
|
return (await response.json()) as Promise<RatingsInfo>;
|
||
|
|
}
|