diff options
Diffstat (limited to 'frontend/src/api/Rankings.ts')
| -rw-r--r-- | frontend/src/api/Rankings.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/frontend/src/api/Rankings.ts b/frontend/src/api/Rankings.ts new file mode 100644 index 0000000..b8d9bec --- /dev/null +++ b/frontend/src/api/Rankings.ts | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | import axios from "axios"; | ||
| 2 | import { url } from "@api/Api"; | ||
| 3 | import { Ranking, SteamRanking } from "@customTypes/Ranking"; | ||
| 4 | |||
| 5 | export const get_official_rankings = async (): Promise<Ranking> => { | ||
| 6 | const response = await axios.get(url(`rankings/lphub`)); | ||
| 7 | return response.data.data; | ||
| 8 | }; | ||
| 9 | |||
| 10 | export const get_unofficial_rankings = async (): Promise<SteamRanking> => { | ||
| 11 | const response = await axios.get(url(`rankings/steam`)); | ||
| 12 | return response.data.data; | ||
| 13 | }; | ||