LeagueStats/server-new/app/Services/Jax/src/Jax.ts
2020-10-04 17:30:04 +02:00

35 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)
}
}