-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.ts
26 lines (23 loc) · 858 Bytes
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Provides functions and response types to interact with the Riot API.
*
* @module
*/
export * as routes from "./api/routes.ts"; // routing value enums
export * as league from "./api/league/funcs.ts"; // LEAGUE-V4
export type { LeagueEntryDTO } from "./api/league/types.ts";
export * as summoner from "./api/summoner/funcs.ts"; // SUMMONER-V4
export type { SummonerDTO } from "./api/summoner/types.ts";
export * as match from "./api/match/functs.ts"; // MATCH-V4
export type { MatchDTO } from "./api/match/types.ts";
// define global interface
declare global {
interface Window {
RIOT_API_KEY: string | undefined;
}
}
// get RIOT_API_KEY from env variable
window.RIOT_API_KEY = Deno.env.get("RIOT_API_KEY");
if (window.RIOT_API_KEY === undefined) {
console.log("[ ERROR ]: RIOT_API_KEY env variable is not set. API calls will fail.");
}