mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
|
|
import LeagueEndpoint from './Endpoints/LeagueEndpoint'
|
||
|
|
import MatchEndpoint from './Endpoints/MatchEndpoint'
|
||
|
|
import MatchlistEndpoint from './Endpoints/MatchlistEndpoint'
|
||
|
|
import SummonerEndpoint from './Endpoints/SummonerEndpoint'
|
||
|
|
import SpectatorEndpoint from './Endpoints/SpectatorEndpoint'
|
||
|
|
import CDragonEndpoint from './Endpoints/CDragonEndpoint'
|
||
|
|
import { JaxConfig } from '../JaxConfig'
|
||
|
|
import { RiotRateLimiter } from '@fightmegg/riot-rate-limiter'
|
||
|
|
|
||
|
|
export default class Jax {
|
||
|
|
public key: string
|
||
|
|
public limiter: RiotRateLimiter
|
||
|
|
public config: JaxConfig
|
||
|
|
public League: LeagueEndpoint
|
||
|
|
public Match: MatchEndpoint
|
||
|
|
public Matchlist: MatchlistEndpoint
|
||
|
|
public Spectator: SpectatorEndpoint
|
||
|
|
public Summoner: SummonerEndpoint
|
||
|
|
public CDragon: CDragonEndpoint
|
||
|
|
|
||
|
|
constructor (config:JaxConfig) {
|
||
|
|
this.key = config.key
|
||
|
|
this.limiter = new RiotRateLimiter({
|
||
|
|
debug: true,
|
||
|
|
})
|
||
|
|
this.config = config
|
||
|
|
|
||
|
|
this.League = new LeagueEndpoint(this.config, this.limiter)
|
||
|
|
this.Match = new MatchEndpoint(this.config, this.limiter)
|
||
|
|
this.Matchlist = new MatchlistEndpoint(this.config, this.limiter)
|
||
|
|
this.Spectator = new SpectatorEndpoint(this.config, this.limiter)
|
||
|
|
this.Summoner = new SummonerEndpoint(this.config, this.limiter)
|
||
|
|
this.CDragon = new CDragonEndpoint(this.config)
|
||
|
|
}
|
||
|
|
}
|