mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
21 lines
441 B
JavaScript
21 lines
441 B
JavaScript
const RiotRateLimiter = require('riot-ratelimiter')
|
|
|
|
import SummonerEndpoint from './Endpoints/SummonerEndpoint'
|
|
|
|
class Jax {
|
|
constructor(key = process.env.API_KEY, region = 'euw1') {
|
|
this.key = key
|
|
this.limiter = new RiotRateLimiter()
|
|
this.region = region
|
|
|
|
this.Summoner = new SummonerEndpoint(this.limiter, this.region)
|
|
}
|
|
|
|
set regionName(regionName) {
|
|
this.region = regionName
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
Jax
|
|
}
|